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

            Bug ID: 97191
           Summary: ICE In expand_expr_real_1, at expr.c:10234
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tangyixuan at mail dot dlut.edu.cn
  Target Milestone: ---

Hi, the following code crashes GCC.

$ cat s.cpp

struct A { 
  A (); 
  A ( const A &); 
  A ( int );
}; 
A :: A (){
  int a =0; 
  A b [a][0];
} 

$ g++ -c s.cpp

during RTL pass: expand
s.cpp: In constructor ‘A::A()’:
s.cpp:8:12: internal compiler error: in expand_expr_real_1, at expr.c:10234
    8 |   A b [a][0];
      |            ^
0x606834 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ../../gcc-11-20200906/gcc/expr.c:10234
0x97e6a1 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        ../../gcc-11-20200906/gcc/expr.c:8480
0x97e6a1 store_expr(tree_node*, rtx_def*, int, bool, bool)
        ../../gcc-11-20200906/gcc/expr.c:5858
0x97fcd1 expand_assignment(tree_node*, tree_node*, bool)
        ../../gcc-11-20200906/gcc/expr.c:5594
0x8742f8 expand_gimple_stmt_1
        ../../gcc-11-20200906/gcc/cfgexpand.c:3749
0x8742f8 expand_gimple_stmt
        ../../gcc-11-20200906/gcc/cfgexpand.c:3847
0x87a39e expand_gimple_basic_block
        ../../gcc-11-20200906/gcc/cfgexpand.c:5888
0x87a39e execute
        ../../gcc-11-20200906/gcc/cfgexpand.c:6572
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.
  • [Bug c++/97191] New: ICE I... tangyixuan at mail dot dlut.edu.cn via Gcc-bugs

Reply via email to