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]

[patch] PR28621 (-ffast-math -Os segfault)


The patch below fixes PR target/28621 on mainline.

I can't take credit for the patch, I just pulled it out of the PR, 
verified that it fixes the problem, and tested it.

gcc 4.1 does not support __attribute__ ((force_align_arg_pointer)), so a 
different solution will be required there. IMHO this should not stop us using 
it to fix HEAD.

Bootstrapped on i686-linux.
Ok?

Paul

2006-08-25  Jan Hubicka  <jh@suse.cz>

	PR target/28621
	* config/i386/crtfastmath.c (set_fast_math): Force stack alignment.

Index: gcc/config/i386/crtfastmath.c
===================================================================
--- gcc/config/i386/crtfastmath.c	(revision 116401)
+++ gcc/config/i386/crtfastmath.c	(working copy)
@@ -38,6 +38,9 @@
 #define SSE	(1 << 25)
 
 static void __attribute__((constructor))
+#ifndef __x86_64__
+__attribute__ ((force_align_arg_pointer))
+#endif
 set_fast_math (void)
 {
 #ifndef __x86_64__


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