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

            Bug ID: 89566
           Summary: ICE on compilable C++ code: in gimple_call_arg, at
                    gimple.h:3166
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

This seems to be a recent regression.

$ g++tk -v
Using built-in specs.
COLLECT_GCC=g++tk
COLLECT_LTO_WRAPPER=/home/su/software/tmp/gcc/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/9.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/home/su/software/tmp/gcc/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 9.0.1 20190302 (experimental) [trunk revision 269338] (GCC) 
$ 
$ g++-8.1.0 tmp.cpp
$             
$ g++tk tmp.cpp
during GIMPLE pass: printf-return-value
tmp.cpp: In function ‘int main()’:
tmp.cpp:3:5: internal compiler error: in gimple_call_arg, at gimple.h:3166
    3 | int main ()
      |     ^~~~
0x173fe7c gimple_call_arg
        ../../gcc-source-trunk/gcc/gimple.h:3166
0x173fe7c gimple_call_arg
        ../../gcc-source-trunk/gcc/gimple.h:3174
0x173fe7c handle_gimple_call
        ../../gcc-source-trunk/gcc/gimple-ssa-sprintf.c:4054
0x174026d before_dom_children
        ../../gcc-source-trunk/gcc/gimple-ssa-sprintf.c:4264
0x16f5a4a dom_walker::walk(basic_block_def*)
        ../../gcc-source-trunk/gcc/domwalk.c:353
0x1739e58 execute
        ../../gcc-source-trunk/gcc/gimple-ssa-sprintf.c:4296
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.
$ 


-------------------------------


#include <cstdio>

int main ()
{
  ((void (*)()) fprintf) ();
  return 0; 
}

Reply via email to