[Issue 1507] ICE on a variadic function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Sep 17 03:42:14 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1507
------- Comment #3 from onlystupidspamhere at yahoo.se 2007-09-17 05:42 -------
(In reply to comment #2)
> Jari-Matti, I just tried the one line'er you included in the original report:
>
> void c (int f, ...) { c (_arguments, _argptr, f); }
>
> as bug.d with gdc built as debian package 4.1.2-16, which contains up through
> this set of bug fixes (it doesn't mention the specific svn revision):
>
> gdc-4.1 (0.24-4.1.2-16) unstable; urgency=low
>
> * Merge debian SVN from 4.1.2-16 upload
>
> [Arthur Loiret]
> * svn-gdc-updates.dpatch: Update to SVN 20070829. Closes: #439836
> - d-decls.cc (uniqueName): Allow multiple static declaration with the same
> name if in a function. (SF 1783085)
> - d-codegen.cc (call): Use CommaExp correctly. (Bugzilla 1443)
> - dmd/todt.c (createTsarrayDt): Don't take quadratic time to build the
> initializer. (Bugzilla 1440)
>
> [Matthias Klose]
> * gdc-4.1: Loosen dependency on g++-4.1.
>
> -- Arthur Loiret <arthur.loiret at gmail.com> Sat, 01 Sep 2007 00:49:23 +0200
Ok, so your version is at least rev149. Are you running it in x86-64?
I can post here my installation notes if it helps:
tar xf gcc-core-4.1.2.tar.bz2
svn co https://dgcc.svn.sourceforge.net/svnroot/dgcc/trunk/ svn
cd gcc-4.1.2/gcc/
ln -s ../../svn/d .
cd ..
gcc/d/setup-gcc.sh
./configure --prefix=/usr/local/gcc-4.1.2 --enable-languages=c,d
--disable-multilib
make -j3
sudo make install
echo "void c (int f, ...) { c (_arguments, _argptr, f); }" > bug.d
/usr/local/gcc-4.1.2/bin/gdc -c bug.d
=> segmentation fault
> It fails to build, but due to errors in the provided one line bit of code:
>
> bug.d:1: function bug.c (int,...) does not match parameter types
> (TypeInfo[],char*,int)
> bug.d:1: Error: cannot implicitly convert expression (_arguments) of type
> TypeInfo[] to int
Yes, the code in invalid so that is what I get with dmd too. I seem to have
problems compiling 32bit GDC so I can only test x86_64 -version at the moment.
I have no idea how to debug gdc - e.g. gdb gave no backtrace.
> Is that the exact code that caused your failure?
Yes. I tried it again by just copying the line from the bug report to a file
and compiling it.
I'll try to run GDC in a Gentoo virtual machine later today to see if it fails
there too.
--
More information about the D.gnu
mailing list