https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81248
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2017-06-29 Component|c++ |tree-optimization Summary|[AVR] No ipa-sra |No ipa-sra optimization for |optimization for small |small struct / class |struct / class | Ever confirmed|0 |1 --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- So confirmed. I suppose IPA-SRA simply doesn't consider passing the whole aggregate but it would eventually pass the single member but somehow does not: ;; Function void f(const T&) [with T = A] (_Z1fI1AEvRKT_, funcdef_no=14, decl_uid=5719, cgraph_uid=5, symbol_order=11) Candidate (5720): x ! Disqualifying v - part of a volatile reference. __attribute__((noinline)) void f(const T&) [with T = A] (const struct A & x) { unsigned char _1; <bb 2> [0.00%]: _1 = x_3(D)->m1; v ={v} _1; return; } not sure why (the volatile looks unrelated here). Confirmed also on x86_64. Martin?