Commit 2d0bc0af by Tom de Vries Committed by Tom de Vries

Revert "[testsuite/guality] Prevent optimization of local in vla-1.c"

2018-07-01  Tom de Vries  <tdevries@suse.de>

	revert:
	2018-07-01  Tom de Vries  <tdevries@suse.de>

	* gcc.dg/guality/prevent-optimization.h (VOLATILE): Define.
	* gcc.dg/guality/vla-1.c (f1): Mark local vla a as VOLATILE.

From-SVN: r262290
parent 4aef57c9
2018-07-01 Tom de Vries <tdevries@suse.de>
revert:
2018-07-01 Tom de Vries <tdevries@suse.de>
* gcc.dg/guality/prevent-optimization.h (VOLATILE): Define.
* gcc.dg/guality/vla-1.c (f1): Mark local vla a as VOLATILE.
2018-07-01 Tom de Vries <tdevries@suse.de>
* lib/gcc-gdb-test.exp (gdb-test): Handle '@' prefix in line number
argument.
* gcc.dg/guality/const-volatile.c: Replace gdb-test line nrs 50 and 58
......
......@@ -21,10 +21,8 @@ along with GCC; see the file COPYING3. If not see
#ifdef PREVENT_OPTIMIZATION
#define ATTRIBUTE_USED __attribute__((used))
#define VOLATILE volatile
#else
#define ATTRIBUTE_USED
#define VOLATILE
#endif
#endif
......@@ -2,8 +2,6 @@
/* { dg-do run } */
/* { dg-options "-g" } */
#include "prevent-optimization.h"
void __attribute__((noinline))
bar (short *p)
{
......@@ -14,7 +12,7 @@ bar (short *p)
int __attribute__((noinline))
f1 (int i)
{
VOLATILE char a[i + 1];
char a[i + 1];
a[0] = 5; /* { dg-final { gdb-test .+1 "i" "5" } } */
return a[0]; /* { dg-final { gdb-test . "sizeof (a)" "6" } } */
}
......
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