Menu

#50 assert failed while compiling

open
nobody
None
5
2008-10-14
2008-10-14
Anonymous
No

Here is console output:

$ gdc main.d
cc1d: ../../src/gcc/d/dmd/interpret.c:1421: Expression* BinExp::interpretAssignCommon(InterState*, Expression* (*)(Type*, Expression*, Expression*), int): Assertion `v' failed.
main.d:0: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.

Here is main.d:

struct S { int i; }
S makeS() { S s; return s; }
void f()
{
static S a = makeS();
static S b = makeS();
}
void main() { }

Here is more info:

$ gdc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,d --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --disable-libmudflap --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.4 20080519 (prerelease gdc 0.25 20071215, using dmd 1.022) (Ubuntu 0.25-4.2.4-1ubuntu1)

$ cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 39
model name : AMD Athlon(tm) 64 Processor 3500+
stepping : 1
cpu MHz : 1000.000
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow up pni lahf_lm ts fid vid ttp tm stc
bogomips : 2010.98
clflush size : 64

$ cat /proc/version
Linux version 2.6.24-21-generic (buildd@palmer) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Mon Aug 25 17:32:09 UTC 2008

Here's my email: kjslag@gmail.com

Discussion


Log in to post a comment.

Auth0 Logo