diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-09-12 23:19:51 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2007-09-12 23:19:51 +0200 |
commit | c93646bd3ca88aa2cc99cc5a2090dc6ea4b39688 (patch) | |
tree | 828e93cbb23579f8ca8fc10515dcc6799ef95972 /gcc/testsuite/gcc.dg | |
parent | 901e210ea15908c46788ed2a01f523137efe4b05 (diff) | |
download | gcc-c93646bd3ca88aa2cc99cc5a2090dc6ea4b39688.zip gcc-c93646bd3ca88aa2cc99cc5a2090dc6ea4b39688.tar.gz gcc-c93646bd3ca88aa2cc99cc5a2090dc6ea4b39688.tar.bz2 |
re PR target/32338 (Error: .prologue within prologue)
PR target/32338
* config/ia64/ia64.c (ia64_expand_epilogue): Emit blockage
before sp restoration even when total_size is 0, but
frame_pointer_needed.
* gcc.dg/pr32338-1.c: New test.
* gcc.dg/pr32338-2.c: New test.
From-SVN: r128446
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr32338-1.c | 47 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr32338-2.c | 47 |
2 files changed, 94 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr32338-1.c b/gcc/testsuite/gcc.dg/pr32338-1.c new file mode 100644 index 0000000..6a79a8c --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr32338-1.c @@ -0,0 +1,47 @@ +/* PR target/32338 */ +/* { dg-do link } */ +/* { dg-options "-O2 -fno-omit-frame-pointer" } */ + +struct S +{ +}; + +int +__attribute__((noinline)) +foo (struct S *d) +{ + return 2; +} + +int +__attribute__((noinline)) +bar (struct S *d) +{ + return 4; +} + +int +__attribute__((noinline)) +fnl (char const *q) +{ + return __builtin_strlen (q); +} + +int +__attribute__((noinline)) +baz (struct S *d, char const *q) +{ + unsigned int len; + len = fnl (q); + if (len > 512) + return bar (d); + return foo (d); +} + +int +main (int argc, char *argv[]) +{ + if (argc > 30) + return baz ((void *) 0, "abcde"); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/pr32338-2.c b/gcc/testsuite/gcc.dg/pr32338-2.c new file mode 100644 index 0000000..81daddf --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr32338-2.c @@ -0,0 +1,47 @@ +/* PR target/32338 */ +/* { dg-do link } */ +/* { dg-options "-O2 -fno-omit-frame-pointer" } */ + +struct S +{ +}; + +int +__attribute__((noinline)) +foo (void) +{ + return 2; +} + +int +__attribute__((noinline)) +bar (void) +{ + return 4; +} + +int +__attribute__((noinline)) +fnl (void) +{ + return 6; +} + +int +__attribute__((noinline)) +baz (void) +{ + unsigned int len; + len = fnl (); + if (len > 512) + return bar (); + return foo (); +} + +int +main (int argc, char *argv[]) +{ + if (argc > 30) + return baz (); + return 0; +} |