[Issue 3046] New: Segfault with C++ static variable

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 2 07:01:36 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3046

           Summary: Segfault with C++ static variable
           Product: D
           Version: 2.030
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: rsinfu at gmail.com


The compiler segfaults compiling this invalid code:
--------------------
class C
{
extern(C++):
    static int var; // C++ variable should be error
}
--------------------

The segfault happend in cpp_mangle_name() (cppmangle.c):
--------------------
    FuncDeclaration *fd = s->isFuncDeclaration();
    if (fd->isConst())  <-- HERE
        buf->writeByte('K');
--------------------

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


More information about the Digitalmars-d-bugs mailing list