$ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/usr/local/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=/usr/local/gcc-trunk --disable-bootstrap Thread model: posix gcc version 8.0.0 20170810 (experimental) [trunk revision 251019] (GCC) $ $ gcc-trunk -O2 -c small.c $ $ gcc-trunk -O3 -c small.c small.c: In function ‘fn1’: small.c:5:6: error: invalid argument to gimple call void fn1 (int h) ^~~ &e > 3B _33 = LOOP_DIST_ALIAS (4, &e > 3B); during GIMPLE pass: ldist small.c:5:6: internal compiler error: verify_gimple failed 0xcb091b verify_gimple_in_cfg(function*, bool) ../../gcc-source-trunk/gcc/tree-cfg.c:5310 0xb75202 execute_function_todo ../../gcc-source-trunk/gcc/passes.c:1992 0xb75ba9 execute_todo ../../gcc-source-trunk/gcc/passes.c:2046 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 printf (const char *, ...); int a, c[1], d, e, **f; void fn1 (int h) { int *i = 0; for (d = 0; d < 1; d++) { if (d) continue; for (; e; e++) { a = c[*i]; if (h) printf ("0"); } return; } f = &i; }
Confirmed, started with -ftree-loop-distribution in r249994.
Thanks for reporting, I will investigate.
Author: aldyh Date: Wed Sep 13 16:57:11 2017 New Revision: 252424 URL: https://gcc.gnu.org/viewcvs?rev=252424&root=gcc&view=rev Log: PR tree-optimization/81799 * tree-loop-distribution.c (version_loop_by_alias_check): Force cond_expr to simple gimple operand. gcc/testsuite * gcc.dg/tree-ssa/pr81799.c: New. Added: branches/range-gen2/gcc/testsuite/gcc.dg/tree-ssa/pr81799.c Modified: branches/range-gen2/gcc/ChangeLog branches/range-gen2/gcc/testsuite/ChangeLog branches/range-gen2/gcc/tree-loop-distribution.c
Author: amker Date: Mon Aug 14 11:46:03 2017 New Revision: 251088 URL: https://gcc.gnu.org/viewcvs?rev=251088&root=gcc&view=rev Log: PR tree-optimization/81799 * tree-loop-distribution.c (version_loop_by_alias_check): Force cond_expr to simple gimple operand. gcc/testsuite * gcc.dg/tree-ssa/pr81799.c: New. Added: trunk/gcc/testsuite/gcc.dg/tree-ssa/pr81799.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-loop-distribution.c