In the following code, in the loop at line 381 of jtagmkII.c (line 2586 of the attached jtagmkII.i), msglen (and l, as I recall) contain incorrect values. This only happens when optimization is turned on (-O2); it does not happen with -O1. The code runs correctly when compiled with gcc-3.3 using optimization.
-- Summary: Loop variables incorrectly initialized with optimization on Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ned at bike-nomad dot com GCC build triplet: powerpc-apple-darwin8 GCC host triplet: powerpc-apple-darwin8 GCC target triplet: powerpc-apple-darwin8 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27044