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

            Bug ID: 71210
           Summary: internal compiler error: in assign_temp, at
                    function.c:961
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cas43 at cs dot stanford.edu
  Target Milestone: ---

PROGRAM:


namespace std {class type_info { };}
[[noreturn]] void f1(const std::type_info& type);
struct S1{~S1();};
struct S2
{
    virtual S1 f2() const { f1(typeid(*this)); } 
    S1 f3() const { return f2(); } 
};
void f4() { S2 a; a.f3(); } 


RESULT:


prog.cpp: In function ‘void f4()’:
prog.cpp:7:31: internal compiler error: in assign_temp, at function.c:961
     S1 f3() const { return f2(); }
                               ^
0xaa9163 assign_temp(tree_node*, int, int)
        ../../s-trunk/gcc/function.c:961
0x92fbb7 expand_call(tree_node*, rtx_def*, int)
        ../../s-trunk/gcc/calls.c:2569
0xa3fbcc expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ../../s-trunk/gcc/expr.c:10460
0x94069a expand_expr
        ../../s-trunk/gcc/expr.h:272
0x94069a expand_call_stmt
        ../../s-trunk/gcc/cfgexpand.c:2660
0x94069a expand_gimple_stmt_1
        ../../s-trunk/gcc/cfgexpand.c:3548
0x94069a expand_gimple_stmt
        ../../s-trunk/gcc/cfgexpand.c:3714
0x941d76 expand_gimple_basic_block
        ../../s-trunk/gcc/cfgexpand.c:5720
0x947ed6 execute
        ../../s-trunk/gcc/cfgexpand.c:6335
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


HOW TO RUN:


g++ -c -O2 prog.cpp


NOTES:


No ICE with -O1.


COMPILER VERSION:

Using built-in specs.
COLLECT_GCC=/home/craig/new-gcc/i-trunk/bin/g++
COLLECT_LTO_WRAPPER=/home/craig/new-gcc/i-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../s-trunk/configure --prefix=/home/craig/new-gcc/i-trunk
Thread model: posix
gcc version 7.0.0 20160519 (experimental) (GCC)

Reply via email to