diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gcc.target/i386/pr25293.c | |
download | cbb-gcc-4.6.4-upstream.tar.bz2 cbb-gcc-4.6.4-upstream.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig;
imported gcc-4.6.4 source tree from verified upstream tarball.
downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.
if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/pr25293.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr25293.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr25293.c b/gcc/testsuite/gcc.target/i386/pr25293.c new file mode 100644 index 000000000..6217da2a0 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr25293.c @@ -0,0 +1,51 @@ +/* PR target/25293 */ +/* { dg-do compile } */ +/* { dg-options "-mpreferred-stack-boundary=2 -mtune=i586 -O2 -fomit-frame-pointer -g" } */ +/* { dg-require-effective-target ilp32 } */ + +struct T { unsigned short t1, t2, t3, t4, t5, t6, t7; }; +struct S { struct T s1; unsigned short s2, s3; }; +unsigned short v1; +int f1 (void); +int f2 (struct T); +int f3 (const char *); + +int +foo (struct S *x, struct T y) +{ + unsigned short a, b, c; + unsigned long d, e; + int f = 0; + y.t6 = 6; + a = y.t7; + b = y.t6; + c = y.t7; + switch (a) + { + case 8: + case 7: + c = 9; + break; + case 1: + case 6: + case 3: + b = 16; + c = 9; + break; + } + if ((f = f1 ())) + goto error; + if ((f = f2 (y))) + goto error; + d = (long) &y; + e = (long) &x->s1; + __asm __volatile ("" : "+D" (e), "+S" (d) :: "memory"); + x->s2 = b; + x->s3 = c; + f3 ("foo"); + return 0; +error: + if (v1 >= 1) + f3 ("bar"); + return f; +} |