https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70094
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2016-03-07 Component|c++ |tree-optimization Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. This is quite hard for us as GIMPLE doesn't allow arbitrary constant literals as function arguments and at RTL we can't remove the stack local anymore. So to make this work on GIMPLE we'd need to allow bar ( CONSTRUCTOR {1, 2, 3 } ) so maybe CONSTRUCTORs marked with TREE_CONSTANT. Of course expansion needs to work as well for this. The optimization pass to generate this would be SRA. Cost issues if you have two calls like bar (f); bar (f); etc.