www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20247] New: ICE: access violation

https://issues.dlang.org/show_bug.cgi?id=20247

          Issue ID: 20247
           Summary: ICE: access violation
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: Bastiaan Veelo.net

Compiling the following snippet using dmd 2.088.0

```d
int[] soov;
bool a_is_kleiner_dan_b(int a, int b)
{
    return afstand_2_tussen_twee_punten() + soov[a] ^^ 2 <
           afstand_2_tussen_twee_punten() + soov[b] ^^ 2;
}

double afstand_2_tussen_twee_punten()
{
    return 1.0;
}
```

Produces the following output:

---
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   DigitalMars Windows CRuntime_DigitalMars CppRuntime_DigitalMars
LittleEndian D_Version2 all D_InlineAsm D_InlineAsm_X86 X86 Win32 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
---

object.Error (0): Access Violation
----------------
0x006526B7
0x0065A151
0x76ECADEE in RtlAllocateHeap
0x006F6B92
0x76ED09D2 in RtlReAllocateHeap
0x76ECB02F in RtlAllocateHeap
0x76ECADEE in RtlAllocateHeap
0x006F6B92
0x005E537B
0x005472AB
0x00703CD7
0x00703C51
0x00703AEC
0x0054723E
0x76006359 in BaseThreadInitThunk
0x76EF7B74 in RtlGetAppContainerNamedObjectPath
0x76EF7B44 in RtlGetAppContainerNamedObjectPath

--
Sep 27 2019