http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43341
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-04-26 20:24:21 UTC --- (In reply to comment #6) > (In reply to comment #5) > > (In reply to comment #4) > > > gcc -fpack-struct=4 -fprofile-generate test.c > > > > -fpack-struct changes the ABI so it is not fully a bug there. > > It's a gray area. -fprofile-generate is not documented as relying on > "structs", > as far as I could tell, so it's not intuitively obvious that it should have > any > interaction with -fpack-struct= at all. IMHO -fprofile-generate should always > produce working code. At the very least, the interaction should be documented > in the documentation for -fprofile-generate. Maybe it does not says it relays on structs but it relays on the current ABI that is used. This is just like saying the Fortran front-end does say it relays on structs but things go bad when you use that option. I don't see why this should be documented when it is already documented that -fpack-struct changes the ABI.