D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 13975 - ICE: dmd crash if -gc and enum member is immutable int
Summary: ICE: dmd crash if -gc and enum member is immutable int
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P1 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2015-01-13 11:27 UTC by basile-z
Modified: 2020-03-21 03:56 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description basile-z 2015-01-13 11:27:03 UTC
dmd crashes when compiling the following program:

---
static immutable int a = 8;
enum Bar {aa = a}

void foo(Bar bar){}

void main(){}
---

only with the switches:
-debug -gc

the crash doesn't happend when a is declared as
- static const int a = 8;
- static immutable short a = 8;
- static immutable uint a = 8;
more generally it happens only if a is (optionnaly static) immutable int

dmd version: 2.066.1
os: windows 7 32 bit
Comment 1 Benjamin Thaut 2015-02-20 18:31:36 UTC
This also crashes with when compiling only with "-g" this seems to be a general issue debug symbol generation on windows.
Comment 2 Rainer Schuetze 2016-03-31 06:42:32 UTC
https://github.com/D-Programming-Language/dmd/pull/5611
Comment 3 github-bugzilla 2016-04-03 07:05:13 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/5601d515db803b086ac497c8f63ba104c81e082b
fix issue 13975: add missing masking of Tty

https://github.com/D-Programming-Language/dmd/commit/af845b79526f6b2ad95fcdfbdd80d2b349e145f6
Merge pull request #5611 from rainers/fix_13975

fix issue 13975 - ICE: dmd crash if -gc and enum member is immutable int
Comment 4 github-bugzilla 2016-10-01 11:45:50 UTC
Commits pushed to stable at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/5601d515db803b086ac497c8f63ba104c81e082b
fix issue 13975: add missing masking of Tty

https://github.com/dlang/dmd/commit/af845b79526f6b2ad95fcdfbdd80d2b349e145f6
Merge pull request #5611 from rainers/fix_13975