[Issue 12460] New: Crash with goto and static if

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 25 02:56:14 PDT 2014


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

           Summary: Crash with goto and static if
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: code at benjamin-thaut.de


--- Comment #0 from Benjamin Thaut <code at benjamin-thaut.de> 2014-03-25 02:56:11 PDT ---
The following will create a access violation by accessing a null pointer in
statement.c line 5212 (LabelStatement::syntaxCopy)

void func(T)()
{
  static if(is(T == int))
  {
    goto end;
  }
  end:
}

void main(string[] args)
{
  func!int();
}

I tested this with dmd 2.065

-- 
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