On Wed, Mar 9, 2011 at 9:40 AM, Eric Botcazou <ebotca...@adacore.com> wrote: >> and as t isn't AGGREGATE_TYPE nor COMPLEX_TYPE and is a decl, >> it is marked MEM_SCALAR_P and e.g. set_mem_attributes_minus_bitpos >> once MEM_SCALAR_P is set doesn't change it to MEM_IN_STRUCT_P >> because of BIT_FIELD_REF etc. The BIT_FIELD_REF <t, 32, *> = 1 >> stores are done through store_field though, and for some reason >> the code sets MEM_IN_STRUCT_P in that codepath unconditionally. > > The irony of marking something scalar when its type is VECTOR_TYPE... > >> Changing this fixes the testcase, bootstrapped/regtested on x86_64-linux >> and i686-linux. I'll try to test this on ia64-linux tomorrow. >> >> 2011-03-08 Jakub Jelinek <ja...@redhat.com> >> >> PR rtl-optimization/47866 >> * expr.c (store_field): If MEM_SCALAR_P (target), don't use >> MEM_SET_IN_STRUCT_P (to_rtx, 1), just set MEM_IN_STRUCT_P (to_rtx) >> if target wasn't scalar. > > I cannot formally approve, but I think it's the way to go.
Yes, this is ok. I thought about deleting these two flags completely at some point. Richard. > I'd also delete > the confusing macro MEM_SET_IN_STRUCT_P altogether and replace its only other > use (in assign_stack_temp_for_type) with the manual equivalent, as is already > done in set_mem_attributes_minus_bitpos. > > -- > Eric Botcazou >