This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 13722 candidate fix
"Zack Weinberg" <zack@codesourcery.com> writes:
> Re-revised patch.
Seems to miscompile the stage2 compiler.
$ stage2/xgcc -Bstage2/ -B/usr/local/ia64-suse-linux/bin/ -c -g -O2 -gnatpg -gnata -I- -I. -Iada -I../../gcc/ada ../../gcc/ada/ada.ads -o ada/ada.o -v
Reading specs from stage2/specs
Configured with: ../configure --host=ia64-suse-linux --enable-shared --enable-threads --with-system-zlib
Thread model: posix
gcc version 3.5.0 20040123 (experimental)
stage2/gnat1 -I- -I. -Iada -I../../gcc/ada -quiet -dumpbase ada.ads -g -gnatpg -gnata -O2 -gnatO ada/ada.o ../../gcc/ada/ada.ads -o /tmp/ccR0NvnR.s
fatal error, run-time library not installed correctly
cannot locate file system.ads
compilation abandoned
strace shows that gnat1 wants to stat() "" three times, whereas the stage1
compiler searches for "./system.ads", "ada/system.ads",
"../../gcc/ada/system.ads" in that order. Looking at the contents of the
empty strings shows that they actually point to "\0/system.ads",
"\0\0\0/system.ads" and "\0\0\0\0\0\0\0\0\0\0\0\0\0/system.ads", ie. the
characters before "/system.ads" are replaced by '\0'.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."