Bug 11075 – ICE(struct.c) after gagged error in struct field initializer

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-09-20T11:11:00Z
Last change time
2014-03-23T03:41:11Z
Keywords
ice
Assigned to
nobody
Creator
clugdbug

Comments

Comment #0 by clugdbug — 2013-09-20T11:11:04Z
This is a minor change to fail_compilation/ice9806.d from the test suite. struct S1() { int x = undefined_expr; } void test1() { static assert(!is(typeof(S1!().x))); static assert(!is(typeof(S1!().x))); } --- dmd: struct.c:787: virtual void StructDeclaration::semantic(Scope*): Assertion `type->ty != Tstruct || ((TypeStruct *)type)->sym == this' failed. Aborted I found this by enabling full validity checking in CTFE.
Comment #1 by clugdbug — 2013-09-23T00:39:18Z
Bug 11022 is probably a duplicate. The cause is, that AggregatedDeclaration::semantic2 may encounter errors in initializers, but it doesn't mark the struct as having an error.
Comment #2 by bugzilla — 2013-10-01T18:20:05Z
Comment #3 by bugzilla — 2013-10-01T18:47:06Z
*** Issue 11022 has been marked as a duplicate of this issue. ***
Comment #4 by bugzilla — 2013-10-08T22:32:06Z
*** Issue 10975 has been marked as a duplicate of this issue. ***
Comment #5 by bugzilla — 2013-10-08T22:33:27Z
Comment #6 by github-bugzilla — 2013-10-10T23:39:17Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6edc44fa634dc299368c3a9265c232f79c7e3030 fix Issue 11075 - ICE(struct.c) after gagged error in struct field initializer https://github.com/D-Programming-Language/dmd/commit/d6ed310ead5aad02eac5ce25dc63c22b0da343a9 Merge pull request #2645 from WalterBright/fix11075-2 fix Issue 11075 - ICE(struct.c) after gagged error in struct field initializer
Comment #7 by k.hara.pg — 2013-11-21T20:09:09Z
*** Issue 10832 has been marked as a duplicate of this issue. ***
Comment #8 by github-bugzilla — 2014-03-23T03:41:11Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/fceb16bbf772b0130348394210dc6fdef95fdcf1 More better fix for issue 11075 to reproduce semantic3 errors in already failed template instance