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.

TM4C123GH6PM: ti-cgt-arm_20.2.5.LTS\bin\armacpia.exe experienced a segmentation fault

Part Number: TM4C123GH6PM

I have a project that compiles as C code, but which I want to compile as C++, so I selected the --cpp_default option.  Most of my files compile without complaint, but one causes the compiler to crash.  I tried three different compiler versions, 20.2.0, 20.2.4 and 20.2.5, all of which crash with essentially the same message.  20.2.5 appears to be the current release per https://www.ti.com/tool/ARM-CGT#downloads, so upgrading the compiler doesn't seem to be an available remedy.  The compiler output (from the CCS console) is

**** Build of configuration Debug for project SystemControl ****

"C:\\ti\\ccs1000\\ccs\\utils\\bin\\gmake" -k -j 12 moduleDetection.obj -O 
 
Building file: "../moduleDetection.c"
Invoking: Arm Compiler
"C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-arm_20.2.0.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -O2 --include_path="C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-arm_20.2.0.LTS/include" --include_path="C:/ti/TivaWare_C_Series-2.1.4.178" --include_path="C:/ti/TivaWare_C_Series-2.1.4.178" --define=ccs="ccs" --define=PART_TM4C123GH6PM -g --relaxed_ansi --cpp_default --gcc --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --check_misra="2.3,3,4,5.3,5.4,6.5,7.1,8.2,8.6,8.7,8.8,8.11,9.1,10.4,11.1,11.2,12.3,12.8,12.9,13.1,13.2,13.3,13.4,13.6,14.1,14.2,14.3,14.8,14.9,14.10,15.4,15.5,16.4,16.5,16.8,17.5,17.6,18.1,19.2,19.3,19.5,19.8,19.9,19.12,19.14,19.16,19.17,20.4,20.5,20.6,20.7,20.8,20.11,20.12" --preproc_with_compile --preproc_dependency="moduleDetection.d_raw"  "../moduleDetection.c"
 
>> Compilation failure
subdir_rules.mk:9: recipe for target 'moduleDetection.obj' failed
"../moduleDetection.c", line 817: warning #1181-D: #warning directive: "is there a better place to handle this?"
"../moduleDetection.c", line 820: warning #1181-D: #warning directive: "do we need to do these checks?"       // we do these checks elsewhere as part of #ifdef SUPPORT_DETECTING_LIKELY_MODULE_TYPE_C_WITHOUT_USING_EEPROM
"../moduleDetection.c", line 847: warning #1181-D: #warning directive: "might need to check for memory module here"
 
INTERNAL ERROR: C:\ti\ccs1000\ccs\tools\compiler\ti-cgt-arm_20.2.0.LTS\bin\armacpia.exe experienced a segmentation fault
                  while processing function detectTypeAndRevisionOfModule file ../moduleDetection.c line 864
 
This is caused by a defect in the TI EABI C/C++ Parser.
TI Customer Support may be able to suggest a workaround to avoid this.
 
Upgrading to the newest version of the compiler may fix this problem.
 
Contact TI in the E2E support forums at http://e2e.ti.com under
"Development Tools", "TI C/C++ Compiler".  See the link titled
"Submitting an issue".
 
We need to see this ENTIRE error message and a complete, reproducible
test case including ALL of the command-line options.
Include the .pp file created by option --preproc_with_comment
 
gmake: *** [moduleDetection.obj] Error 1

**** Build Finished ****

As requested in that message, I added the --preproc_with_comment option (and removed an option it conflicted with), and got a *.pp file.  I don't see an option to attach it to this post, and "dragging it into the editor" as suggested at the bottom of this form doesn't seem to do anything.  I'll try a follow up after posting (why isn't there a simple attach file option?).

The *.pp file seems to be sufficient to reproduce the issue; it causes a segmentation fault if I try to compile it with this command line:

"C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-arm_20.2.0.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -O2 --include_path="C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-arm_20.2.0.LTS/include" --include_path="C:/ti/TivaWare_C_Series-2.1.4.178" --include_path="C:/ti/TivaWare_C_Series-2.1.4.178" --define=ccs="ccs" --define=PART_TM4C123GH6PM -g --relaxed_ansi --cpp_default --gcc --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --check_misra="2.3,3,4,5.3,5.4,6.5,7.1,8.2,8.6,8.7,8.8,8.11,9.1,10.4,11.1,11.2,12.3,12.8,12.9,13.1,13.2,13.3,13.4,13.6,14.1,14.2,14.3,14.8,14.9,14.10,15.4,15.5,16.4,16.5,16.8,17.5,17.6,18.1,19.2,19.3,19.5,19.8,19.9,19.12,19.14,19.16,19.17,20.4,20.5,20.6,20.7,20.8,20.11,20.12" --preproc_with_compile "../moduleDetection.pp"

I hope this is the right place to post this issue; the instructions in the compiler output about how to contact TI are apparently outdated, as I didn't find a "development tools" forum (I did find "tools") and I didn't find a ""TI C/C++ Compiler" section (I guessed that Code Composer Studio︎ Group was the best match).  

Steve