aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2001-10-05 04:20:06 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2001-10-05 04:20:06 +0000
commit8d5463d486fe257414a840e204531a8e4405a9a6 (patch)
tree8421929d3050a6c08b262049d54dae8b4dfc28dd
parentd4e4baa99551fa8fdcac243e1d8b2e5041b625d8 (diff)
downloadgcc-8d5463d486fe257414a840e204531a8e4405a9a6.zip
gcc-8d5463d486fe257414a840e204531a8e4405a9a6.tar.gz
gcc-8d5463d486fe257414a840e204531a8e4405a9a6.tar.bz2
20010122-1.c: Don't assume alloca() is enough to avoid inlining.
* gcc.c-torture/execute/20010122-1.c: Don't assume alloca() is enough to avoid inlining. From-SVN: r46024
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20010122-1.c19
2 files changed, 14 insertions, 10 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 0335486..f925c951 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-05 Alexandre Oliva <aoliva@redhat.com>
+
+ * gcc.c-torture/execute/20010122-1.c: Don't assume alloca() is
+ enough to avoid inlining.
+
2001-10-04 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
* lib/g77.exp: set libg2c_dir correctly.
diff --git a/gcc/testsuite/gcc.c-torture/execute/20010122-1.c b/gcc/testsuite/gcc.c-torture/execute/20010122-1.c
index 3bc53f6..ba72397 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20010122-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20010122-1.c
@@ -78,15 +78,14 @@ void *test6a (char * p)
void *(*func1[6])(void) = { test1, test2, test3, test4, test5, test6 };
-char * call_func1 (int i)
+char * call_func1_ (int i)
{
- char * save = (char*) alloca (4);
-
save_ret1[i] = func1[i] ();
-
- return save;
}
+/* We dont' want call_func1_ to be inlined, so call it through a
+ pointer. */
+void (*call_func1)(int) = call_func1_;
static void *ret_addr;
void *save_ret2[6];
@@ -164,16 +163,16 @@ char * dummy (void)
void (*func2[6])(void) = { test7, test8, test9, test10, test11, test12 };
-char * call_func2 (int i)
+void call_func2_ (int i)
{
- char * save = (char*) alloca (4);
-
func2[i] ();
save_ret2[i] = ret_addr;
-
- return save;
}
+/* We dont' want call_func2_ to be inlined, so call it through a
+ pointer. */
+void (*call_func2)(int) = call_func2_;
+
int main (void)
{
int i;