From 51cdce9ab62efedcb0ea13ccce356b982be68d2a Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Wed, 16 Mar 2011 16:51:35 +0000 Subject: [PATCH] vla-1.c (main): Use result of f1 to avoid optimizing it away if promoted to const. 2011-03-16 Richard Guenther * gcc.dg/guality/vla-1.c (main): Use result of f1 to avoid optimizing it away if promoted to const. From-SVN: r171050 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/guality/vla-1.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a9db0b7eb9d..c345d412ced 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-03-16 Richard Guenther + + * gcc.dg/guality/vla-1.c (main): Use result of f1 to avoid + optimizing it away if promoted to const. + 2011-03-16 Richard Guenther PR tree-optimization/48149 diff --git a/gcc/testsuite/gcc.dg/guality/vla-1.c b/gcc/testsuite/gcc.dg/guality/vla-1.c index 2db1c29caa6..651465428ac 100644 --- a/gcc/testsuite/gcc.dg/guality/vla-1.c +++ b/gcc/testsuite/gcc.dg/guality/vla-1.c @@ -28,9 +28,10 @@ f2 (int i) int main () { + volatile int j; int i = 5; asm volatile ("" : "=r" (i) : "0" (i)); - f1 (i); + j = f1 (i); f2 (i); return 0; } -- 2.30.2