[Bug c++/44164] [4.5 Regression] Aliasing bug triggered by Boost.Bind/Boost.Function
--- Comment #18 from jason at gcc dot gnu dot org 2010-05-20 14:00 --- Unassigning myself. -- jason at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|jason at gcc dot gnu dot org|unassigned at gcc dot gnu ||dot org Status|ASSIGNED|NEW http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44164
[Bug c++/44164] [4.5 Regression] Aliasing bug triggered by Boost.Bind/Boost.Function
--- Comment #17 from rguenth at gcc dot gnu dot org 2010-05-20 13:24 --- It is actually the scheduler that breaks the testcase. Easier to look at is -O2 -fwhole-program. -fno-schedule-insns2 fixes it (as well as -fno-tree-pre or -fno-tree-dominator-opts, both of which are necessary to produce the input to the scheduler). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44164
[Bug c++/44164] [4.5 Regression] Aliasing bug triggered by Boost.Bind/Boost.Function
--- Comment #16 from rguenther at suse dot de 2010-05-20 11:48 --- Subject: Re: [4.5 Regression] Aliasing bug triggered by Boost.Bind/Boost.Function On Thu, 20 May 2010, jason at gcc dot gnu dot org wrote: > --- Comment #15 from jason at gcc dot gnu dot org 2010-05-20 05:35 > --- > Giving all unions alias set 0 doesn't fix the testcase. This surprises me, > since I thought that the problem was with the union assignment > > this->functor = f.functor; > > in assign_to_own. Giving alias set 0 to all classes with a member or base of > alias set 0 also doesn't fix the testcase. Giving alias set 0 to all classes > does fix the testcase. Ok, I'll try to pin-point the exact problem. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44164
[Bug c++/44164] [4.5 Regression] Aliasing bug triggered by Boost.Bind/Boost.Function
--- Comment #15 from jason at gcc dot gnu dot org 2010-05-20 05:35 --- Giving all unions alias set 0 doesn't fix the testcase. This surprises me, since I thought that the problem was with the union assignment this->functor = f.functor; in assign_to_own. Giving alias set 0 to all classes with a member or base of alias set 0 also doesn't fix the testcase. Giving alias set 0 to all classes does fix the testcase. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44164
[Bug c++/44164] [4.5 Regression] Aliasing bug triggered by Boost.Bind/Boost.Function
--- Comment #14 from jason at gcc dot gnu dot org 2010-05-19 22:53 --- In C++, an assignment of a union is defined to be equivalent to a byte copy: 12.8/32 "The implicitly-defined copy assignment operator for a union X copies the object representation (3.9) of X." 3.9/4 "The object representation of an object of type T is the sequence of N unsigned char objects taken up by the object of type T, where N equals sizeof(T)." -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44164
[Bug c++/44164] [4.5 Regression] Aliasing bug triggered by Boost.Bind/Boost.Function
-- jason at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2010-05-17 15:50:41 |2010-05-19 22:15:45 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44164
[Bug c++/44164] [4.5 Regression] Aliasing bug triggered by Boost.Bind/Boost.Function
-- rguenth at gcc dot gnu dot org changed: What|Removed |Added Priority|P3 |P2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44164
[Bug c++/44164] [4.5 Regression] Aliasing bug triggered by Boost.Bind/Boost.Function
--- Comment #13 from pluto at agmk dot net 2010-05-18 20:57 --- btw. the boost::optional uses char-based storage and cast &storage -> void* -> some_type* via address() and get_object() methods. it looks like aliasing violation too. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44164
[Bug c++/44164] [4.5 Regression] Aliasing bug triggered by Boost.Bind/Boost.Function
--- Comment #12 from rguenth at gcc dot gnu dot org 2010-05-18 15:02 --- Making this a C++ frontend bug. The only way to avoid expanding the copy to a loop is by using memcpy which will then run into PR42834. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added CC||jason at gcc dot gnu dot org Component|middle-end |c++ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44164