aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2014-08-20 12:32:50 +0000
committerMark Wielaard <mark@gcc.gnu.org>2014-08-20 12:32:50 +0000
commitc84d88e45c50cadf07edfaac07b174490d48bbde (patch)
treec0dc75273272277856e20f67dbefbcb3946b25cf
parent6cd87a2ea594fbacec733d5a3015499849e4bd83 (diff)
downloadgcc-c84d88e45c50cadf07edfaac07b174490d48bbde.zip
gcc-c84d88e45c50cadf07edfaac07b174490d48bbde.tar.gz
gcc-c84d88e45c50cadf07edfaac07b174490d48bbde.tar.bz2
gcc.dg/guality/restrict.c: Add `used' attribute to all variables.
From-SVN: r214219
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/guality/restrict.c20
2 files changed, 14 insertions, 10 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 16d0c07..2e023a8 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2014-08-20 Mark Wielaard <mjw@redhat.com>
+
+ * gcc.dg/guality/restrict.c: Add `used' attribute to all variables.
+
2014-08-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* lib/gcc-defs.exp (${tool}_check_unsupported_p):
diff --git a/gcc/testsuite/gcc.dg/guality/restrict.c b/gcc/testsuite/gcc.dg/guality/restrict.c
index e31224b..62d7832 100644
--- a/gcc/testsuite/gcc.dg/guality/restrict.c
+++ b/gcc/testsuite/gcc.dg/guality/restrict.c
@@ -2,16 +2,16 @@
/* { dg-do run } */
/* { dg-options "-std=c99 -gdwarf-3" } */
-int *ip;
-const int *cip;
-int * restrict irp;
-int * const icp;
-const int * restrict cirp;
-int * const restrict icrp;
-const int * const restrict cicrp;
-
-int * const volatile restrict cvirp;
-const volatile int * restrict pcvir;
+int *ip __attribute__((used));
+const int *cip __attribute__((used));
+int * restrict irp __attribute__((used));
+int * const icp __attribute__((used));
+const int * restrict cirp __attribute__((used));
+int * const restrict icrp __attribute__((used));
+const int * const restrict cicrp __attribute__((used));
+
+int * const volatile restrict cvirp __attribute__((used));
+const volatile int * restrict pcvir __attribute__((used));
static __attribute__((noclone, noinline)) void *
cpy (void * restrict s1, const void * restrict s2, unsigned int n)