Bug 20276 – DMD v2.088.0 Compile with dub fails due to an illegal instruction

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2019-10-07T09:17:51Z
Last change time
2020-02-27T19:08:20Z
Assigned to
No Owner
Creator
Doug Clayton

Attachments

IDFilenameSummaryContent-TypeSize
1763directx.7zDirectX Binding codeapplication/x-7z-compressed110088
1764directx.7zSample Project with DirectX codeapplication/x-7z-compressed110363
1765d3d11sdklayers.dReducedtext/x-dsrc62641

Comments

Comment #0 by dougclayton4231 — 2019-10-07T09:17:51Z
Created attachment 1763 DirectX Binding code Hi, I've had no problems compiling my project with DMD v2.087.0 but after upgrading to DMD v2.088.0, I get this error: > Executing task in folder HurricaneEngine: dub build --build=debug < Performing "debug" build using C:\D\dmd2\windows\bin\dmd.exe for x86_64. hurricane ~master: building configuration "application"... --- ERROR: This is a compiler bug. Please report it via https://issues.dlang.org/enter_bug.cgi with, preferably, a reduced, reproducible example and the information below. DustMite (https://github.com/CyberShadow/DustMite/wiki) can help with the reduction. --- DMD v2.088.0-dirty predefs Have_hurricane DigitalMars Windows CRuntime_Microsoft CppRuntime_Microsoft LittleEndian D_Version2 all D_SIMD D_InlineAsm_X86_64 X86_64 Win64 D_LP64 assert D_ModuleInfo D_Exceptions D_TypeInfo D_HardFloat binary C:\D\dmd2\windows\bin\dmd.exe version v2.088.0-dirty config C:\D\dmd2\windows\bin\sc.ini DFLAGS -IC:\D\dmd2\windows\bin\..\..\src\phobos -IC:\D\dmd2\windows\bin\..\..\src\druntime\import -L/OPT:NOICF --- object.Error@(0): Illegal Instruction ---------------- 0x00629442 C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1. The terminal process terminated with exit code: 2 I use Visual Studio code to run my compiles, but it seems like my bindings to the DirectX API are causing it. Can someone take a look?
Comment #1 by dlang-bugzilla — 2019-10-07T09:22:31Z
Please post a command line which reproduces the problem for you with the files you attached. With DMD 2.088.0 under Wine, dmd -g -debug -lib *.d succeeds.
Comment #2 by dougclayton4231 — 2019-10-08T10:58:02Z
Created attachment 1764 Sample Project with DirectX code Full sample project with directx code in proper file structure.
Comment #3 by dougclayton4231 — 2019-10-08T11:00:55Z
Hi Vladimir, I just uploaded a sample project that 100% repros the compiler error for me. I ran 'dub build' on the project to get the compiler error. I'm not sure of the exact command line output that 'dub build' produces. Thanks, Doug
Comment #4 by dlang-bugzilla — 2019-10-08T22:03:17Z
Created attachment 1765 Reduced Reproducible with attached file and command: dmd.exe -m64 -g d3d11sdklayers.d Looks like some problem with debug information and very large enums. Declaring each enum member as its own enum (manifest) constant may be a workaround.
Comment #5 by r.sagitario — 2020-02-27T19:08:20Z