From: Mark Wielaard Date: Tue, 23 Sep 2014 11:07:08 +0000 (+0000) Subject: Make all gcc.dg/guality/const-volatile.c subtests PASS under LTO. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=84eca54267742a6978fe467c8e36a6eace7170c8;p=gcc.git Make all gcc.dg/guality/const-volatile.c subtests PASS under LTO. 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. From-SVN: r215502 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e80c48a5b1e..a3bd1eb2306 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2014-09-20 Mark Wielaard + + * gcc.dg/guality/const-volatile.c (i): Mark as used. + (ci): Likewise. + (pci): Likewise. + (pvi): Likewise. + (pcvi): Likewise. + (cip): Likewise. + (foo): Likewise. + (cfoo): Likewise. + 2014-09-20 Mark Wielaard * lib/gcc-gdb-test.exp (gdb-test): Transform gdb types "short int" diff --git a/gcc/testsuite/gcc.dg/guality/const-volatile.c b/gcc/testsuite/gcc.dg/guality/const-volatile.c index eb45ae5ab35..d657f48079c 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;