This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ARM CGT v5.1.6 - switch-case statement bug with 64 bit constants

Other Parts Discussed in Thread: EK-TM4C123GXL

Hi,

I believe I found a bug on ARM CGT v5.1.6 when trying to use 64 bit constants in the switch-case statement. 

I am using Tive EK-TM4C123GXL Launchpad and the following test code:

3630.blinky.zip

The analysis from the generated assembly code is as follows:

4214.switch_analysis.pdf

As can be seen at the end of the PDF document (in $C$L4 lines), the generated contant is wrong. It should be #2415919104/0x90000000, but instead the compiler assigned the contant value of #0. I think this is probably due to some unseen overflow in the compiler code.

This issue doesn't appear when trying to use:

- 32 bit constant values

or

- if() else if() statements

or

- the ARM GCC in CCS v6.x

Any feedback or confirmation is more then welcomed.

Thanks.