[Issue 12498] New: while(string) causes compiler to crash during CTFE

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 31 04:48:39 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12498

           Summary: while(string) causes compiler to crash during CTFE
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: olav at lindekleiv.com


--- Comment #0 from Olav Lindekleiv <olav at lindekleiv.com> 2014-03-31 04:48:35 PDT ---
Example: http://dpaste.dzfl.pl/31b055067ef4

This fails because the while is being checked against a string. Replace "enum"
with "string" in main, and it compiles and executes at runtime.

I also posted this to the forums, which contains the link to a longer example
(after Dustmite, but before manual cleanups):
http://forum.dlang.org/thread/jpkvrfzooezplmckofjt@forum.dlang.org#post-qxaqnmoifiubktfuyjcw:40forum.dlang.org

It works on LDC 1.076 and DMD 2.x Git (cfb5842b49) (how old is that?),
according to Dpaste, but not on DMD 2.065 (both Dpaste and my Ubuntu 64bit).

- Olav.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list