diff options
author | Dan Albert <danalbert@google.com> | 2015-06-17 11:09:54 -0700 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2015-06-17 14:15:22 -0700 |
commit | f378ebf14df0952eae870c9865bab8326aa8f137 (patch) | |
tree | 31794503eb2a8c64ea5f313b93100f1163afcffb /gcc-4.7/libmudflap/testsuite/libmudflap.cth/pass37-frag.c | |
parent | 2c58169824949d3a597d9fa81931e001ef9b1bd0 (diff) | |
download | toolchain_gcc-f378ebf14df0952eae870c9865bab8326aa8f137.tar.gz toolchain_gcc-f378ebf14df0952eae870c9865bab8326aa8f137.tar.bz2 toolchain_gcc-f378ebf14df0952eae870c9865bab8326aa8f137.zip |
Delete old versions of GCC.
Change-Id: I710f125d905290e1024cbd67f48299861790c66c
Diffstat (limited to 'gcc-4.7/libmudflap/testsuite/libmudflap.cth/pass37-frag.c')
-rw-r--r-- | gcc-4.7/libmudflap/testsuite/libmudflap.cth/pass37-frag.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/gcc-4.7/libmudflap/testsuite/libmudflap.cth/pass37-frag.c b/gcc-4.7/libmudflap/testsuite/libmudflap.cth/pass37-frag.c deleted file mode 100644 index 877803c1e..000000000 --- a/gcc-4.7/libmudflap/testsuite/libmudflap.cth/pass37-frag.c +++ /dev/null @@ -1,58 +0,0 @@ -#include <stdlib.h> -#include <stdio.h> -#include <pthread.h> -#include <sched.h> - -static void * -func (void *p) -{ - int *counter = (int *) p; - unsigned i; - - for (i=0; i<100; i++) - { - (*counter) ++; - { - int array[17]; - unsigned x = i % (sizeof(array)/sizeof(array[0])); - /* VRP could prove that x is within [0,16], but until then, the - following access will ensure that array[] is registered to - libmudflap. */ - array[x] = i; - } - sched_yield (); /* sleep (1); */ - } - - return (NULL); -} - - -int main () -{ - int rc; - unsigned i; - enum foo { NT=10 }; - pthread_t threads[NT]; - int counts[NT]; - - - for (i=0; i<NT; i++) - { - counts[i] = 0; - rc = pthread_create (& threads[i], NULL, func, (void *) & counts[i]); - if (rc) abort(); - } - - for (i=0; i<NT; i++) - { - rc = pthread_join (threads[i], NULL); - if (rc) abort(); - printf ("%d%s", counts[i], (i==NT-1) ? "\n" : " "); - } - - return 0; -} - -/* { dg-output "100 100 100 100 100 100 100 100 100 100" } */ -/* { dg-repetitions 20 } */ -/* { dg-timeout 10 } */ |