This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/53146] switch statement compiling wrong code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53146

Erik Thiele <erikyyy at erikyyy dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #4 from Erik Thiele <erikyyy at erikyyy dot de> 2012-04-28 00:07:23 UTC ---
:-(
I'm sorry.
The reason was not putting the .data segment into the HEX file.
Please close the bug. :-(
the C switch statement is building a jump table in the data segment.

wrong: avr-objcopy -j .text -O ihex concat.out concat.hex

correct: avr-objcopy -j .text -j .data -O ihex concat.out concat.hex


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]