Skip to content

ICE? on nested assert(0) #22254

@Herringway

Description

@Herringway

With DMD 2.111 on windows, compiling the following program results in a dmd segfault (LDC is also affected):

void main() {
	assert(assert(0, ""), "");
}

DMD output:

function: _Dmain
el:000001D414EB9690 cnt=1 cs=0 rpair TYucent 000001D414EB8CF0 000001D414EB8BA0
 el:000001D414EB8CF0 cnt=0 cs=255 relconst TY*  0+& __a11_2e5c617373657274332e64
 el:000001D414EB8BA0 cnt=0 cs=255 const TYulong 11LL

This appears to have been failing since DMD 2.097.

assert(assert(0));, assert(assert(0), ""); and assert(assert(0, "")); all compile successfully and produce the expected assertion error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions