1 /* PR optimization/6703 2 Origin: Glen Nakamura <glen@imodulo.com> */ 3 /* { dg-do run } */ 4 /* { dg-options "-O2" } */ 5 6 extern void abort (void); 7 extern void exit (int); 8 foo(int * x,int y)9void foo (int *x, int y) 10 { 11 __builtin_memset (x, 0, y); 12 } 13 main()14int main () 15 { 16 int x[2] = { -1, -1 }; 17 18 if (x[1] != -1) 19 abort (); 20 foo (x, sizeof (int) + 1); 21 if (x[1] == -1) 22 abort (); 23 exit (0); 24 } 25