https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118765

--- Comment #12 from Hime Haieto <himehaieto at gmail dot com> ---
This is a good weekend indeed!  While I can't say that all is well, this patch
is good progress - at least one of my non-toy sources compiles/works correctly
now with workarounds.

It seems like if you typedef, then redeclare the struct (with or without being
part of a typedef), then you get problems the moment you make a third typedef
(ordering doesn't seem to matter much).  Try adding a third copy of the typedef
at the end of the test case you were using:

typedef struct q { int x; } q_t;
struct q { int x; };
typedef struct q { int x; } q_t;
typedef struct q { int x; } q_t;

In fact, you don't even need to declare the struct contents with the typedef -
the following also breaks:

struct q { int x; };
typedef struct q q_t;
struct q { int x; };
typedef struct q q_t;
typedef struct q q_t;

Reply via email to