http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48760
--- Comment #14 from Gabriel Dos Reis <gdr at gcc dot gnu.org> 2011-04-26 14:12:35 UTC --- (In reply to comment #12) > (In reply to comment #9) > > I guess, in the 4.6.1 time frame we can only workaround the issue in C++03 > > mode > > by doing the piecewise work in the body. I can maybe help for the compiler > > work > > too but I need more guidance: is there an agreement about the C1X inspired > > builtin suggested by Joseph? In case, can I have a more specific reference? > > > > I'm adding in CC Richi too, in case he has additional tips and/or hints > > about > > the builtin work.. > > A __builtin_complex builtin should be almost trivial. It would be purely > frontend sugar for frontends that lack a way to specify a complex value > component-wise. The frontend would be resposible for lowering it to > a COMPLEX_EXPR. I don't think the middle-end wants to deal with > __builtin_complex as it already has a perfect matching tree code. Agreed -- except since __builtin_complex is already a perfect match, the front-end should just accept either _M_value{r,i} or _M_value(r,i) if it wanted to be C++03 compatible too. Either way, you say, there is no need to involve the middle end. > > Now I understand C++0x might have a proper syntax already, so I'm not sure > how it relates to this (C++) bug. > > What changed in 4.6 is that we put complex values in registers even at -O0. that is fine (and appreciated!). It is unrelated to the bug though. > You should be able to reproduce any issue in this bug in older releases > with optimization turned on (given that the library implementation didn't > change). The bug is a source-level bug; the source code is written that way because we don't have yet a good way to initialize at once GCC builtin COMPLEX_EXPR. -- Gaby