[Bug target/63890] [4.9/5/6 regression] Compiling trivial program with -O -p leads to misaligned stack
dominiq at lps dot ens.fr
gcc-bugzilla@gcc.gnu.org
Fri Jan 15 11:38:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63890
--- Comment #27 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Certainly adding TARGET_MACHO is Ok by me.
I don't think this is the problem. I have reapplied the patch in comment 12 for
config/i386/darwin.h and
--- ../_clean/gcc/config/i386/i386.c 2016-01-13 19:03:17.000000000 +0100
+++ gcc/config/i386/i386.c 2016-01-14 20:04:06.000000000 +0100
@@ -10168,6 +10168,14 @@ ix86_va_start (tree valist, rtx nextarg)
pop_topmost_sequence ();
}
}
+ /* Be sure we get stack aligned for mcount call. */
+ /* else if (TARGET_MACHO && crtl->profile && flag_fentry) */
+ else if (TARGET_MACHO && crtl->profile)
+ {
+ crtl->preferred_stack_boundary = PREFERRED_STACK_BOUNDARY;
+ if (crtl->stack_alignment_needed < PREFERRED_STACK_BOUNDARY)
+ crtl->stack_alignment_needed = PREFERRED_STACK_BOUNDARY;
+ }
/* Only 64bit target needs something special. */
if (is_va_list_char_pointer (TREE_TYPE (valist)))
and confirm the results reported in comment 20: three tests fixed and seven new
failures.
More information about the Gcc-bugs
mailing list