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

            Bug ID: 102009
           Summary: ICE: in gimple_call_arg, at gimple.h:3272
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cnsun at uwaterloo dot ca
  Target Milestone: ---

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.MRrxfWzUCx-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210821 (experimental) [master revision
:9e103620d:e92d0ff6b5e6d4b95c04fc3e326d40efeb136086] (GCC)

$ cat mutant.c
void *realloc();
ext2fs_resize_mem() { void *p = realloc(p); }

$ gcc-trunk  mutant.c
mutant.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    2 | ext2fs_resize_mem() { void *p = realloc(p); }
      | ^~~~~~~~~~~~~~~~~
mutant.c: In function ‘ext2fs_resize_mem’:
mutant.c:2:33: warning: too few arguments to built-in function ‘realloc’
expecting 2 [-Wbuiltin-declaration-mismatch]
    2 | ext2fs_resize_mem() { void *p = realloc(p); }
      |                                 ^~~~~~~
mutant.c:1:7: note: declared here
    1 | void *realloc();
      |       ^~~~~~~
during GIMPLE pass: waccess
mutant.c:2:1: internal compiler error: in gimple_call_arg, at gimple.h:3272
    2 | ext2fs_resize_mem() { void *p = realloc(p); }
      | ^~~~~~~~~~~~~~~~~
0x6eab9c gimple_call_arg
        /tmp/tmp.MRrxfWzUCx-gcc-builder/gcc/gcc/gimple.h:3272
0x6eab9c gimple_call_arg
        /tmp/tmp.MRrxfWzUCx-gcc-builder/gcc/gcc/gimple.h:3270
0x6eab9c gimple_call_arg
        /tmp/tmp.MRrxfWzUCx-gcc-builder/gcc/gcc/gimple.h:3280
0x6eab9c call_arg
        /tmp/tmp.MRrxfWzUCx-gcc-builder/gcc/gcc/gimple-ssa-warn-access.cc:115
0x6eab9c check_alloca
        /tmp/tmp.MRrxfWzUCx-gcc-builder/gcc/gcc/gimple-ssa-warn-access.cc:2492
0x6eab9c check_builtin
        /tmp/tmp.MRrxfWzUCx-gcc-builder/gcc/gcc/gimple-ssa-warn-access.cc:2810
0x6eab9c check
        /tmp/tmp.MRrxfWzUCx-gcc-builder/gcc/gcc/gimple-ssa-warn-access.cc:3285
0x6eab9c check
        /tmp/tmp.MRrxfWzUCx-gcc-builder/gcc/gcc/gimple-ssa-warn-access.cc:3304
0x6eab9c execute
        /tmp/tmp.MRrxfWzUCx-gcc-builder/gcc/gcc/gimple-ssa-warn-access.cc:3318
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.

Reply via email to