Bug 18772 – [ICE] Internal error: dmd\backend\cgcod.c 607 no optimizations

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2018-04-17T16:33:54Z
Last change time
2019-05-21T23:58:25Z
Keywords
ice
Assigned to
No Owner
Creator
ponce

Comments

Comment #0 by aliloko — 2018-04-17T16:33:54Z
Please consider the following program: -------- main.d -------------- float fun(cfloat z) { return z.re; } void main() { cfloat[1] A; float[1] B; int i = 0; double C = fun(A[i] * B[i]); } -------------------------------- Build it with DMD D Compiler v2.079.0 in 64-bit $ rdmd -m32 main.d (Builds and run without problem) $ rdmd -m64 main.d Internal error: dmd\backend\cgcod.c 607
Comment #1 by aliloko — 2018-04-17T16:48:15Z
Successfully reproduced using: dmd_2.079.1 (latest) dmd_2.074.1 dmd_2.070.0 (2 years ago)
Comment #2 by hsteoh — 2018-04-18T14:50:40Z
ICE is always a critical bug.
Comment #3 by uplink.coder — 2018-04-19T13:48:15Z
the ice happens in alignsection, I'll see what else I can come up with.
Comment #4 by sahmi.soulaimane — 2019-05-21T18:19:59Z
This is not an ICE by the way, it compiles. The segfault is when the executable is ran.
Comment #5 by dlang-bot — 2019-05-21T23:58:25Z
dlang/dmd pull request #9828 "Fix issue 18772 - Runtime segfault in _memset" was merged into stable: - 47d51377fba9db0a6e516c08ce96c003ac4f2751 by سليمان السهمي (Suleyman Sahmi): Fix issue 18772 - Runtime segfault in _memset https://github.com/dlang/dmd/pull/9828