This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Make all gcc.dg/guality/const-volatile.c subtests PASS under LTO.
- From: Mark Wielaard <mjw at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: rguenther at suse dot de, Mark Wielaard <mjw at redhat dot com>
- Date: Sun, 21 Sep 2014 00:06:24 +0200
- Subject: [PATCH] Make all gcc.dg/guality/const-volatile.c subtests PASS under LTO.
- Authentication-results: sourceware.org; auth=none
Some subtests were reported as UNSUPPORTED when running under LTO.
That was just because the relevant variables were optimized out.
Mark those variables as used. Now const-volatile reports 192 PASS.
gcc/testsuite/ChangeLog
* gcc.dg/guality/const-volatile.c (i): Mark as used.
(ci): Likewise.
(pci): Likewise.
(pvi): Likewise.
(pcvi): Likewise.
(cip): Likewise.
(foo): Likewise.
(cfoo): Likewise.
---
gcc/testsuite/gcc.dg/guality/const-volatile.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/guality/const-volatile.c b/gcc/testsuite/gcc.dg/guality/const-volatile.c
index eb45ae5..d657f48 100644
--- a/gcc/testsuite/gcc.dg/guality/const-volatile.c
+++ b/gcc/testsuite/gcc.dg/guality/const-volatile.c
@@ -2,17 +2,17 @@
/* { dg-do run } */
/* { dg-options "-g" } */
-int i;
-const int ci;
+int i __attribute__((used));
+const int ci __attribute__((used));
volatile int vi;
const volatile int cvi;
int *pi __attribute__((used));
-const int *pci;
-volatile int *pvi;
-const volatile int *pcvi;
+const int *pci __attribute__((used));
+volatile int *pvi __attribute__((used));
+const volatile int *pcvi __attribute__((used));
-int * const cip;
+int * const cip __attribute__((used));
int * volatile vip;
int * const volatile cvip;
@@ -38,8 +38,8 @@ struct bar
};
struct bar bar __attribute__((used));
-struct foo foo;
-const struct foo cfoo;
+struct foo foo __attribute__((used));
+const struct foo cfoo __attribute__((used));
volatile struct foo vfoo;
const volatile struct foo cvfoo;
--
1.9.3