A new regression from the inlining fix
Neil Booth
neil@daikokuya.demon.co.uk
Fri Dec 14 00:19:00 GMT 2001
Jason,
The inline fix in toplev.c causes g++.jason/2371.C to fail, with log:
Executing on host: /home/neil/src/gcc/build/gcc/testsuite/../g++ -B/home/neil/src/gcc/build/gcc/testsuite/../ /home/neil/src/gcc/gcc/testsuite/g++.old-deja/g++.jason/2371.C -nostdinc++ -I/home/neil/src/gcc/build/i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu -I/home/neil/src/gcc/build/i686-pc-linux-gnu/libstdc++-v3/include -I/home/neil/src/gcc/libstdc++-v3/libsupc++ -I/home/neil/src/gcc/libstdc++-v3/libio -I/home/neil/src/gcc/libstdc++-v3/include/backward -I/home/neil/src/gcc/libstdc++-v3/testsuite -fmessage-length=0 -lstdc++ -L/home/neil/src/gcc/build/i686-pc-linux-gnu//libstdc++-v3/src/.libs -L/home/neil/src/gcc/build/i686-pc-linux-gnu//libiberty -lm -o /home/neil/src/gcc/build/gcc/testsuite/g++-jason-2371-C.exe (timeout = 300)
/tmp/ccjpWcCp.o: In function `operator<<(std::ostream&, test const&)':
/tmp/ccjpWcCp.o(.text+0x2a): undefined reference to `test::print(std::ostream&) const'
/tmp/ccjpWcCp.o: In function `operator<<(std::ostream&, SetLS<test> const&)':
/tmp/ccjpWcCp.o(.text+0x10f): undefined reference to `test::print(std::ostream&) const'
/tmp/ccjpWcCp.o: In function `foo()':
/tmp/ccjpWcCp.o(.text+0x17f): undefined reference to `test::test(int)'
/tmp/ccjpWcCp.o(.text+0x1dd): undefined reference to `test::test(int)'
collect2: ld returned 1 exit status
compiler exited with status 1
output is:
/tmp/ccjpWcCp.o: In function `operator<<(std::ostream&, test const&)':
/tmp/ccjpWcCp.o(.text+0x2a): undefined reference to `test::print(std::ostream&) const'
/tmp/ccjpWcCp.o: In function `operator<<(std::ostream&, SetLS<test> const&)':
/tmp/ccjpWcCp.o(.text+0x10f): undefined reference to `test::print(std::ostream&) const'
/tmp/ccjpWcCp.o: In function `foo()':
/tmp/ccjpWcCp.o(.text+0x17f): undefined reference to `test::test(int)'
/tmp/ccjpWcCp.o(.text+0x1dd): undefined reference to `test::test(int)'
collect2: ld returned 1 exit status
FAIL: g++.jason/2371.C (test for excess errors)
/tmp/ccjpWcCp.o(.text+0x2a): undefined reference to `test::print(std::ostream&) const'
/tmp/ccjpWcCp.o(.text+0x10f): undefined reference to `test::print(std::ostream&) const'
/tmp/ccjpWcCp.o(.text+0x17f): undefined reference to `test::test(int)'
/tmp/ccjpWcCp.o(.text+0x1dd): undefined reference to `test::test(int)'
collect2: ld returned 1 exit status
It looks to me like my patch has uncovered an inlining issue
elsewhere. It appears that something is getting tree inlined and not
put in the object file when it should be, or a reference to it is not
being removed when it should be. Or maybe the test requires extra
flags?
Anyway, I have no idea how to fix this. Do you want me to revert the
toplev.c fix? It looked (and looks) OK to me.
Neil.
More information about the Gcc
mailing list