On Fri, 24 Aug 2012, Jakub Jelinek wrote:

> Hi!
> 
> On this testcase, we ICE in optimize_compound_literals_in_ctor
> because init isn't CONSTRUCTOR, but the recursive call relies on it
> being a CONSTRUCTOR.
> 
> Either we can add that check as the patch does, making the optimization
> tiny bit more robust (the rest of the gimplifier handles non-CONSTRUCTOR
> DECL_INITIAL of COMPOUND_LITERAL_EXPR just fine), or the C FE would need to
> be somehow fixed to always emit a CONSTRUCTOR.
> 
> Joseph, what do you prefer here?

I prefer the gimplifier approach here (allowing COMPOUND_LITERAL_EXPRs to 
use anything that would be a valid initializer for the relevant type).

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to