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

            Bug ID: 96114
           Summary: ICE in make_ssa_name_fn, at tree-ssanames.c:279 since
                    r7-536-g381cdae49785fc4b
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: rguenth at gcc dot gnu.org
  Target Milestone: ---

One old one:

$ cat vlt_to_pointer.c
int test_n;

void
test(int (*fn())[test_n]) { (*fn())[0]; }

void
main_fn() { test(main_fn); }

$ gcc vlt_to_pointer.c -fsanitize=bounds-strict -O1 -finline-small-functions
-fnon-call-exceptions -ftrapv -fexceptions -c
vlt_to_pointer.c: In function ‘main_fn’:
vlt_to_pointer.c:7:18: warning: passing argument 1 of ‘test’ from incompatible
pointer type [-Wincompatible-pointer-types]
    7 | main_fn() { test(main_fn); }
      |                  ^~~~~~~
      |                  |
      |                  void (*)()
vlt_to_pointer.c:4:12: note: expected ‘int (* (*)())[(sizetype)(test_n)]’ but
argument is of type ‘void (*)()’
    4 | test(int (*fn())[test_n]) { (*fn())[0]; }
      |      ~~~~~~^~~~~~~~~~~~~
during GIMPLE pass: einline
vlt_to_pointer.c:7:13: internal compiler error: in make_ssa_name_fn, at
tree-ssanames.c:279
    7 | main_fn() { test(main_fn); }
      |             ^~~~~~~~~~~~~
0x7ffff79eccc9 __libc_start_main
        ../csu/libc-start.c:308
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://bugs.opensuse.org/> for instructions.

Reply via email to