https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79386
Bug ID: 79386 Summary: [7 Regression] ICE: segmentation fault in cprop w/ -O2 on 32-bit BE powerpc Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- Target: powerpc-*-linux-gnu* At least gcc-7.0.0-alpha20170129 and gcc-7.0.0-alpha20170205 snapshots ICE when compiling the following snippet for 32-bit BE powerpc targets w/ -O2: int fy, er; int ot (int dh) { int t5; int *ge, *ys; if (er == 0) { t5 = 0; ys = &er; ge = &er; } else { int ay; t5 = 1; for (ay = 0; ay < 9; ++ay) t5 *= 3; ys = t5; ge = &dh; } *ys = t5 < 3; if (*ys != 0) { int sr; er += (fy != 0) ? fy : 1; if (sr != 0 || dh != 0) *ge = 0; if (er >= 0) { if (sr != 0) sr = dh; if (*ge / sr != 0) for (;;) { } } } return er * (fy != 0 && *ge != 0); } % powerpc-e300c3-linux-gnu-gcc-7.0.0-alpha20170205 -O2 -w -c rxffdvao.c rxffdvao.c: In function 'ot': rxffdvao.c:46:1: internal compiler error: Segmentation fault } ^ 0x2ed19bc7d19 crash_signal /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170205/work/gcc-7-20170205/gcc/toplev.c:333 0x2ed1a25f149 find_bypass_set /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170205/work/gcc-7-20170205/gcc/cprop.c:1474 0x2ed1a25f149 bypass_block /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170205/work/gcc-7-20170205/gcc/cprop.c:1597 0x2ed1a25f149 bypass_conditional_jumps /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170205/work/gcc-7-20170205/gcc/cprop.c:1731 0x2ed1a25f149 one_cprop_pass /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170205/work/gcc-7-20170205/gcc/cprop.c:1874 0x2ed1a25f149 execute_rtl_cprop /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170205/work/gcc-7-20170205/gcc/cprop.c:1918 0x2ed1a25f149 execute /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170205/work/gcc-7-20170205/gcc/cprop.c:1956