Commit 84eca542 by Mark Wielaard Committed by Mark Wielaard

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
parent 0043a6c9
2014-09-20 Mark Wielaard <mjw@redhat.com> 2014-09-20 Mark Wielaard <mjw@redhat.com>
* 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 <mjw@redhat.com>
* lib/gcc-gdb-test.exp (gdb-test): Transform gdb types "short int" * lib/gcc-gdb-test.exp (gdb-test): Transform gdb types "short int"
and "long int" to plain "short" and "long". and "long int" to plain "short" and "long".
* gcc.dg/guality/const-volatile.c (struct bar): New struct * gcc.dg/guality/const-volatile.c (struct bar): New struct
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
/* { dg-do run } */ /* { dg-do run } */
/* { dg-options "-g" } */ /* { dg-options "-g" } */
int i; int i __attribute__((used));
const int ci; const int ci __attribute__((used));
volatile int vi; volatile int vi;
const volatile int cvi; const volatile int cvi;
int *pi __attribute__((used)); int *pi __attribute__((used));
const int *pci; const int *pci __attribute__((used));
volatile int *pvi; volatile int *pvi __attribute__((used));
const volatile int *pcvi; const volatile int *pcvi __attribute__((used));
int * const cip; int * const cip __attribute__((used));
int * volatile vip; int * volatile vip;
int * const volatile cvip; int * const volatile cvip;
...@@ -38,8 +38,8 @@ struct bar ...@@ -38,8 +38,8 @@ struct bar
}; };
struct bar bar __attribute__((used)); struct bar bar __attribute__((used));
struct foo foo; struct foo foo __attribute__((used));
const struct foo cfoo; const struct foo cfoo __attribute__((used));
volatile struct foo vfoo; volatile struct foo vfoo;
const volatile struct foo cvfoo; const volatile struct foo cvfoo;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment