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 tree-optimization/82217] New: ICE on valid code at -O1 and above: in visit_phi, at tree-ssa-sccvn.c:3908


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

            Bug ID: 82217
           Summary: ICE on valid code at -O1 and above: in visit_phi, at
                    tree-ssa-sccvn.c:3908
           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 should be a very 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/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 20170915 (experimental) [trunk revision 252779] (GCC)
$
$ gcctk -O0 small.c
$ gcc-7.2.0 -O1 small.c
$
$ gcctk -O1 small.c
during GIMPLE pass: fre
small.c: In function ‘fn1’:
small.c:29:1: internal compiler error: in visit_phi, at tree-ssa-sccvn.c:3908
 }
 ^
0xe4d420 visit_phi
        ../../gcc-source-trunk/gcc/tree-ssa-sccvn.c:3908
0xe4d420 visit_use
        ../../gcc-source-trunk/gcc/tree-ssa-sccvn.c:3982
0xe4dfd3 process_scc
        ../../gcc-source-trunk/gcc/tree-ssa-sccvn.c:4330
0xe4dfd3 extract_and_process_scc_for_name
        ../../gcc-source-trunk/gcc/tree-ssa-sccvn.c:4401
0xe4dfd3 DFS
        ../../gcc-source-trunk/gcc/tree-ssa-sccvn.c:4451
0xe4ee33 sccvn_dom_walker::before_dom_children(basic_block_def*)
        ../../gcc-source-trunk/gcc/tree-ssa-sccvn.c:4900
0x1379a2a dom_walker::walk(basic_block_def*)
        ../../gcc-source-trunk/gcc/domwalk.c:291
0xe4fe25 run_scc_vn(vn_lookup_kind)
        ../../gcc-source-trunk/gcc/tree-ssa-sccvn.c:5016
0xe1ae62 execute
        ../../gcc-source-trunk/gcc/tree-ssa-pre.c:5157
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, b, c;

void fn1 ()
{ 
  while (1)
    { 
      if (c)
        goto L2;
      break;
    }
  if (c)
    {
    L1:{
        int g[1];
        if (b)
          goto L1;
        goto L1;
      L2:
        for (a = 0; a;)
          goto L1;
      }
    }
}

int main ()
{ 
  fn1 ();
  return 0;
}

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