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>

	* gcc.dg/guality/vla-1.c (main): Use result of f1 to avoid
	optimizing it away if promoted to const.

From-SVN: r171050
This commit is contained in:
Richard Guenther 2011-03-16 16:51:35 +00:00 committed by Richard Biener
parent 4db6d7d79d
commit 51cdce9ab6
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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

View 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;
}