aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr54261-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr54261-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr54261-1.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr54261-1.c b/gcc/testsuite/gcc.dg/torture/pr54261-1.c
index 571727b0c95..071b3232d46 100644
--- a/gcc/testsuite/gcc.dg/torture/pr54261-1.c
+++ b/gcc/testsuite/gcc.dg/torture/pr54261-1.c
@@ -32,7 +32,10 @@ void g (int *at, int val)
int main(void)
{
- int x = 41;
+ /* On PTX it is not valid to perform atomic operations on auto
+ variables, which end up in .local. Making this static places it
+ in .global. */
+ static int x = 41;
int a = 1;
g (&x, a);