This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C11 internal error

Compiling something like this:

typedef char near * SWITCHES_LIST[];
typedef SWITCHES_LIST near * SWITCHES_LIST_POINTER;

typedef struct
{
void near *switches;
} PISTON;

int sub (PISTON *p)
{
int index;

...
if (*((*((SWITCHES_LIST_POINTER) p->switches))[index]))
...

}

I get: "error C11: internal error: (asmgen - triple=t0322)" on "if" row.
These rows has been extracted from a large project. Lowering the "code optmimization level" to 0 does not change anything. But I am not able to reproduce the error in a sample project.
All the project has been "linted" succesfully, so I am quite sure that there are not syntax errors.
I have been able to compile only breaking down the "if" in 2 rows, like:

switches = (SWITCHES_LIST *) piston->forward_switches;
if (*((*switches)[index]))
...

Did somebody have already seen something like this ???

Parents
  • "I get: "error C11: internal error: (asmgen - triple=t0322)" on "if" row."

    Congratulations! You've broken the compiler. Clearly it doesn't like typedef any more than I do.

    Seriously though, you need to report this to Keil. Either you've exceeded the expected limits of the compiler (unlikely) or you've found a bug, albeit one that is handled gracefully.

Reply
  • "I get: "error C11: internal error: (asmgen - triple=t0322)" on "if" row."

    Congratulations! You've broken the compiler. Clearly it doesn't like typedef any more than I do.

    Seriously though, you need to report this to Keil. Either you've exceeded the expected limits of the compiler (unlikely) or you've found a bug, albeit one that is handled gracefully.

Children
No data