[Issue 23768] New: ImportC: ICE on nested C initializer

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 9 16:19:30 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23768

          Issue ID: 23768
           Summary: ImportC: ICE on nested C initializer
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ImportC
          Severity: normal
          Priority: P4
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: dkorpel at live.nl

This one results in an endless loop:
```C
typedef struct {
  union {
    struct {
      int o;
    } f;
  };
} S;

void f(void) {
    S data = (S) {
      {.f = {.o = 0}}
    };
}

```

And this one results in `src/dmd/initsem.d(958): Assertion failure`:
```C
typedef struct {
  union {
    struct {
      struct {
        int o;
      } f;
    };
  };
} S;

void f(void) {
    S data = (S) {
      {{.f = {.o = 0}}}
    };
}
```

--


More information about the Digitalmars-d-bugs mailing list