From: Richard Guenther Date: Wed, 16 Mar 2011 16:51:35 +0000 (+0000) Subject: vla-1.c (main): Use result of f1 to avoid optimizing it away if promoted to const. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=51cdce9ab62efedcb0ea13ccce356b982be68d2a;p=gcc.git 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 --- 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; }