From: Tom de Vries Date: Sun, 1 Jul 2018 20:25:55 +0000 (+0000) Subject: Revert "[testsuite/guality] Prevent optimization of local in vla-1.c" X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d0bc0af9c9a61a6ec445b98ee87e8774eff867d;p=gcc.git Revert "[testsuite/guality] Prevent optimization of local in vla-1.c" 2018-07-01 Tom de Vries revert: 2018-07-01 Tom de Vries * gcc.dg/guality/prevent-optimization.h (VOLATILE): Define. * gcc.dg/guality/vla-1.c (f1): Mark local vla a as VOLATILE. From-SVN: r262290 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index df7edd94872..f8b82b5984b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2018-07-01 Tom de Vries + + revert: + 2018-07-01 Tom de Vries + + * 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 * lib/gcc-gdb-test.exp (gdb-test): Handle '@' prefix in line number diff --git a/gcc/testsuite/gcc.dg/guality/prevent-optimization.h b/gcc/testsuite/gcc.dg/guality/prevent-optimization.h index 57e945cafb4..0ef84a3d9c8 100644 --- a/gcc/testsuite/gcc.dg/guality/prevent-optimization.h +++ b/gcc/testsuite/gcc.dg/guality/prevent-optimization.h @@ -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 diff --git a/gcc/testsuite/gcc.dg/guality/vla-1.c b/gcc/testsuite/gcc.dg/guality/vla-1.c index d281185c18c..264b9f3f92b 100644 --- a/gcc/testsuite/gcc.dg/guality/vla-1.c +++ b/gcc/testsuite/gcc.dg/guality/vla-1.c @@ -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" } } */ }