This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix another ICE when building glibc


> > +     MEM_ATTRS (x) = get_mem_attrs (MEM_ALIAS_SET (x), t, MEM_OFFSET (x),
> > + 				   MEM_SIZE (x), MEM_ALIGN (x), GET_MODE (x));
> 
> I have trouble beliving that it's ok to change MEM_EXPR and preserve
> MEM_OFFSET, since the later is by definition relative to the former.
> Why isn't this using set_mem_attributes?

When using set_mem_attributes instead of that MEM_ATTRS (x) = get_mem_attrs...
I get testsuite failures in gcc.dg/compat/struct-by-value-1[3-8]:

/gcc-main.new/gcc/testsuite/gcc.dg/compat/struct-by-value-13_x.c:9: internal
compiler error: in set_mem_attributes_minus_bitpos, at emit-rtl.c:1471


Since the problem with copied decl in MEM_EXPR occurs only when splitting
complex args, I'll fix it in function.c:assign_parms:5261 by using set_mem_expr.
This is safe because fnargs is a copy of parm so there might be no problem
with inconsistent MEM_OFFSET.

Josef


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]