diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2009-09-24 16:49:13 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2009-09-24 09:49:13 -0700 |
commit | c33ac441b202e1c6a19ba085c8c23946ff3e7a2e (patch) | |
tree | 3381f7fc651e0ca3abc959a23a5329c953af47c7 | |
parent | b5dcb2b9a761f78404b54564a6a430f9ec2e0d58 (diff) | |
download | gcc-c33ac441b202e1c6a19ba085c8c23946ff3e7a2e.zip gcc-c33ac441b202e1c6a19ba085c8c23946ff3e7a2e.tar.gz gcc-c33ac441b202e1c6a19ba085c8c23946ff3e7a2e.tar.bz2 |
pr12329.c (dg-do): Changed to run.
2009-09-24 H.J. Lu <hongjiu.lu@intel.com>
* gcc.target/i386/pr12329.c (dg-do): Changed to run.
(test_nested): Renamed to ...
(test_nested1): This.
(test_nested2): New.
(main): Likewise.
From-SVN: r152126
-rw-r--r-- | gcc/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr12329.c | 36 |
2 files changed, 42 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bf75ec2..8e5395f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2009-09-24 H.J. Lu <hongjiu.lu@intel.com> + + * gcc.target/i386/pr12329.c (dg-do): Changed to run. + (test_nested): Renamed to ... + (test_nested1): This. + (test_nested2): New. + (main): Likewise. + 2009-09-24 Richard Guenther <rguenther@suse.de> PR tree-optimization/36143 diff --git a/gcc/testsuite/gcc.target/i386/pr12329.c b/gcc/testsuite/gcc.target/i386/pr12329.c index c3d8a61..601480c 100644 --- a/gcc/testsuite/gcc.target/i386/pr12329.c +++ b/gcc/testsuite/gcc.target/i386/pr12329.c @@ -1,10 +1,10 @@ -/* { dg-do compile } */ +/* { dg-do run } */ /* { dg-require-effective-target ilp32 } */ /* { dg-options "-O2" } */ extern void abort (void); -int test_nested (int i) +int test_nested1 (int i) { int __attribute__ ((__noinline__, __regparm__(3))) foo(int j, int k, int l) { @@ -13,3 +13,35 @@ int test_nested (int i) return foo (i, i+1, i+2); } + +int test_nested2 (int i) +{ + int x; + + int __attribute__ ((__noinline__, __regparm__(3))) foo(int j, int k, int l) + { + return i + j + k + l; + } + + x = foo (i+3, i+1, i+2); + if (x != (4*i + 6)) + abort (); + + return x; +} + +int +main () +{ + int i = test_nested1 (3); + + if (i != 15) + abort (); + + i = test_nested2 (4); + + if (i != 22) + abort (); + + return 0; +} |