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.

CCS/MSP430F5329: MSP430-GCC internal compiler error

Part Number: MSP430F5329

Tool/software: Code Composer Studio

I updated from the version 5 to the of the gcc compiler for MSP430. Now in one file it says: font.c: In function 'eve_font_char_multi': font.c:253:1: error: unable to generate reloads for: 253 | } | ^ (insn 111 110 112 7 (set (reg:SI 6 R6 [orig:72 _100 ] [72]) (ashift:SI (zero_extend:SI (reg:QI 6 R6 [orig:96 handle ] [96])) (const_int 7 [0x7]))) 59 {*} (expr_list:REG_DEAD (reg:QI 6 R6 [orig:96 handle ] [96]) (nil))) during RTL pass: reload font.c:253:1: internal compiler error: in find_reloads, at reload.c:3814 Compilation is done with msp430-elf-gcc -c -mmcu=msp430f5329 -O2 -Wall -Wextra -g2 -mlarge (even with lto the problem remains) Is this a known problem? Do you need the preprocessed source to test? Thanks in advance
  • Hi,

    Yes this looks like a bug.

    Some work was done in this area in the upcoming release (to be made available within a couple of weeks I think), so it may be fixed already.

    For now I think you may be able to work around it by using shift amounts less than or equal to 4. Try shifting the value by 4 and then by 3.

    Or put the shift amount in a "volatile" variable so it is stored in memory.

    I know these work arounds are annoying, sorry!

    If you can post the preprocessed source, I'll be able to check if it is fixed already in or if we need to fix it in a future release.


  • font.zipThis could explain the issue… the culprits seems to be in a called function which is (correctly) automatically inlined (eve_font_char_multi_glyph, for the records). The program uses an unholy amount of shift in macros to compose control word for a graphics chip so there are many things like


    which are in the form you said could trigger the bug. Anyway, I'll try the workaround and if all else fails revert to the old compiler.

    Attached the preprocessed file to test. Compile with msp430-elf-gcc -c -mmcu=msp430f5329 -O2 -Wall -Wextra -g2 -mlarge font.i

  • Hi Jozef,

    I have a question that GCC maintenance has been moved to you?


  • Thank you very much for providing the test case.

    I can reproduce the the internal compiler error with, and can confirm that the bug is fixed in The source compiles without any problems.

    If it is going to be a lot of work to implement the work arounds, I would suggest using the version you were previously using, since should be released very soon and any work arounds will be redundant.


  • Hi Eason,

    Yes, where possible I try to provide support for MSP430-GCC directly. However, if I'm not able to reply within a couple of days then TI should engage with the customer.


  • Hi Jozef,

    It is nice to hear that!