public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103703] New: ICE with -Wmismatched-tags
@ 2021-12-14  5:43 f.heckenbach@fh-soft.de
  2021-12-14  6:56 ` [Bug c++/103703] ICE with -Wmismatched-tags with friends and templates pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: f.heckenbach@fh-soft.de @ 2021-12-14  5:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103703
           Summary: ICE with -Wmismatched-tags
           Product: gcc
           Version: 11.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: f.heckenbach@fh-soft.de
  Target Milestone: ---

% cat test.cpp
template <typename T> struct A { struct B { }; };
template <typename T> struct C { friend struct A <C>::B; };
% g++ -Wmismatched-tags test.cpp
test.cpp:2:59: internal compiler error: Segmentation fault
    2 | template <typename T> struct C { friend struct A <C>::B; };
      |                                                           ^
0x1786229 internal_error(char const*, ...)
        ???:0
0x78c6ed class_decl_loc_t::diag_mismatched_tags(tree_node*)
        ???:0
0x790955 class_decl_loc_t::diag_mismatched_tags()
        ???:0
0x7c482e c_parse_file()
        ???:0
0x896762 c_common_parse_file()
        ???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1

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

* [Bug c++/103703] ICE with -Wmismatched-tags with friends and templates
  2021-12-14  5:43 [Bug c++/103703] New: ICE with -Wmismatched-tags f.heckenbach@fh-soft.de
@ 2021-12-14  6:56 ` pinskia at gcc dot gnu.org
  2021-12-14 10:15 ` marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-14  6:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

* [Bug c++/103703] ICE with -Wmismatched-tags with friends and templates
  2021-12-14  5:43 [Bug c++/103703] New: ICE with -Wmismatched-tags f.heckenbach@fh-soft.de
  2021-12-14  6:56 ` [Bug c++/103703] ICE with -Wmismatched-tags with friends and templates pinskia at gcc dot gnu.org
@ 2021-12-14 10:15 ` marxin at gcc dot gnu.org
  2021-12-14 22:40 ` msebor at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-12-14 10:15 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |msebor at gcc dot gnu.org

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r10-7424-g04dd734b52de1218 when the warning was added.

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

* [Bug c++/103703] ICE with -Wmismatched-tags with friends and templates
  2021-12-14  5:43 [Bug c++/103703] New: ICE with -Wmismatched-tags f.heckenbach@fh-soft.de
  2021-12-14  6:56 ` [Bug c++/103703] ICE with -Wmismatched-tags with friends and templates pinskia at gcc dot gnu.org
  2021-12-14 10:15 ` marxin at gcc dot gnu.org
@ 2021-12-14 22:40 ` msebor at gcc dot gnu.org
  2021-12-16 22:13 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-12-14 22:40 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |11.2.0, 12.0
           Assignee|unassigned at gcc dot gnu.org      |msebor at gcc dot gnu.org
           Keywords|                            |patch
             Status|NEW                         |ASSIGNED

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
Patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-December/586856.html

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

* [Bug c++/103703] ICE with -Wmismatched-tags with friends and templates
  2021-12-14  5:43 [Bug c++/103703] New: ICE with -Wmismatched-tags f.heckenbach@fh-soft.de
                   ` (2 preceding siblings ...)
  2021-12-14 22:40 ` msebor at gcc dot gnu.org
@ 2021-12-16 22:13 ` cvs-commit at gcc dot gnu.org
  2021-12-16 22:37 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-12-16 22:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Sebor <msebor@gcc.gnu.org>:

https://gcc.gnu.org/g:93faac7e32e4f9503c559f2a3e5a4732f5e9ea09

commit r12-6024-g93faac7e32e4f9503c559f2a3e5a4732f5e9ea09
Author: Martin Sebor <msebor@redhat.com>
Date:   Thu Dec 16 15:11:45 2021 -0700

    Check for class type before assuming a type is one [PR103703].

    Resolves:
    PR c++/103703 - ICE with -Wmismatched-tags with friends and templates

    gcc/cp/ChangeLog:

            PR c++/103703
            * parser.c (class_decl_loc_t::diag_mismatched_tags): Check for
class
            type before assuming a type is one.

    gcc/testsuite/ChangeLog:

            PR c++/103703
            * g++.dg/warn/Wmismatched-tags-9.C: New test.

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

* [Bug c++/103703] ICE with -Wmismatched-tags with friends and templates
  2021-12-14  5:43 [Bug c++/103703] New: ICE with -Wmismatched-tags f.heckenbach@fh-soft.de
                   ` (3 preceding siblings ...)
  2021-12-16 22:13 ` cvs-commit at gcc dot gnu.org
@ 2021-12-16 22:37 ` cvs-commit at gcc dot gnu.org
  2021-12-16 22:38 ` msebor at gcc dot gnu.org
  2021-12-16 22:38 ` msebor at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-12-16 22:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Martin Sebor
<msebor@gcc.gnu.org>:

https://gcc.gnu.org/g:4f556312da96bf2db67b014612de86594d4ad003

commit r11-9395-g4f556312da96bf2db67b014612de86594d4ad003
Author: Martin Sebor <msebor@redhat.com>
Date:   Thu Dec 16 15:35:55 2021 -0700

    Check for class type before assuming a type is one [PR103703].

    Resolves:
    PR c++/103703 - ICE with -Wmismatched-tags with friends and templates

    gcc/cp/ChangeLog:

            PR c++/103703
            * parser.c (class_decl_loc_t::diag_mismatched_tags): Check for
class
            type before assuming a type is one.

    gcc/testsuite/ChangeLog:

            PR c++/103703
            * g++.dg/warn/Wmismatched-tags-9.C: New test.

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

* [Bug c++/103703] ICE with -Wmismatched-tags with friends and templates
  2021-12-14  5:43 [Bug c++/103703] New: ICE with -Wmismatched-tags f.heckenbach@fh-soft.de
                   ` (4 preceding siblings ...)
  2021-12-16 22:37 ` cvs-commit at gcc dot gnu.org
@ 2021-12-16 22:38 ` msebor at gcc dot gnu.org
  2021-12-16 22:38 ` msebor at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-12-16 22:38 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> ---
Fixed on trunk and in GCC 11.

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

* [Bug c++/103703] ICE with -Wmismatched-tags with friends and templates
  2021-12-14  5:43 [Bug c++/103703] New: ICE with -Wmismatched-tags f.heckenbach@fh-soft.de
                   ` (5 preceding siblings ...)
  2021-12-16 22:38 ` msebor at gcc dot gnu.org
@ 2021-12-16 22:38 ` msebor at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-12-16 22:38 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.3

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

end of thread, other threads:[~2021-12-16 22:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14  5:43 [Bug c++/103703] New: ICE with -Wmismatched-tags f.heckenbach@fh-soft.de
2021-12-14  6:56 ` [Bug c++/103703] ICE with -Wmismatched-tags with friends and templates pinskia at gcc dot gnu.org
2021-12-14 10:15 ` marxin at gcc dot gnu.org
2021-12-14 22:40 ` msebor at gcc dot gnu.org
2021-12-16 22:13 ` cvs-commit at gcc dot gnu.org
2021-12-16 22:37 ` cvs-commit at gcc dot gnu.org
2021-12-16 22:38 ` msebor at gcc dot gnu.org
2021-12-16 22:38 ` msebor 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).