[Bug c/57018] New: Miscompilation of bison 2.7.1 under "-Os -fomit-frame-pointer"
michael at talamasca dot ocis.net
gcc-bugzilla@gcc.gnu.org
Sun Apr 21 02:19:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57018
Bug #: 57018
Summary: Miscompilation of bison 2.7.1 under "-Os
-fomit-frame-pointer"
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: michael@talamasca.ocis.net
Created attachment 29906
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29906
Code to generate a pair of objects showing the bug
GCC 4.8.0 miscompiles bison 2.7.1 when compiling for space with frame pointer
omission. (I've built gcc with --enable-frame-pointer expressly so my code
isn't bloated with exception data when I omit it on the command line.)
There are multiple breakages, but I've nailed down one of them in the attached
case. It seems to involve the combination of passing structures by value and
the optimization opportunities of functions not called from outside an object.
So long as extenal_noop does nothing, calling real_entry_point should always
result in its argument being copied to main_blob. But main_blob is full of
garbage at the problematic optimization "-Os -fomit-frame-pointer".
This is on i386-pc-linux-uclibc.
More information about the Gcc-bugs
mailing list