public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99214] New: Incorrect template arguments shown in constraint satisfaction failure diagnostic
@ 2021-02-23  4:16 ppalka at gcc dot gnu.org
  2021-02-23  4:20 ` [Bug c++/99214] " ppalka at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-02-23  4:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99214

            Bug ID: 99214
           Summary: Incorrect template arguments shown in constraint
                    satisfaction failure diagnostic
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppalka at gcc dot gnu.org
  Target Milestone: ---

$ cat testcase.C
template <class T>
struct A {
  template <class U> static void f() requires ([] { return U::fail; }());
  template <class U> static void f();
};

int main() {
  A<int>::f<char>();
}

$ cat testcase.C | g++-11 -std=c++20 -x c++ -
<stdin>: In substitution of ‘template<class U> static void A<int>::f<U>()
requires (<lambda>)() [with U = int]’:
<stdin>:8:19:   required from here
<stdin>:3:63: error: ‘fail’ is not a member of ‘char’

In the above diagnostic, the "in substitution of" context line incorrectly
shows "U = int" instead of "U = char".

GCC 10 shows the correct template arguments:

$ cat testcase.C | g++-10 -std=c++20 -x c++ -
<stdin>: In instantiation of ‘static void A<T>::f() requires (<lambda>)() [with
U = char; T = int]’:
<stdin>:8:19:   required from here
<stdin>:3:63: error: ‘fail’ is not a member of ‘char’

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/99214] Incorrect template arguments shown in constraint satisfaction failure diagnostic
  2021-02-23  4:16 [Bug c++/99214] New: Incorrect template arguments shown in constraint satisfaction failure diagnostic ppalka at gcc dot gnu.org
@ 2021-02-23  4:20 ` ppalka at gcc dot gnu.org
  2021-08-12 21:04 ` pinskia at gcc dot gnu.org
  2021-09-01 14:41 ` ppalka at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-02-23  4:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99214

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Changed with r11-2774.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/99214] Incorrect template arguments shown in constraint satisfaction failure diagnostic
  2021-02-23  4:16 [Bug c++/99214] New: Incorrect template arguments shown in constraint satisfaction failure diagnostic ppalka at gcc dot gnu.org
  2021-02-23  4:20 ` [Bug c++/99214] " ppalka at gcc dot gnu.org
@ 2021-08-12 21:04 ` pinskia at gcc dot gnu.org
  2021-09-01 14:41 ` ppalka at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-12 21:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99214

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-08-12

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/99214] Incorrect template arguments shown in constraint satisfaction failure diagnostic
  2021-02-23  4:16 [Bug c++/99214] New: Incorrect template arguments shown in constraint satisfaction failure diagnostic ppalka at gcc dot gnu.org
  2021-02-23  4:20 ` [Bug c++/99214] " ppalka at gcc dot gnu.org
  2021-08-12 21:04 ` pinskia at gcc dot gnu.org
@ 2021-09-01 14:41 ` ppalka at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-09-01 14:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99214

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-01 14:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23  4:16 [Bug c++/99214] New: Incorrect template arguments shown in constraint satisfaction failure diagnostic ppalka at gcc dot gnu.org
2021-02-23  4:20 ` [Bug c++/99214] " ppalka at gcc dot gnu.org
2021-08-12 21:04 ` pinskia at gcc dot gnu.org
2021-09-01 14:41 ` ppalka at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).