summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/tm/volatile-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/c-c++-common/tm/volatile-1.c')
-rw-r--r--gcc/testsuite/c-c++-common/tm/volatile-1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/testsuite/c-c++-common/tm/volatile-1.c b/gcc/testsuite/c-c++-common/tm/volatile-1.c
index eb3799dd972..40b41803555 100644
--- a/gcc/testsuite/c-c++-common/tm/volatile-1.c
+++ b/gcc/testsuite/c-c++-common/tm/volatile-1.c
@@ -3,7 +3,7 @@
volatile int * p = 0;
__attribute ((transaction_safe))
-int f() {
+void f() {
int x = 0; // ok: not volatile
p = &x; // ok: the pointer is not volatile
int i = *p; // { dg-error "volatile" "read through volatile glvalue" }