1 /* { dg-do run } */ 2 /* { dg-require-effective-target avx } */ 3 /* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-store" } */ 4 5 #include "avx-check.h" 6 7 #define N 128 8 9 char **ep; 10 char **fp; 11 extern int strcmp (const char *, const char *); 12 13 __attribute__ ((noinline)) 14 void foo(void)15foo (void) 16 { 17 ep = (char **) malloc (N); 18 fp = (char **) malloc (N); 19 } 20 21 void avx_test(void)22avx_test (void) 23 { 24 int i; 25 char **ap, **bp; 26 char *str = "STR"; 27 28 foo (); 29 30 ap = ep; 31 bp = fp; 32 33 for (i = N; i > 0; i--) 34 { 35 *ap++ = str; 36 *bp++ = str; 37 } 38 39 for (i = N; i > 0; i--) 40 { 41 if (strcmp (*--ap, "STR") != 0) 42 abort (); 43 if (strcmp (*--bp, "STR") != 0) 44 abort (); 45 } 46 } 47