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 ARM Compiler v5.2.x generating unexpected errors



Hello,

I've been working on a project with the TM4C123 and have been compiling with TI ARM compiler v5.1.x for over a year. Our code includes a few 3rd-party libraries and as soon as I attempt to compile the project using v5.2.x, I get multiple errors. I could not find detailed notes as to what changed in v5.2.x or if it's really even necessary for us to upgrade. One example that is now generating an error in a 3rd-party library is:

charset=*(*x)++;

Where x is defined as:

unsigned char *(*x);

This is what is displayed to the console when building:

INTERNAL ERROR: Decomposition error

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!

I commented this line out just to see if this was the only problem, but I then got a build error for a static variable that was declared but never used. I would expect this to be a warning and not prevent me from building the project at all.

Whey are these lines only generating errors in v5.2.x? Is there some compile option that I should be enabling that's preventing compatibility with this code?

  • This

    Frederick Simeon said:
    charset=*(*x)++;

    is badly written but legal.

    As is this

    Frederick Simeon said:
    unsigned char *(*x);

    I can't imagine why anyone would write the latter except to test a compiler.

    Is there a compiler specific forum? This looks like a compiler issue.

    One thing I would do is try compiling a file with just those lines.  You may need something additional that you have not recognised to trigger the fault. It's entirely possible the error message is pointing at the wrong culprit.

    Robert

  • Frederick Simeon said:
    One example that is now generating an error in a 3rd-party library is:

    charset=*(*x)++;

    Where x is defined as:

    unsigned char *(*x);

    I tried to repeat the error with the following example. However, this example compiles with the v5.2.6 compiler without error:

    unsigned char text[]= "Hello";
    unsigned char *text_ptr = text;
    
    int main(void) {
        unsigned char *(*x);
        unsigned char charset;
    
        x = &text_ptr;
    
        charset=*(*x)++;
    
        return charset;
    }
    

    Frederick Simeon said:
    Whey are these lines only generating errors in v5.2.x?

    Given that the v5.2.x compiler reports an internal error, I would say that you have found a compiler bug. If you can create a standalone example which generates the compiler error, then you can report the problem on the TI C/C++ Compiler - Forum

  • Hello Frederick,

    I am moving your post to our compiler forum where they can provide more compiler specific expertise and, perhaps, a summary of what has changed in the latest versions of the compiler.
  • I'd appreciate if we could get a test case that allows us to reproduce ...

    Frederick Simeon said:
    INTERNAL ERROR: Decomposition error

    You don't need to send in the entire project.  Preprocess the source file which sees this error, and attach that to your next post.  Indicate exactly which compiler version is used.  And show all the compiler options just as the compiler sees them.

    Thanks and regards,

    -George