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

            Bug ID: 90671
           Summary: ICE on valid code at -Os and above with -g enabled in
                    gsi_split_seq_after, at gimple-iterator.c:345
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

This appears to be a recent regression.

$ 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/10.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 10.0.0 20190529 (experimental) [trunk revision 271737] (GCC) 
$ 
$ gcctk -Os small.c  
$ 
$ gcctk -Os -g small.c
during GIMPLE pass: vrp
small.c: In function ‘main’:
small.c:3:5: internal compiler error: in gsi_split_seq_after, at
gimple-iterator.c:345
    3 | int main ()
      |     ^~~~
0x9bdda3 gsi_split_seq_after(gimple_stmt_iterator)
        ../../gcc-source-trunk/gcc/gimple-iterator.c:345
0xef1118 ssa_create_duplicates(redirection_data**, ssa_local_info_t*)
        ../../gcc-source-trunk/gcc/tree-ssa-threadupdate.c:1145
0xef1da2 void hash_table<redirection_data, false,
xcallocator>::traverse_noresize<ssa_local_info_t*,
&(ssa_create_duplicates(redirection_data**,
ssa_local_info_t*))>(ssa_local_info_t*)
        ../../gcc-source-trunk/gcc/hash-table.h:1036
0xef1da2 void hash_table<redirection_data, false,
xcallocator>::traverse<ssa_local_info_t*,
&(ssa_create_duplicates(redirection_data**,
ssa_local_info_t*))>(ssa_local_info_t*)
        ../../gcc-source-trunk/gcc/hash-table.h:1057
0xef1da2 thread_block_1
        ../../gcc-source-trunk/gcc/tree-ssa-threadupdate.c:1482
0xef2775 thread_block
        ../../gcc-source-trunk/gcc/tree-ssa-threadupdate.c:1527
0xef3f4f thread_through_all_blocks(bool)
        ../../gcc-source-trunk/gcc/tree-ssa-threadupdate.c:2639
0xf9644e execute_vrp
        ../../gcc-source-trunk/gcc/tree-vrp.c:6819
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 a;

int main ()
{
  int b, c;
  for (c = 0; c < 2; c++)
    while (a)
      if (b)
        break;
  return 0;
}

Reply via email to