This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/82564] New: ICE at -O1 and above: in assign_stack_temp_for_type, at function.c:783


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

            Bug ID: 82564
           Summary: ICE at -O1 and above: in assign_stack_temp_for_type,
                    at function.c:783
           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 affect at least as early as 4.8.x. 


$ gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/home/su/software/tmp/gcc/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/8.0.0/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 8.0.0 20171016 (experimental) [trunk revision 253785] (GCC) 
$ 
$ gcctk -O0 small.c
$      
$ gcctk -O1 small.c
during RTL pass: expand
small.c: In function ‘main’:
small.c:17:5: internal compiler error: in assign_stack_temp_for_type, at
function.c:783
   a = f ();
   ~~^~~~~~
0x973b2b assign_stack_temp_for_type(machine_mode, long, tree_node*)
        ../../gcc-source-trunk/gcc/function.c:783
0x973be3 assign_temp(tree_node*, int, int)
        ../../gcc-source-trunk/gcc/function.c:999
0x7d4914 expand_call(tree_node*, rtx_def*, int)
        ../../gcc-source-trunk/gcc/calls.c:3135
0x907710 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ../../gcc-source-trunk/gcc/expr.c:10869
0x91a63d expand_normal
        ../../gcc-source-trunk/gcc/expr.h:282
0x91a63d store_field
        ../../gcc-source-trunk/gcc/expr.c:6843
0x916631 expand_assignment(tree_node*, tree_node*, bool)
        ../../gcc-source-trunk/gcc/expr.c:5170
0x7e95aa expand_call_stmt
        ../../gcc-source-trunk/gcc/cfgexpand.c:2664
0x7e95aa expand_gimple_stmt_1
        ../../gcc-source-trunk/gcc/cfgexpand.c:3585
0x7e95aa expand_gimple_stmt
        ../../gcc-source-trunk/gcc/cfgexpand.c:3751
0x7eb442 expand_gimple_basic_block
        ../../gcc-source-trunk/gcc/cfgexpand.c:5754
0x7f0e46 execute
        ../../gcc-source-trunk/gcc/cfgexpand.c:6361
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.
$ 


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


int main ()
{
  int t = 8;

  typedef struct
  {
    char v[t];
  } B; 

  B a, b;

  B __attribute__ ((noinline)) f ()
  {
    return b; 
  }

  a = f ();

  return 0;
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]