Fix testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c

Submitted by Jan Hubicka on May 28, 2013, 11:35 a.m.

Details

Message ID 20130528113518.GB19416@kam.mff.cuni.cz
State New
Headers show

Commit Message

Jan Hubicka May 28, 2013, 11:35 a.m.
Hi,
this testcase has volatile variable read to prevent vectorization but then
it is shadowed by local var of the same name. Currently it prevents vectorization
but not reliably (i.e. we can manage to optimize the conditional away from loop
since it is invariant and that is what happens in my tree.)

	* gcc.dg/vect/vect-strided-a-u16-i4.c: Rename volatile variable to avoid
	shadowing.

Patch hide | download patch | download mbox

Index: testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c
===================================================================
--- testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c	(revision 199343)
+++ testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c	(working copy)
@@ -12,7 +12,7 @@  typedef struct {
    unsigned short d;
 } s;
 
-volatile int y = 0;
+volatile int yy = 0;
 
 __attribute__ ((noinline)) int
 main1 ()
@@ -29,7 +29,7 @@  main1 ()
       arr[i].b = i * 2;
       arr[i].c = 17;
       arr[i].d = i+34;
-      if (y) /* Avoid vectorization.  */
+      if (yy) /* Avoid vectorization.  */
         abort ();
     }