help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: g++ Bug? Why w/ and w/o "O3" options gives different result(g++3.3.3


From: Paul Pluzhnikov
Subject: Re: g++ Bug? Why w/ and w/o "O3" options gives different result(g++3.3.3) for this program?
Date: 01 Dec 2004 17:45:37 -0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence)

Peng Yu <pengyu.ut@gmail.com> writes:

> Does it indicate g++ has a bug? 

We can't tell: your test case is too long, and nobody so far has
shown inclination to spend hours analyzing it.

Try to produce a *minimal* test case that demonstrates the problem.

> Or I used some C++ language feature
> that -O3 option doesn't support?

It is quite a bit more likely that you have a bug in your program,
but finding it without a minimal test case is difficult.

FWIW, your program is "valgrind-clean", but shows reading
uninitialized memory from stack under Chaperon (with and without -O3):

[PC: 0x402c0835 std::ostream::operator<<()+0x000000a5] (Thread 0) 
**READ_UNINIT_MEM(read)**

  Reading uninitialized memory.

  Pointer : 0xbfffda25
  Stack trace where the error occurred:
        std::ostream::operator<<()  pc: 0x402c0835
std::basic_ostream<char, std::char_traits<char> >& std::operator<< <double, 
char, std::char_traits<char> >()  pc: 0x080498a6  
/usr/include/c++/3.2.2/complex, 393
                            main()  pc: 0x0804931d  junk.cc, 106

temp = (0.0140056,0)
temp = (0.0140056,0)

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]