|
Boost Users : |
Subject: Re: [Boost-users] gcc optimization and boost::any
From: John (john_at_[hidden])
Date: 2009-03-16 10:44:20
Just to follow up: It appears to be a bug in gcc's -fgcse optimization (which
is enabled by -O2). Toggling -fno-gcse on gcc 4.2.2 eliminates the symptoms. The
code in question is simple enough, and there were enough bugs reported against
-fgcse, that we are content to let the blame fall on -fgcse, and move on. Thanks
for the suggestions.
Rune Lund Olesen wrote:
> For a possible fix (however quick and dirty as it may be), you could try
> to switch to using boost::variant instead (if at all possible).
>
> If it makes sense to use boost::variant in you context you might as well
> be satisfied with that.
>
> Another thing that could be checked is that the code involved with the
> any is compiled with the same compiler version and boost version (a
> minimal test will of course help to identify such a problem)
>
> --
> Rune
>
> On Sun, Mar 15, 2009 at 6:42 PM, Sohail Somani <sohail_at_[hidden]
> <mailto:sohail_at_[hidden]>> wrote:
>
> John wrote:
> > If you know of such a bug or quirk in either GCC or boost::any,
> or of a
> > write-up of this somewhere... or even some idle speculation... it
> could
> > save us a lot of time tracking this down.
>
> Don't know anything off-hand but valgrind may be able to pinpoint where
> something is going wrong.
>
> --
> Sohail Somani
> http://uint32t.blogspot.com
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden] <mailto:Boost-users_at_[hidden]>
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net