Summary: | possible LTO termination bug | ||
---|---|---|---|
Product: | gcc | Reporter: | John Regehr <regehr> |
Component: | middle-end | Assignee: | Richard Biener <rguenth> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | chenyang, gcc-bugs, hubicka |
Priority: | P3 | Keywords: | wrong-code |
Version: | 4.5.0 | ||
Target Milestone: | 4.5.0 | ||
Host: | i686-pc-linux-gnu | Target: | i686-pc-linux-gnu |
Build: | i686-pc-linux-gnu | Known to work: | |
Known to fail: | Last reconfirmed: | 2009-10-23 10:17:09 |
Description
John Regehr
2009-10-23 02:48:15 UTC
Forgot to add gcc details: regehr@john-home:~$ current-gcc -v Using built-in specs. COLLECT_GCC=current-gcc COLLECT_LTO_WRAPPER=/home/regehr/z/tmp/gcc-r153474-install/libexec/gcc/i686-pc-linux-gnu/4.5.0/lto-wrapper Target: i686-pc-linux-gnu Configured with: ../configure --with-libelf=/usr/local --enable-lto --prefix=/home/regehr/z/tmp/gcc-r153474-install --program-prefix=r153474- --enable-languages=c,c++ Thread model: posix gcc version 4.5.0 20091022 (experimental) (GCC) Sounds like pure/const pass is messing up. It is RTL expansion that drops the calls to func_2 () from main. I have a patch. Non-LTO testcase: void __attribute__((noinline)) foo (void) { while (1) ; } int main() { foo (); return 0; } Subject: Bug 41805 Author: rguenth Date: Fri Oct 23 12:01:21 2009 New Revision: 153495 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153495 Log: 2009-10-23 Richard Guenther <rguenther@suse.de> PR middle-end/41805 * cfgexpand.c (expand_call_stmt): Use gimple_has_side_effects and gimple_call_nothrow_p. Modified: trunk/gcc/ChangeLog trunk/gcc/cfgexpand.c Fixed. |