diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-11-13 16:28:05 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-11-13 16:29:09 +0000 |
commit | 03ac50856c9fc8c96b7a17239ee40a10397750a7 (patch) | |
tree | a648c6d3428e4757e003f6ed1748adb9613065db /gcc/testsuite/gcc.dg/tm/memopt-11.c | |
parent | 34efdaf078b01a7387007c4e6bde6db86384c4b7 (diff) | |
download | gcc-tarball-03ac50856c9fc8c96b7a17239ee40a10397750a7.tar.gz |
gcc 7.2.0
This is imported manually due to a bug in the tarball import script.
See the baserock-dev mailing list archives (November 2017) for a
more detailed explaination of the issue.
Diffstat (limited to 'gcc/testsuite/gcc.dg/tm/memopt-11.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tm/memopt-11.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/gcc/testsuite/gcc.dg/tm/memopt-11.c b/gcc/testsuite/gcc.dg/tm/memopt-11.c deleted file mode 100644 index 44c538b54d..0000000000 --- a/gcc/testsuite/gcc.dg/tm/memopt-11.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fgnu-tm -O -fdump-tree-tmmark" } */ - -extern int something(void) __attribute__((transaction_safe)); -extern void *malloc (__SIZE_TYPE__) __attribute__((malloc,transaction_safe)); -extern void foo (int); - -int f() -{ - int *p; - - p = malloc (sizeof (*p) * 100); - foo(p[5]); - - __transaction_atomic { - /* p[5] is thread private, however the SSA_NAME that holds the - address dominates the entire transaction (transaction - invariant) so we can use a save/restore pair. */ - p[5] = 123; - - if (something()) - __transaction_cancel; - } - return p[5]; -} - -/* { dg-final { scan-tree-dump-times "ITM_LU" 0 "tmmark" } } */ -/* { dg-final { scan-tree-dump-times "ITM_WU" 0 "tmmark" } } */ -/* { dg-final { scan-tree-dump-times "int tm_save" 1 "tmmark" } } */ |