← Back to index
|
Original Bugzilla link
Bug 7380 – Crash trying to use address of variable in struct constructor at module level
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2012-01-27T11:22:00Z
Last change time
2012-04-02T01:20:58Z
Keywords
ice
Assigned to
nobody
Creator
smjg
Comments
Comment #0
by smjg — 2012-01-27T11:22:22Z
DMD 2.057, Windows Vista 32-bit ---------- struct TestStruct { this(int* d) {} } int xm; auto tsm = TestStruct(&xm); ---------- C:\Users\Stewart\Documents\Programming\D\Tests\bugs>dmd inout_ctor_bug.d inout_ctor_bug.d(6): Error: static variable xm cannot be read at compile time ---------- Problem signature: Problem Event Name: APPCRASH Application Name: dmd.exe Application Version: 0.0.0.0 Application Timestamp: 00000000 Fault Module Name: dmd.exe Fault Module Version: 0.0.0.0 Fault Module Timestamp: 00000000 Exception Code: c0000005 Exception Offset: 0007e672 OS Version: 6.0.6002.2.2.0.768.3 Locale ID: 2057 Additional Information 1: 482b Additional Information 2: fe3cbbb77b564d5f0cb2cc6fc75b3c2f Additional Information 3: 73f1 Additional Information 4: 1e2657c1444006182528bd2953dbb394 ---------- The error message the compiler actually emits seems correct, but the crash certainly isn't.
Comment #1
by github-bugzilla — 2012-03-30T18:44:00Z
Commits pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/648777b74259462eaa402b657411f2bd5950c9b0
Fix issue 7380 Crash trying to use address of variable in struct constructor at module level
https://github.com/D-Programming-Language/dmd/commit/7536fd03d1326cbf5c327cce87f398dfbd46368d
Merge pull request #853 from donc/segfault7380 Fix issue 7380 segfault trying to use address of global variable in CTFE
Comment #2
by clugdbug — 2012-04-02T01:20:58Z
D1 merge
https://github.com/D-Programming-Language/dmd/commit/11d3b001ee0db391710e4bedcfd98b354f82862e