http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58029
Bug ID: 58029 Summary: base_alias_check says pretend-args saves and varargs accesses don't alias Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: amylaar at gcc dot gnu.org When the frame is set up by the prologue, some pretend args saves have to be done using the stack pointer, as the frame pointer can't be saved until later. For va_arg, OTOH, it is natural to use the hard frame pointer, if no frame pointer elimination takes place. gcc.dg/torture/stackalign/vararg-1.c fails at -Os / -O2 or higher for epiphany-elf because base_alias_check says the store of the pretend args and the va_arg loads don't alias, and the stores get scheduled after the load.