On Tue, Dec 11, 2012 at 10:12 AM, Eric Botcazou <ebotca...@adacore.com> wrote: >> ... so if would really be a pessimization doing that. Of course handling >> CONST_DECL in for_each_index is indeed obvious - I just was curios if >> it was a missed-optimization opportunity as well. > > It turns out that, for the same testcase, &CONST_DECL is generated on the MIPS > and prepare_decl_rtl is trying to put an RTX on the CONST_DECL, hence ICE. > > Tested on x86_64-suse-linux, applied on the mainline as obvious. I agree that > this is on the fringes of what we have to support, but we won't revisit it > until the 4.9 development cycle.
Yeah - I plan to make CONST_DECLs much more present with getting rid of &STRING_CST (making that &CONST_DECL of a string). That solves one weird special case we allow in the IL and also fixes wrong-code issues with LTO. Richard. > > 2012-12-11 Eric Botcazou <ebotca...@adacore.com> > > * tree-ssa-loop-ivopts.c (prepare_decl_rtl) <ADDR_EXPR>: Generate RTL > only for a DECL which HAS_RTL_P. > > > -- > Eric Botcazou