[Bug tree-optimization/70094] Missed optimization when passing a constant struct argument by value

2016-03-07 Thread robryk at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70094 --- Comment #2 from Robert Obryk --- Note that this optimization can not only be applied when the parameter is a compile-time constant. The following function can also be compiled so as not to touch the stack: --snip-- struct foo { int a; in

[Bug c++/70094] New: Missed optimization when passing a constant struct argument by value

2016-03-05 Thread robryk at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: robryk at gmail dot com Target Milestone: --- Function baz in the code listing below gets compiled into something that writes to the stack. This is unnecessary: one can just load the