https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102179
Bug ID: 102179 Summary: ICE during dom: tree check: expected ssa_name, have integer_cst Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: jamborm at gcc dot gnu.org Blocks: 26163 Target Milestone: --- Host: x86_64-linux Target: x86_64-linux When compiling the following fortran code derived from 416.gamess with -Ofast -mavx2, I get an ICE (on revision r12-3290-g21b4d0ef543d68): mjambor@virgil:/tmp/bug$ cat bug.f90 SUBROUTINE MMPINP(CPINP,CDINP,CFINP) PARAMETER MXGTOT=2047320 DIMENSION CPINP(*),CDINP(*),CFINP(*) COMMON CF(MXGTOT) IGAUSS = ICNTR() ITYP = KTYPV() DO 260 I = 1,IGAUSS K = I IF (ITYP.EQ.1) THEN ELSE IF (ITYP.EQ.3) THEN CDINP(K) = 0 ELSE IF (ITYP.EQ.4) THEN ELSE IF (ITYP.EQ.6) THEN CPINP(K) = 0 ELSE STOP END IF IF (IGAUSS.EQ.1) THEN CFINP(K) = ONE ENDIF CF(K) = CFINP0 260 CONTINUE END mjambor@virgil:/tmp/bug$ ~/gcc/trunk/inst/bin/gfortran -std=legacy -Ofast -mavx2 -S ./bug.f90 during GIMPLE pass: dom ./bug.f90:1:23: 1 | SUBROUTINE MMPINP(CPINP,CDINP,CFINP) | ^ internal compiler error: tree check: expected ssa_name, have integer_cst in cprop_operand, at tree-ssa-dom.c:1715 0x132bb01 tree_check_failed(tree_node const*, char const*, int, char const*, ...) /home/mjambor/gcc/trunk/src/gcc/tree.c:8688 0x10de0fb tree_check(tree_node*, char const*, int, char const*, tree_code) /home/mjambor/gcc/trunk/src/gcc/tree.h:3395 0x10de0fb cprop_operand /home/mjambor/gcc/trunk/src/gcc/tree-ssa-dom.c:1715 0x10deca9 cprop_into_stmt /home/mjambor/gcc/trunk/src/gcc/tree-ssa-dom.c:1792 0x10e1ff2 dom_opt_dom_walker::optimize_stmt(basic_block_def*, gimple_stmt_iterator*, bool*) /home/mjambor/gcc/trunk/src/gcc/tree-ssa-dom.c:2002 0x10e4017 dom_opt_dom_walker::before_dom_children(basic_block_def*) /home/mjambor/gcc/trunk/src/gcc/tree-ssa-dom.c:1430 0x1d98404 dom_walker::walk(basic_block_def*) /home/mjambor/gcc/trunk/src/gcc/domwalk.c:309 0x10e471c execute /home/mjambor/gcc/trunk/src/gcc/tree-ssa-dom.c:764 Please submit a full bug report, Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163 [Bug 26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)