[Bug c++/51231] g++ remove placement new with -O1

2011-11-21 Thread dushistov at mail dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51231

Evgeniy Dushistov  changed:

   What|Removed |Added

  Known to work||4.4.5
  Known to fail||4.5.3, 4.6.2
   Severity|normal  |major


[Bug c++/51231] g++ remove placement new with -O1

2011-11-19 Thread dushistov at mail dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51231

--- Comment #3 from Evgeniy Dushistov  2011-11-19 
22:07:40 UTC ---
To build test case you need use command:
g++ -ggdb -O1  -Wall -Wextra boost_interp_alloc.cpp  -lboost_thread

I use boost 1.46.1.

Or you can use preprocessed attachment to look at generated assembler.
Tested on x86_64.


[Bug c++/51231] g++ remove placement new with -O1

2011-11-19 Thread dushistov at mail dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51231

--- Comment #2 from Evgeniy Dushistov  2011-11-19 
22:03:49 UTC ---
Created attachment 25862
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25862
the preprocessed test case

generate from source with command:
g++ -ggdb -c -save-temps -O1  -Wall -Wextra boost_interp_alloc.cpp,
you still need -lboost_thread to create executable.


[Bug c++/51231] g++ remove placement new with -O1

2011-11-19 Thread dushistov at mail dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51231

--- Comment #1 from Evgeniy Dushistov  2011-11-19 
21:49:33 UTC ---
The code works as expected for 4.4.5,
and show buggy behaviour with 4.5.3 and 4.6.2.