Bug 23768 – ImportC: ICE on nested C initializer

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-03-09T16:19:30Z
Last change time
2023-07-02T13:41:40Z
Keywords
ImportC, pull
Assigned to
No Owner
Creator
Dennis

Comments

Comment #0 by dkorpel — 2023-03-09T16:19:30Z
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}}} }; } ```
Comment #1 by dlang-bot — 2023-06-24T06:47:37Z
@WalterBright created dlang/dmd pull request #15344 "fix Issue 23768 - ImportC: ICE on nested C initializer" fixing this issue: - fix Issue 23768 - ImportC: ICE on nested C initializer https://github.com/dlang/dmd/pull/15344
Comment #2 by dlang-bot — 2023-06-25T19:59:37Z
dlang/dmd pull request #15344 "fix Issue 23768 - ImportC: ICE on nested C initializer" was merged into stable: - d18a437859b28579caae0f31df3e5fc505adc7de by Walter Bright: fix Issue 23768 - ImportC: ICE on nested C initializer https://github.com/dlang/dmd/pull/15344
Comment #3 by dlang-bot — 2023-07-02T13:41:40Z
dlang/dmd pull request #15373 "merge stable" was merged into master: - 9f93c644fcf1c11e445b3a274e756de0dedcaef8 by Walter Bright: fix Issue 23768 - ImportC: ICE on nested C initializer (#15344) https://github.com/dlang/dmd/pull/15373