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.

TI CC 5.2.7 internal error / crash



=== begin test.c ===

struct foo {
  int bar;
  union {
    int baz;
  } ubaz;
};

struct foo my_fun1() {
  struct foo res = {0, {}};
  return res;
}

struct foo my_fun2() {
  struct foo res = {0, {.baz = 0}};
  return res;
}

=== end test.c ===

compiling this code causes an internal compiler error:

===

$ armcl -mv7M4 --c99 -I/opt/ti-cgt-arm_5.2.7/include -c --output_file test.o test.c
>> INTERNAL ERROR: ILLEGAL INITIALIZATION

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.

Note: May loose variable initialization information

... continuing compilation ...

===

if the foo member is removed, then the result is an outright crash ("INTERNAL ERROR: armcg experienced a segmentation fault").

the problem seems to be in the empty ubaz member initializer used in my_fun1.

  • Thank you for notifying us about this problem, and for submitting a well defined test case.  I can reproduce it.  I filed CODEGEN-1311 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