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 ???

0