This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
tFile tests fail under i686-pc-linux-gnu with -fno-inline
- To: gcc-bugs at gcc dot gnu dot org
- Subject: tFile tests fail under i686-pc-linux-gnu with -fno-inline
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Sat, 2 Sep 2000 15:16:31 -0400 (EDT)
Under i686-pc-linux-gnu, the tFile tests fail due to incorrect output
when tFile.cc is compiled with `-O3 -fno-inline'. The tests don't fail
when compiled with just `-O3'. Here the diff for the output:
--- /home/dave/gnu/gcc-2.96/libio/tests/tFile.exp Sat Sep 4 11:08:51 1999
+++ tFile.out Sat Sep 2 13:13:17 2000
@@ -23,11 +23,11 @@
Now there is a second line.
Making SFile rf...odd elements of file in reverse order:
-(i = 9 c = j d = 0.009)
-(i = 7 c = h d = 0.007)
-(i = 5 c = f d = 0.005)
-(i = 3 c = d d = 0.003)
-(i = 1 c = b d = 0.001)
+(i = 2112800 c = ) d = 3.58812e+198)
+(i = 2112800 c = ) d = 3.58812e+198)
+(i = 2112800 c = ) d = 3.58812e+198)
+(i = 2112800 c = ) d = 3.58812e+198)
+(i = 2112800 c = ) d = 3.58812e+198)
Making PlotFile pf ...(You may delete or attempt to plot plot.out)
creating ostrstream...
I don't know what's gone wrong. With the same option, the tests don't
fail under hpux 10.20. The full log output for the test is appended below.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
Running ../../../../libio/testsuite/libio.tests/tFile.exp ...
Executing on host: /home/dave/gnu/gcc-2.96/objdir/gcc/xgcc -B/home/dave/gnu/gcc-2.96/objdir/gcc/ ../../../../libio/testsuite/../tests/tFile.cc -O3 -fno-inline -I.. -I../../../../libio/testsuite/.. -nostdinc++ -I/home/dave/gnu/gcc-2.96/libstdc++ -I/home/dave/gnu/gcc-2.96/libstdc++/stl -L/home/dave/gnu/gcc-2.96/objdir/i686-pc-linux-gnu//libstdc++ -L/home/dave/gnu/gcc-2.96/objdir/i686-pc-linux-gnu//libiberty -L/home/dave/gnu/gcc-2.96/objdir/i686-pc-linux-gnu//libiberty -g -lstdc++ -liberty -lm -o /home/dave/gnu/gcc-2.96/objdir/i686-pc-linux-gnu/libio/testsuite/tFile (timeout = 300)
spawn /home/dave/gnu/gcc-2.96/objdir/gcc/xgcc -B/home/dave/gnu/gcc-2.96/objdir/gcc/ ../../../../libio/testsuite/../tests/tFile.cc -O3 -fno-inline -I.. -I../../../../libio/testsuite/.. -nostdinc++ -I/home/dave/gnu/gcc-2.96/libstdc++ -I/home/dave/gnu/gcc-2.96/libstdc++/stl -L/home/dave/gnu/gcc-2.96/objdir/i686-pc-linux-gnu//libstdc++ -L/home/dave/gnu/gcc-2.96/objdir/i686-pc-linux-gnu//libiberty -L/home/dave/gnu/gcc-2.96/objdir/i686-pc-linux-gnu//libiberty -g -lstdc++ -liberty -lm -o /home/dave/gnu/gcc-2.96/objdir/i686-pc-linux-gnu/libio/testsuite/tFile
PASS: tFile.cc compilation
spawn [open ...]
Hello, world via cout
Hello, world via cerr
enter a char:c = "a"
enter three integers (short, int, long):first = 123 via dec = 123
second = 4567 via form = 4567 = 010727 via cout.form = 4567 = 0x11d7
third = 89012 via hex = 15bb4
enter a float then a double:first = 123.456
second = -0.012
enter 5 characters separated with spaces:first = 1
rest = 2 3 4 5
A 10-character buffer: abcdefghi
Making streams sout and sin...contents of file:
Thisfilehasonelinetestingoutputstreams.
Making File tf ... first line of file:
This is the first and only line of this file.
next char = 10
reopening tempfile, appending: Now there is a second line.
First 10 chars via raw system read after reopen for input:
This is th
Contents after raw lseek to pos 5:
is the first and only line of this file.
Now there is a second line.
Making SFile rf...odd elements of file in reverse order:
(i = 2112800 c = ) d = 3.58812e+198)
(i = 2112800 c = ) d = 3.58812e+198)
(i = 2112800 c = ) d = 3.58812e+198)
(i = 2112800 c = ) d = 3.58812e+198)
(i = 2112800 c = ) d = 3.58812e+198)
Making PlotFile pf ...(You may delete or attempt to plot plot.out)
creating ostrstream...
with contents:
This is a string-based stream.
With two lines.
using it to create istrstream...
with contents:
This is a string-based stream.
With two lines.
Testing string-based stream using strstream.
Making filebuf streams fout and fin...contents of file:
Thisfilehasonelinetestingoutputstreams.
This is line 1 of ftmp0
This is line 2 of ftmp0
This is line 1 of ftmp1
This is line 2 of ftmp1
This is line 1 of ftmp2
This is line 2 of ftmp2
5.50+6.25 = 1.175e+01
Previous line has 21 characters
Previous line has +32 characters
+__34567(dec) = 0x__8707(hex) = _0103407(oct) [showbase on]
+__34567(dec) = ____8707(hex) = __103407(oct) [showbase off]
-__34567(dec) = 0x__78f9(hex) = __074371(oct) [showbase on]
-__34567(dec) = ____78f9(hex) = ___74371(oct) [showbase off]
______+0(dec) = _____0x0(hex) = _______0(oct) [showbase on]
______+0(dec) = _______0(hex) = _______0(oct) [showbase off]
___34567(dec) = __0X8707(hex) = _0103407(oct) [showbase on]
___34567(dec) = ____8707(hex) = __103407(oct) [showbase off]
-34567__(dec) = 0X78F9__(hex) = 074371__(oct) [showbase on]
-34567__(dec) = 78F9____(hex) = 74371___(oct) [showbase off]
0 (dec) = 0X0 (hex) = 0 (oct) [showbase on]
0 (dec) = 0 (hex) = 0 (oct) [showbase off]
Final names & states:
cin: (stdin) 0
cout: (stdout) 0
cerr: (stderr) 0
end of test.
PASS: tFile.cc execution
FAIL: tFile.cc output