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.

Compiler/TM4C1294NCPDT: Bug report : switch-case on the new C++ enum class produces an internal error

Part Number: TM4C1294NCPDT

Tool/software: TI C/C++ Compiler

enum class MyEnum : char {
  Value0 = 0,
  Value1 = 1,
  Value2 = 2
};

void main() {
MyEnum val = MyEnum::Value1;
switch(val) {
case MyEnum::Value1: {
  break;
}
case MyEnum::Value2: {
  break;
}
}

Compiler: Ti Arm 18.9.0

Compiler call: 

Building file: "../main.cpp"
Invoking: ARM Compiler
"C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.9.0.STS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --opt_for_speed=0 --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.9.0.STS/include"  --advice:power="all" --define=__DEBUG --define=ccs="ccs" --define=TARGET_IS_SNOWFLAKE_RA0 --define=USE_EK_TM4C1294XL --define=PART_TM4C1294NCPDT -g --c99 --c++14 --gcc --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --ual --preproc_with_compile --preproc_dependency="main.d_raw" "../main.cpp"


>> Compilation failure
subdir_rules.mk:16: recipe for target 'main.obj' failed
>> ../main.cpp, line 13: INTERNAL ERROR: no match for MINUS


This may be a serious problem. Please contact customer support with a
description of this problem and a sample of the source files that caused this
INTERNAL ERROR message to appear.

Cannot continue compilation - ABORTING!

  • Thank you for reporting this problem, and submitting a concise test case.  I can reproduce the same result.  I filed CODEGEN-5558 in the SDOWP system to have this investigated.  You are welcome to follow it with the SDOWP link below in my signature.

    Thanks and regards,

    -George