public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/104648] New: [12 Regression] ICE in cgraphunit_cc_finalize,  at cgraphunit.cc:2540
@ 2022-02-22 19:33 gscfq@t-online.de
  2022-02-23  8:31 ` [Bug ipa/104648] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gscfq@t-online.de @ 2022-02-22 19:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104648
           Summary: [12 Regression] ICE in cgraphunit_cc_finalize, at
                    cgraphunit.cc:2540
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Started with r12 :
(gcc configured with --enable-checking=yes)


$ cat z1.cc
struct A {};
struct B : virtual A
{
  B () {};
  B () {};
};


$ g++-12-20220220 -c z1.cc -fvtable-verify=preinit
z1.cc:5:3: error: 'B::B()' cannot be overloaded with 'B::B()'
    5 |   B () {};
      |   ^
z1.cc:4:3: note: previous declaration 'B::B()'
    4 |   B () {};
      |   ^
internal compiler error: in cgraphunit_cc_finalize, at cgraphunit.cc:2540
0x10cbf86 toplev::finalize()
        ../../gcc/toplev.cc:2365
g++: internal compiler error: Segmentation fault signal terminated program
cc1plus

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

* [Bug ipa/104648] [12 Regression] ICE in cgraphunit_cc_finalize, at cgraphunit.cc:2540
  2022-02-22 19:33 [Bug c++/104648] New: [12 Regression] ICE in cgraphunit_cc_finalize, at cgraphunit.cc:2540 gscfq@t-online.de
@ 2022-02-23  8:31 ` rguenth at gcc dot gnu.org
  2022-02-24 10:23 ` marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-02-23  8:31 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Target Milestone|---                         |12.0
                 CC|                            |hubicka at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-02-23
           Keywords|                            |error-recovery,
                   |                            |ice-checking
          Component|c++                         |ipa

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
VTV adds its init function via

#0  cgraph_node::add_new_function (fndecl=<function_decl 0x7ffff66a0900
_GLOBAL__sub_I.00099_t.ii>, lowered=false)
    at /home/rguenther/src/gcc3/gcc/cgraphunit.cc:517
#1  0x0000000000f91bb4 in vtv_generate_init_routine ()
    at /home/rguenther/src/gcc3/gcc/cp/vtable-class-hierarchy.cc:1192
#2  0x0000000000cb753a in cxx_post_compilation_parsing_cleanups ()
    at /home/rguenther/src/gcc3/gcc/cp/decl2.cc:5421
#3  0x000000000181dd1f in compile_file () at
/home/rguenther/src/gcc3/gcc/toplev.cc:488

but then compile_file () returns early and we run into

40      #if CHECKING_P
41        toplev.finalize ();
42      #endif

in main().  I suppose that should simply be cut when seen_error ().  Not
sure why the above is #if CHECKING_P rather than if (flag_checking) either.

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

* [Bug ipa/104648] [12 Regression] ICE in cgraphunit_cc_finalize, at cgraphunit.cc:2540
  2022-02-22 19:33 [Bug c++/104648] New: [12 Regression] ICE in cgraphunit_cc_finalize, at cgraphunit.cc:2540 gscfq@t-online.de
  2022-02-23  8:31 ` [Bug ipa/104648] " rguenth at gcc dot gnu.org
@ 2022-02-24 10:23 ` marxin at gcc dot gnu.org
  2022-02-28 13:02 ` cvs-commit at gcc dot gnu.org
  2022-02-28 13:02 ` marxin at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-02-24 10:23 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Lemme take a look.

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

* [Bug ipa/104648] [12 Regression] ICE in cgraphunit_cc_finalize, at cgraphunit.cc:2540
  2022-02-22 19:33 [Bug c++/104648] New: [12 Regression] ICE in cgraphunit_cc_finalize, at cgraphunit.cc:2540 gscfq@t-online.de
  2022-02-23  8:31 ` [Bug ipa/104648] " rguenth at gcc dot gnu.org
  2022-02-24 10:23 ` marxin at gcc dot gnu.org
@ 2022-02-28 13:02 ` cvs-commit at gcc dot gnu.org
  2022-02-28 13:02 ` marxin at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-28 13:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:1060d06b4df8836135ed15d020afbd3637dc625b

commit r12-7410-g1060d06b4df8836135ed15d020afbd3637dc625b
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Feb 28 11:58:01 2022 +0100

    Fix error recovery in toplev::finalize.

            PR ipa/104648

    gcc/ChangeLog:

            * main.cc (main): Use flag_checking instead of CHECKING_P
            and run toplev::finalize only if there is not error seen.

    gcc/testsuite/ChangeLog:

            * g++.dg/pr104648.C: New test.

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

* [Bug ipa/104648] [12 Regression] ICE in cgraphunit_cc_finalize, at cgraphunit.cc:2540
  2022-02-22 19:33 [Bug c++/104648] New: [12 Regression] ICE in cgraphunit_cc_finalize, at cgraphunit.cc:2540 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2022-02-28 13:02 ` cvs-commit at gcc dot gnu.org
@ 2022-02-28 13:02 ` marxin at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-02-28 13:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed on master.

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

end of thread, other threads:[~2022-02-28 13:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-22 19:33 [Bug c++/104648] New: [12 Regression] ICE in cgraphunit_cc_finalize, at cgraphunit.cc:2540 gscfq@t-online.de
2022-02-23  8:31 ` [Bug ipa/104648] " rguenth at gcc dot gnu.org
2022-02-24 10:23 ` marxin at gcc dot gnu.org
2022-02-28 13:02 ` cvs-commit at gcc dot gnu.org
2022-02-28 13:02 ` marxin 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).