http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57086
Bug #: 57086
Summary: Internal compiler error: Error reporting routines
re-entered.
Classification: Unclassified
Product: gcc
Version: 4.7.3
Status: UNCONFIRMED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57086
--- Comment #1 from madars+gccbug at gmail dot com 2013-04-26 20:48:24 UTC ---
Created attachment 29949
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29949
triggering code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57086
--- Comment #2 from madars+gccbug at gmail dot com 2013-04-26 21:20:45 UTC ---
Created attachment 29951
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29951
pre-processed source file
Assignee: unassigned at gcc dot gnu.org
Reporter: madars+gccbug at gmail dot com
The following code sample exhibits a bug in a gcc -O2 optimization pass.
Namely, having defined two() and six() with the obvious return values, the
value of two() * 2 + six() * 5 gets an assembly
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65307
--- Comment #1 from madars+gccbug at gmail dot com ---
I should clarify that the same behavior can be observed on Debian, Ubuntu and
Fedora:
gcc (Ubuntu 4.9.1-16ubuntu6) 4.9.1
gcc (Debian 4.9.1-19) 4.9.1
gcc (GCC) 4.9.2 20141101 (Red Hat 4.9.2-1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65307
--- Comment #12 from madars+gccbug at gmail dot com ---
By the way, in g++ the bug can be triggered even with -O1 and without marking
any functions inline (implicitly or explicitly):
http://web.mit.edu/madars/Public/gcc-basic-arithmetic-bug-O1