www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Issue 1572] New: Compiler crash on x86_64.

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1572

           Summary: Compiler crash on x86_64.
           Product: DGCC aka GDC
           Version: 0.24
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: glue layer
        AssignedTo: dvdfrdmn users.sf.net
        ReportedBy: dlang davidb.org


The attached code segfaults the compiler on x86_64 (binary distribution of
0.24), but does not on x86.

$ /usr/local/gdc64-bin/bin/gdmd -c crash.d 
crash.d:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

$ /usr/local/gdc64-bin/bin/gdmd -q,--version -c crash.d
gdc (GCC) 4.1.2 20070214 (  (gdc 0.24, using dmd 1.020))
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


-- 
Oct 11 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1572






Created an attachment (id=191)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=191&action=view)
Demonstrate crash.


-- 
Oct 11 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1572






The type of "args" is wrong, it should be std.stdarg.va_list (not void*)

http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/Function#PortabilityandVariadicFunctions


-- 
Oct 11 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1572


dvdfrdmn users.sf.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
           Keywords|                            |ice-on-invalid-code
         Resolution|                            |DUPLICATE





The crash has been fixed.  As Anders stated, this is not valid code on x86_64.

*** This bug has been marked as a duplicate of 1507 ***


-- 
Oct 13 2007