https://issues.dlang.org/show_bug.cgi?id=24070
Issue ID: 24070
Summary: Opaque struct with nested definition when taking
pointer segfaults
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
>From QBE parse.c + all.h:
```c
typedef struct Typ Typ;
typedef struct Field Field;
struct Typ {
struct Field {
} (*fields)[1];
};
static void parse() {
Typ* ty;
void* fields = &ty->fields;
}
```
Remove either the fields variable declaration (the expression is the problem)
in parse or the Field typedef and it'll compile ok otherwise it'll crash.
--