http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51323
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P1 AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org |gnu.org | Target Milestone|--- |4.6.3 Summary|g++ confuses this with |[4.6/4.7 Regression] g++ |function argument in |confuses this with function |optimized call |argument in optimized call --- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-11-29 10:28:48 UTC --- Actually, it fails on 4.6 vanilla branch too, just not in GCC 4.6-RH, because we don't enable -fipa-sra by default for -O2/-Os for debug info quality reasons in 4.6, only for -O3 (that is something that is solved in GCC 4.7). The regression started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164135 which started building MEM_REF in the IPA-SRA codepath. As for your workaround, if you only do it for GCC 4.6.* and not also for 4.7 and later, it is fine, all I would like is that such workarounds don't stick around forever for future versions of GCC.