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

            Bug ID: 117164
           Summary: ICE building gcc.dg/nested-func-12.c with -std=gnu23
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jsm28 at gcc dot gnu.org
                CC: uecker at gcc dot gnu.org
  Target Milestone: ---

If I build gcc.dg/nested-func-12.c with -std=gnu23 (in addition to the other
options given in that testcase - this ICE doesn't appear without those
options), I get the following ICE (discovered while testing a change to default
to -std=gnu23, verified with an unmodified compiler). I suspect this may be
related to tag compatibility changes, as the most likely reason for -std=gnu23
to affect this test (and especially for the error about an invalid conversion
between struct S and struct S), though I haven't verified that.

src/gcc/gcc/testsuite/gcc.dg/nested-func-12.c: In function 'main':
src/gcc/gcc/testsuite/gcc.dg/nested-func-12.c:45:1: error: invalid conversion
in gimple call
   45 | main (void)
      | ^~~~
struct S

struct S

# .MEM_21 = VDEF <.MEM_20>
MEM <struct S> [(struct S *)_7] = fn (); [static-chain: &FRAME.5] [return slot
optimization]
src/gcc/gcc/testsuite/gcc.dg/nested-func-12.c:45:1: error: invalid conversion
in gimple call
struct S

struct S

# .MEM_24 = VDEF <.MEM_23>
MEM <struct S> [(struct S *)x.1_6] = fn (); [static-chain: &FRAME.5] [return
slot optimization]
src/gcc/gcc/testsuite/gcc.dg/nested-func-12.c:45:1: error: invalid conversion
in gimple call
struct S

struct S

# .MEM_27 = VDEF <.MEM_26>
MEM <struct S> [(struct S *)_10] = fn (); [static-chain: &FRAME.5] [return slot
optimization]
src/gcc/gcc/testsuite/gcc.dg/nested-func-12.c:45:1: error: invalid conversion
in gimple call
struct S

struct S

# .MEM_30 = VDEF <.MEM_29>
MEM <struct S> [(struct S *)_12] = fn (); [static-chain: &FRAME.5] [return slot
optimization]
during GIMPLE pass: fixup_cfg
src/gcc/gcc/testsuite/gcc.dg/nested-func-12.c:45:1: internal compiler error:
verify_gimple failed
0x24cd610 internal_error(char const*, ...)
        /notnfs/josmyers/glibc-bot/src/gcc/gcc/diagnostic-global-context.cc:517
0x10c1655 verify_gimple_in_cfg(function*, bool, bool)
        /notnfs/josmyers/glibc-bot/src/gcc/gcc/tree-cfg.cc:5681
0xf3fa24 execute_function_todo
        /notnfs/josmyers/glibc-bot/src/gcc/gcc/passes.cc:2096
0xf3ff9e execute_todo
        /notnfs/josmyers/glibc-bot/src/gcc/gcc/passes.cc:2150
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to