Bug 16646 - Precompiled header causes spurious errors in v3 testsuite
Summary: Precompiled header causes spurious errors in v3 testsuite
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: pch (show other bugs)
Version: 4.0.0
: P3 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
Keywords: rejects-valid
Depends on:
Blocks: 14940
  Show dependency treegraph
Reported: 2004-07-20 17:38 UTC by J Wakely (defunct account)
Modified: 2009-11-26 22:06 UTC (History)
3 users (show)

See Also:
Host: i386-unknown-freebsd4.8
Known to work:
Known to fail:
Last reconfirmed: 2005-11-02 01:54:20


Note You need to log in before you can comment on or make changes to this bug.
Description J Wakely (defunct account) 2004-07-20 17:38:12 UTC
	I've seen this problem a few times, but only ever on FreeBSD.

        Basically, running the testsuite FAILs with the diagnostic below
        if a PCH file is found and used. Works OK if the PCH file is deleted.
        All other files seem to work OK, it's only header_cstdio.cc that FAILs.

        I can attach the PCH if needed.

System: FreeBSD buffy.mintel.com 4.8-RC-20030314-JPSNAP FreeBSD 4.8-RC-20030314-JPSNAP #0: Mon Mar 17 13:41:48 GMT 2003 jason@buffy.mintel.co.uk:/usr/src/sys/compile/BUFFY i386

host: i386-unknown-freebsd4.8
build: i386-unknown-freebsd4.8
target: i386-unknown-freebsd4.8
configured with: /home/jw/gcc/src/gcc/configure --prefix=/home/jw/gcc/3.x/ --enable-languages=c,c++ --enable-concept_checks --enable-pch --enable-libstdcxx-debug --with-system-zlib --disable-checking

	The testsuite outputs:

Executing on host: /data/development/jw/tmp/gccbuild/gcc/g++ -shared-libgcc -B/data/development/jw/tmp/gccbuild/gcc/ -nostdinc++ -L/data/development/jw/tmp/gccbuild/i386-unknown-freebsd4.8/libstdc++-v3/src -L/data/development/jw/tmp/gccbuild/i386-unknown-freebsd4.8/libstdc++-v3/src/.libs -B/home/jw/gcc/3.x//i386-unknown-freebsd4.8/bin/ -B/home/jw/gcc/3.x//i386-unknown-freebsd4.8/lib/ -isystem /home/jw/gcc/3.x//i386-unknown-freebsd4.8/include -isystem /home/jw/gcc/3.x//i386-unknown-freebsd4.8/sys-include -g -O2 -D_GLIBCXX_ASSERT -ffunction-sections -fdata-sections -fmessage-length=0 -DLOCALEDIR="/data/development/jw/tmp/gccbuild/i386-unknown-freebsd4.8/libstdc++-v3/po/share/locale" -nostdinc++ -I/data/development/jw/tmp/gccbuild/i386-unknown-freebsd4.8/libstdc++-v3/include/i386-unknown-freebsd4.8 -I/data/development/jw/tmp/gccbuild/i386-unknown-freebsd4.8/libstdc++-v3/include -I/home/jw/gcc/src/gcc/libstdc++-v3/libsupc++ -I/home/jw/gcc/src/gcc/libstdc++-v3/libsupc++ -I/home/j!
 w/gcc/src/gcc/libstdc++-v3/include/backward -I/home/jw/gcc/src/gcc/libstdc++-v3/testsuite /home/jw/gcc/src/gcc/libstdc++-v3/testsuite/17_intro/header_cstdio.cc    -include bits/stdc++.h  -L/data/development/jw/tmp/gccbuild/i386-unknown-freebsd4.8/./libstdc++-v3/testsuite -lv3test -lm   -o ./header_cstdio.exe    (timeout = 300)
/home/jw/gcc/src/gcc/libstdc++-v3/testsuite/17_intro/header_cstdio.cc: In function `int main()':

/home/jw/gcc/src/gcc/libstdc++-v3/testsuite/17_intro/header_cstdio.cc:30: error: stray '\24' in program

/home/jw/gcc/src/gcc/libstdc++-v3/testsuite/17_intro/header_cstdio.cc:30: error: expected `}' at end of input

compiler exited with status 1
output is:
/home/jw/gcc/src/gcc/libstdc++-v3/testsuite/17_intro/header_cstdio.cc: In function `int main()':

/home/jw/gcc/src/gcc/libstdc++-v3/testsuite/17_intro/header_cstdio.cc:30: error: stray '\24' in program

/home/jw/gcc/src/gcc/libstdc++-v3/testsuite/17_intro/header_cstdio.cc:30: error: expected `}' at end of input

FAIL: 17_intro/header_cstdio.cc (test for excess errors)
Comment 1 J Wakely (defunct account) 2004-07-20 17:38:12 UTC
	Delete the include/i386-unknown-freebsd4.8/bits/stdc++.h.gch/O2g
        file and re-run tests.
Comment 2 Andrew Pinski 2004-07-20 17:44:54 UTC
never attach the PCH.  This sounds like the PCH is failing which means that this is a host problem.
Comment 3 Andrew Pinski 2004-07-20 17:45:16 UTC
s/host/host specific/
Comment 4 Jonathan Wakely 2004-07-20 19:27:27 UTC
(I'm the reporter btw)

If I delete the PCH files and run make in the libstdc++ build dir the PCH is
rebuilt with the same problem, and it's happened with several builds from CVS
over a few weeks, so it's not just a one-off fluke. But I have only ever seen it
on that host.

What else can I do to investigate at my end?
Comment 5 Andrew Pinski 2004-07-20 19:52:28 UTC
I mean it is a host OS specific problem and not a problem with the machine, sorry for confusion.  See 
bug 14940 for other host OS which have the same problem.