This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/27537] XMM alignment fault when compiling for i386 with -Os
- From: "hjl at lucon dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jun 2006 15:51:52 -0000
- Subject: [Bug target/27537] XMM alignment fault when compiling for i386 with -Os
- References: <bug-27537-12669@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from hjl at lucon dot org 2006-06-07 15:51 -------
This testcase doesn't use -Os on SSE registers:
[hjl@gnu-10 stack]$ cat m.c
#include <stdio.h>
extern char *e1 (void);
int
main ()
{
printf ("%s\n", e1 ());
return 0;
}
[hjl@gnu-10 stack]$ cat x.c
#include <emmintrin.h>
extern char *e1 (void);
char *e1 (void)
{
volatile __m128 dummy = _mm_set_ps1(0.f);
return "OK";
}
[hjl@gnu-10 stack]$ make
gcc -Os -c -o m.o m.c
gcc -O -msse2 -c -o x.o x.c
gcc -o m m.o x.o
./m
make: *** [all] Segmentation fault
[hjl@gnu-10 stack]$
It calls a function which uses SSE registers.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27537