2011-03-16 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Mar 2011 16:51:35 +0000 (16:51 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Mar 2011 16:51:35 +0000 (16:51 +0000)
* gcc.dg/guality/vla-1.c (main): Use result of f1 to avoid
optimizing it away if promoted to const.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171050 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/guality/vla-1.c

index a9db0b7..c345d41 100644 (file)
@@ -1,5 +1,10 @@
 2011-03-16  Richard Guenther  <rguenther@suse.de>
 
+       * 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  <rguenther@suse.de>
+
        PR tree-optimization/48149
        * gcc.dg/fold-complex-1.c: New testcase.
 
index 2db1c29..6514654 100644 (file)
@@ -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;
 }