FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 05-15-2010, 01:32 AM
Daniel Gibson
 
Default Bug#581698: gdc 4.3 fails on anonymous nested classes

Package: gdc-4.3
Version: 1:1.046-4.3.4-5
Severity: serious


Hi,

gdc-4.3 fails to compile code with anonymous nested classes. gdc-4.1
and dmd seem to have no problems, at least not with my code.
If I try to extend Thread, I get the following compiletime-error:

caedes@snaggletux:~/D_stuff$ gdc-4.3 gdc_bug.d
gdc_bug.d: In function ‘test1’:
gdc_bug.d:26: internal compiler error: in estimate_num_insns_1, at
tree-inline.c:2494
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gdc-4.3/README.Bugs> for instructions.

With a (simple) custom class, I get the following error:

caedes@snaggletux:~/D_stuff$ gdmd-4.3 gdc_bug.d
gdc_bug.o: In function `_D7gdc_bug5test2FZv':
gdc_bug.d.text+0x7a): undefined reference to
`_D7gdc_bug5test2FZv12__anonclass25_ctorMFZC7gdc_b ug5test2FZv12__anonclass2'
gdc_bug.o.data+0xc4): undefined reference to
`_D7gdc_bug5test2FZv12__anonclass25_ctorMFZC7gdc_b ug5test2FZv12__anonclass2'
gdc_bug.o.rodata+0x60): undefined reference to
`_D7gdc_bug5test2FZv12__anonclass23barMFZi'
collect2: ld returned 1 exit status

I've attached the testing-code and the verbose output of gdmd -v.

I consider this a serious bug because anonymous nested classes are a
standard feature of D.

Cheers,
- Daniel


--- System information. ---
Architecture: i386
Kernel: Linux 2.6.32-3-686

Debian Release: squeeze/sid
500 testing security.debian.org
500 testing ftp.de.debian.org

--- Package information. ---
Depends (Version) | Installed
=========================================-+-====================
gcc-4.3-base (>= 4.3.4-1) | 4.3.4-10
g++-4.3 (>= 4.3.4-1) | 4.3.4-10
libphobos-4.3-dev (= 1:1.046-4.3.4-5) | 1:1.046-4.3.4-5
libc6 (>= 2.3) | 2.10.2-6
libgcc1 (>= 1:4.1.1) | 1:4.4.4-1
libgmp3c2 | 2:4.3.2+dfsg-1
libmpfr1ldbl | 2.4.2-3
libstdc++6 (>= 4.1.1) | 4.4.4-1


Package's Recommends field is empty.

Package's Suggests field is empty.
####### bug==1 - Thread ##########
caedes@snaggletux:~/D_stuff$ gdmd-4.3 -v gdc_bug.d
parse gdc_bug
semantic gdc_bug
import object (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/object.d)
import std.stdio (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/stdio.d)
import std.c.stdio (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/c/stdio.d)
import std.stdint (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/stdint.d)
import gcc.builtins (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/gcc/builtins.d)
import std.c.stddef (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/c/stddef.d)
import gcc.config.libc (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/i486-linux-gnu/gcc/config/libc.d)
import std.c.stdarg (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/c/stdarg.d)
import std.format (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/format.d)
import std.stdarg (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/stdarg.d)
import std.utf (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/utf.d)
import std.c.stdlib (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/c/stdlib.d)
import gcc.config.errno (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/i486-linux-gnu/gcc/config/errno.d)
import gcc.config.config (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/i486-linux-gnu/gcc/config/config.d)
import std.c.string (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/c/string.d)
import std.string (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/string.d)
import std.uni (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/uni.d)
import std.array (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/array.d)
import std.ctype (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/ctype.d)
import std.gc (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/gc.d)
import gcstats (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/gcstats.d)
import gcc.config.unix (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/i486-linux-gnu/gcc/config/unix.d)
import std.thread (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/thread.d)
import std.c.linux.linux (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/c/linux/linux.d)
import std.c.unix.unix (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/c/unix/unix.d)
import std.c.dirent (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/c/dirent.d)
import std.intrinsic (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/intrinsic.d)
import std.c.linux.linuxextern (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/c/linux/linuxextern.d)
import gcc.threadsem (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/gcc/threadsem.d)
semantic2 gdc_bug
semantic3 gdc_bug
code gdc_bug
gdc_bug.d: In function ‘test1’:
gdc_bug.d:26: internal compiler error: in estimate_num_insns_1, at tree-inline.c:2494
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gdc-4.3/README.Bugs> for instructions.

####### bug==2 - my own class ##########
caedes@snaggletux:~/D_stuff$ gdmd-4.3 -v gdc_bug.d
parse gdc_bug
semantic gdc_bug
import object (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/object.d)
import std.stdio (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/stdio.d)
import std.c.stdio (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/c/stdio.d)
import std.stdint (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/stdint.d)
import gcc.builtins (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/gcc/builtins.d)
import std.c.stddef (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/c/stddef.d)
import gcc.config.libc (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/i486-linux-gnu/gcc/config/libc.d)
import std.c.stdarg (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/c/stdarg.d)
import std.format (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/format.d)
import std.stdarg (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/stdarg.d)
import std.utf (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/utf.d)
import std.c.stdlib (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/c/stdlib.d)
import gcc.config.errno (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/i486-linux-gnu/gcc/config/errno.d)
import gcc.config.config (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/i486-linux-gnu/gcc/config/config.d)
import std.c.string (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/c/string.d)
import std.string (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/string.d)
import std.uni (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/uni.d)
import std.array (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/array.d)
import std.ctype (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/ctype.d)
import std.gc (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/gc.d)
import gcstats (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/gcstats.d)
import gcc.config.unix (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/i486-linux-gnu/gcc/config/unix.d)
import std.thread (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/thread.d)
import std.c.linux.linux (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/c/linux/linux.d)
import std.c.unix.unix (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/c/unix/unix.d)
import std.c.dirent (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/c/dirent.d)
import std.intrinsic (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/intrinsic.d)
import std.c.linux.linuxextern (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/std/c/linux/linuxextern.d)
import gcc.threadsem (/usr/lib/gcc/i486-linux-gnu/4.3.4/../../../../include/d/4.3.4/gcc/threadsem.d)
semantic2 gdc_bug
semantic3 gdc_bug
code gdc_bug
gdc_bug.o: In function `_D7gdc_bug5test2FZv':
gdc_bug.d.text+0x7a): undefined reference to `_D7gdc_bug5test2FZv12__anonclass25_ctorMFZC7gdc_b ug5test2FZv12__anonclass2'
gdc_bug.o.data+0xc4): undefined reference to `_D7gdc_bug5test2FZv12__anonclass25_ctorMFZC7gdc_b ug5test2FZv12__anonclass2'
gdc_bug.o.rodata+0x60): undefined reference to `_D7gdc_bug5test2FZv12__anonclass23barMFZi'
collect2: ld returned 1 exit status
 

Thread Tools




All times are GMT. The time now is 03:31 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org