Re: [Bug c++/30245] New: -O2 generates bad code

2006-12-18 Thread Gabriel Dos Reis
"dcb314 at hotmail dot com" <[EMAIL PROTECTED]> writes: | I compiled the following C++ code on a x86_64 machine | without optimisation. | | #include | | int | main() | { | long long n = 1; | | cout << sizeof( n) << endl; | for (int i = 0; i < 100; ++i) | { |

[Bug c++/30245] New: -O2 generates bad code

2006-12-18 Thread dcb314 at hotmail dot com
I compiled the following C++ code on a x86_64 machine without optimisation. #include int main() { long long n = 1; cout << sizeof( n) << endl; for (int i = 0; i < 100; ++i) { cout << n << ' ' << (float) n << '\n'; n *= 2;