[testsuite/guality] Don't use attribute used in pr45882.c for -O0
authorTom de Vries <tdevries@suse.de>
Sat, 30 Jun 2018 08:09:26 +0000 (08:09 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Sat, 30 Jun 2018 08:09:26 +0000 (08:09 +0000)
commit37d0ffd54d7614d3da100e974e5bfc43ff6c8503
tree5ef2f1da283d6f67a35140d26a71d37af322201b
parentf269206b1b9d10401e7afc99e37050892d26d014
[testsuite/guality] Don't use attribute used in pr45882.c for -O0

2018-06-30  Tom de Vries  <tdevries@suse.de>

* gcc.dg/guality/guality.exp (guality_transform_options): New proc.
(toplevel): Apply guality_transform_options on DG_TORTURE_OPTIONS and
LTO_TORTURE_OPTIONS.
* gcc.dg/guality/prevent-optimization.h: New file.
* gcc.dg/guality/pr45882.c: Include prevent-optimization.h.
(a): Replace __attribute__((used)) with ATTRIBUTE_USED.

From-SVN: r262270
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/guality/guality.exp
gcc/testsuite/gcc.dg/guality/pr45882.c
gcc/testsuite/gcc.dg/guality/prevent-optimization.h [new file with mode: 0644]