Bug 1296 – ICE when object.d is missing things

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2007-06-28T08:43:00Z
Last change time
2015-06-09T05:15:17Z
Keywords
ice-on-invalid-code
Assigned to
ibuclaw
Creator
madou

Comments

Comment #0 by madou — 2007-06-28T08:43:11Z
cc1d segfaults when trying to compile an object.d source file that's missing certain things, instead of giving a an error message. An object.d file containing only an empty Object class is the simplest test case that reproduces the error. --------- object.d --------- class Object { } ---------------------------- Program received signal SIGSEGV, Segmentation fault. 0x000000000047c682 in ClassDeclaration::toSymbol (this=0xd44710) at ../../gcc/d/d-decls.cc:677 677 decl = build_decl( VAR_DECL, get_identifier( csym->Sident ), This is the stack trace: #0 0x000000000047c682 in ClassDeclaration::toSymbol (this=0xd44710) at ../../gcc/d/d-decls.cc:677 #1 0x0000000000475a15 in ClassDeclaration::toObjFile (this=0xd44710) at ../../gcc/d/dmd/toobj.c:376 #2 0x0000000000485c85 in Module::genobjfile (this=0xd44470) at ../../gcc/d/d-glue.cc:2614 #3 0x000000000047a74f in d_parse_file () at ../../gcc/d/d-lang.cc:941 #4 0x00000000006f0128 in toplev_main (argc=<value optimized out>, argv=0x8) at ../../gcc/toplev.c:991 #5 0x0000000000837345 in __libc_start_main () #6 0x00000000004001b9 in _start ()
Comment #1 by ibuclaw — 2010-08-07T16:52:56Z
Fixed in hg commit 172 / release 0.25