This test case comes from the gdtoa library. The problem is reduced to a simple test-case. Wrong code is produced for optimization levels higher or equal to 2.
-- Summary: Wrong code by >= -O2 for pre-initialized variable and casted access Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: wrong-code Severity: critical Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ktietz at gcc dot gnu dot org GCC target triplet: i686-*-* x86_64-*-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39745