[Bug c++/18049] wrong result without -O2 with g++-3.4.2 and completely wrong result with any other g++ version

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Mon Oct 18 20:24:00 GMT 2004


------- Additional Comments From bangerth at dealii dot org  2004-10-18 20:24 -------
Just for the reference, here's what I get: 
 
g/x> /home/bangerth/bin/gcc-3.4.3-pre/bin/c++ *.cc -o x ; ./x 
******************* Before Declaration of typedef ******************* 
3 
-1.98746 
12.1079 
16.1439 
20.1799 
24.2159 
******************* After Declaration of typedef ******************* 
1 
-1.98746 
12.1079 
16.1439 
20.1799 
24.2159 
******************* What the result should be ******************* 
3 
6 
9 
12 
15 
18 
 
g/x> /home/bangerth/bin/gcc-3.4.3-pre/bin/c++ -O2 *.cc -o x ; ./x 
******************* Before Declaration of typedef ******************* 
3 
6 
9 
12 
15 
18 
******************* After Declaration of typedef ******************* 
3 
6 
9 
12 
15 
18 
******************* What the result should be ******************* 
3 
6 
9 
12 
15 
18 
 
 
With -O2, the change in result is obvious. In the first data set (no -O2), 
the first line of the *before* and *after* markers is different. 
 
 
Drosos: we're not particularly fond of these larger multi-file testcases. 
Do you think you could come up with a smaller testcase that is in only 
one file? 
W. 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18049



More information about the Gcc-bugs mailing list