aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2003-01-21 20:43:53 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2003-01-21 19:43:53 +0000
commit4d0977186233ef43067a336b858a6f7ebba64e99 (patch)
tree6cea8638978c2b18f09807ee57035e2b14ee8180
parent5c64ead4ae1889d5ff5d5fcc7bff4afdfaedf7a2 (diff)
downloadgcc-4d0977186233ef43067a336b858a6f7ebba64e99.zip
gcc-4d0977186233ef43067a336b858a6f7ebba64e99.tar.gz
gcc-4d0977186233ef43067a336b858a6f7ebba64e99.tar.bz2
990208-1.c: Add noinline attributes as needed.
* gcc.c-torture/execute/990208-1.c: Add noinline attributes as needed. * gcc.c-torture/execute/eeprof-1.c: Likewise. * gcc.c-torture/execute/stdio-opt-*.c: Likewise. * gcc.c-torture/execute/string-opt-*.c: Likewise. From-SVN: r61563
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/990208-1.c3
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/eeprof-1.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pure-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/stdio-opt-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/stdio-opt-2.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/stdio-opt-3.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-10.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-11.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-12.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-13.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-14.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-15.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-16.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-17.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-2.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-3.c3
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-4.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-6.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-7.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-8.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/string-opt-9.c1
23 files changed, 40 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3f53ca4..6144f2d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+Tue Jan 21 18:01:35 CET 2003 Jan Hubicka <jh@suse.cz>
+
+ * gcc.c-torture/execute/990208-1.c: Add noinline attributes as needed.
+ * gcc.c-torture/execute/eeprof-1.c: Likewise.
+ * gcc.c-torture/execute/stdio-opt-*.c: Likewise.
+ * gcc.c-torture/execute/string-opt-*.c: Likewise.
+
2003-01-20 Nick Clifton <nickc@redhat.com>
* gcc.c-torture/execute/20030117-1.c: New test case. Exposes
diff --git a/gcc/testsuite/gcc.c-torture/execute/990208-1.c b/gcc/testsuite/gcc.c-torture/execute/990208-1.c
index 9d7d714..786e664 100644
--- a/gcc/testsuite/gcc.c-torture/execute/990208-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/990208-1.c
@@ -14,16 +14,19 @@ static __inline__ void doit(void **pptr, int cond)
}
}
+__attribute__ ((noinline))
static void f(int cond)
{
doit (&ptr1, cond);
}
+__attribute__ ((noinline))
static void g(int cond)
{
doit (&ptr2, cond);
}
+__attribute__ ((noinline))
static void bar(void);
int main()
diff --git a/gcc/testsuite/gcc.c-torture/execute/eeprof-1.c b/gcc/testsuite/gcc.c-torture/execute/eeprof-1.c
index 6dad7ec..248b8cc 100644
--- a/gcc/testsuite/gcc.c-torture/execute/eeprof-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/eeprof-1.c
@@ -5,13 +5,16 @@ int entry_calls, exit_calls;
void (*last_fn_entered)();
void (*last_fn_exited)();
+__attribute__ ((noinline))
int main () NOCHK;
+__attribute__ ((noinline))
void foo ()
{
ASSERT (last_fn_entered == foo);
}
+__attribute__ ((noinline))
static void foo2 ()
{
ASSERT (entry_calls == 1 && exit_calls == 0);
@@ -22,6 +25,7 @@ static void foo2 ()
ASSERT (last_fn_exited == foo);
}
+__attribute__ ((noinline))
void nfoo (void) NOCHK;
void nfoo ()
{
@@ -55,11 +59,13 @@ int main ()
void __cyg_profile_func_enter (void (*fn)(), void (*parent)()) NOCHK;
void __cyg_profile_func_exit (void (*fn)(), void (*parent)()) NOCHK;
+__attribute__ ((noinline))
void __cyg_profile_func_enter (void (*fn)(), void (*parent)())
{
entry_calls++;
last_fn_entered = fn;
}
+__attribute__ ((noinline))
void __cyg_profile_func_exit (void (*fn)(), void (*parent)())
{
exit_calls++;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pure-1.c b/gcc/testsuite/gcc.c-torture/execute/pure-1.c
index a516ed9..174477e 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pure-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pure-1.c
@@ -1,3 +1,4 @@
+
/* Origin: Kaveh Ghazi <ghazi@caip.rutgers.edu> 2002-05-27. */
/* Use a different function for each test so the link failures
diff --git a/gcc/testsuite/gcc.c-torture/execute/stdio-opt-1.c b/gcc/testsuite/gcc.c-torture/execute/stdio-opt-1.c
index dbdc812..f5316d4 100644
--- a/gcc/testsuite/gcc.c-torture/execute/stdio-opt-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/stdio-opt-1.c
@@ -58,6 +58,7 @@ int main()
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
+__attribute__ ((noinline))
static int
fputs(const char *string, FILE *stream)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/stdio-opt-2.c b/gcc/testsuite/gcc.c-torture/execute/stdio-opt-2.c
index e917205..833017e 100644
--- a/gcc/testsuite/gcc.c-torture/execute/stdio-opt-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/stdio-opt-2.c
@@ -45,6 +45,7 @@ int main()
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
+__attribute__ ((noinline))
static int
printf (const char *string, ...)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/stdio-opt-3.c b/gcc/testsuite/gcc.c-torture/execute/stdio-opt-3.c
index fb56a3f..afc76a2 100644
--- a/gcc/testsuite/gcc.c-torture/execute/stdio-opt-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/stdio-opt-3.c
@@ -57,6 +57,7 @@ int main()
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
+__attribute__ ((noinline))
static int
fprintf (FILE *stream, const char *string, ...)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-1.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-1.c
index 2210a04..6b59c10 100644
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/string-opt-1.c
@@ -37,6 +37,7 @@ int main()
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
+__attribute__ ((noinline))
static char *
strstr(const char *s1, const char *s2)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-10.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-10.c
index e1a271d..dc31dc5 100644
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-10.c
+++ b/gcc/testsuite/gcc.c-torture/execute/string-opt-10.c
@@ -76,6 +76,7 @@ int main ()
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
+__attribute__ ((noinline))
static char *
strncat (char *s1, const char *s2, size_t n)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-11.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-11.c
index cad19c9..0aa1862 100644
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-11.c
+++ b/gcc/testsuite/gcc.c-torture/execute/string-opt-11.c
@@ -58,6 +58,7 @@ int main ()
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
+__attribute__ ((noinline))
static size_t
strspn (const char *s1, const char *s2)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-12.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-12.c
index b9df9c2..1d20f1e 100644
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-12.c
+++ b/gcc/testsuite/gcc.c-torture/execute/string-opt-12.c
@@ -58,6 +58,7 @@ int main ()
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
+__attribute__ ((noinline))
static size_t
strcspn (const char *s1, const char *s2)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-13.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-13.c
index 3060f91..9d79ef0 100644
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-13.c
+++ b/gcc/testsuite/gcc.c-torture/execute/string-opt-13.c
@@ -49,6 +49,7 @@ main ()
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
+__attribute__ ((noinline))
static size_t
strlen (const char *s)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-14.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-14.c
index f1b7bfb..cb0bfcb 100644
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-14.c
+++ b/gcc/testsuite/gcc.c-torture/execute/string-opt-14.c
@@ -25,12 +25,14 @@ main ()
something else. So any remaining calls to the original function
should abort. */
+__attribute__ ((noinline))
static void *
memset (void *s, int c, size_t n)
{
abort ();
}
+__attribute__ ((noinline))
static void *
memcpy (void *dest, const void *src, size_t n)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-15.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-15.c
index b08ff9b..2cf73da 100644
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-15.c
+++ b/gcc/testsuite/gcc.c-torture/execute/string-opt-15.c
@@ -37,6 +37,7 @@ main ()
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
+__attribute__ ((noinline))
static int
memcmp (const char *p1, const char *p2, size_t len)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-16.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-16.c
index a28cdb0..2948b64 100644
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-16.c
+++ b/gcc/testsuite/gcc.c-torture/execute/string-opt-16.c
@@ -28,6 +28,7 @@ main (int argc)
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
+__attribute__ ((noinline))
static int
memcmp (const void *s1, const void *s2, size_t len)
{
@@ -36,6 +37,7 @@ memcmp (const void *s1, const void *s2, size_t len)
#else
/* When not optimizing, the above tests may generate references to
the function link_error, but should never actually call it. */
+__attribute__ ((noinline))
static void
link_error ()
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-17.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-17.c
index 47fe42d..744f146 100644
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-17.c
+++ b/gcc/testsuite/gcc.c-torture/execute/string-opt-17.c
@@ -40,6 +40,7 @@ main (int argc)
/* When optimizing, most of the above cases should be transformed into
something else. So any remaining calls to the original function
for short lengths should abort. */
+__attribute__ ((noinline))
static void *
memset (void *dst, int c, size_t len)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-2.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-2.c
index 7b9bcbf..d8ebb77 100644
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/string-opt-2.c
@@ -46,6 +46,7 @@ int main()
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
+__attribute__ ((noinline))
static char *
strpbrk(const char *s1, const char *s2)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-3.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-3.c
index 61718f2..c6f019b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/string-opt-3.c
@@ -104,18 +104,21 @@ rindex (const char *s, int c)
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
+__attribute__ ((noinline))
static __SIZE_TYPE__
strlen (const char *s)
{
abort ();
}
+__attribute__ ((noinline))
static int
strcmp (const char *s1, const char *s2)
{
abort ();
}
+__attribute__ ((noinline))
static char *
strrchr (const char *s, int c)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-4.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-4.c
index d82bb69..9182eb2 100644
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-4.c
+++ b/gcc/testsuite/gcc.c-torture/execute/string-opt-4.c
@@ -53,6 +53,7 @@ index (const char *s, int c)
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
+__attribute__ ((noinline))
static char *
strchr (const char *s, int c)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-6.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-6.c
index efd502f..c684dbd 100644
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-6.c
+++ b/gcc/testsuite/gcc.c-torture/execute/string-opt-6.c
@@ -45,6 +45,7 @@ int main()
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
+__attribute__ ((noinline))
static char *
strcpy (char *d, const char *s)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-7.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-7.c
index 144d9f1..ed1b2a4 100644
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-7.c
+++ b/gcc/testsuite/gcc.c-torture/execute/string-opt-7.c
@@ -69,6 +69,7 @@ int main ()
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
+__attribute__ ((noinline))
static char *
strncpy(char *s1, const char *s2, size_t n)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-8.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-8.c
index 0e0e7bb..8fef5b5 100644
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-8.c
+++ b/gcc/testsuite/gcc.c-torture/execute/string-opt-8.c
@@ -231,6 +231,7 @@ int main ()
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
+__attribute__ ((noinline))
static int
strncmp(const char *s1, const char *s2, size_t n)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-9.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-9.c
index ba248a0..0a3edbe 100644
--- a/gcc/testsuite/gcc.c-torture/execute/string-opt-9.c
+++ b/gcc/testsuite/gcc.c-torture/execute/string-opt-9.c
@@ -46,6 +46,7 @@ int main ()
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
+__attribute__ ((noinline))
static char *
strcat (char *s1, const char *s2)
{