aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr80969-3.c
blob: d902a771cc8f015815ec19b87c447c021a9f46cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* { dg-do run { target { { ! x32 } && avx512f_runtime } } } */
/* { dg-do compile { target { { ! x32 } && { ! avx512f_runtime } } } } */
/* { dg-options "-Ofast -mabi=ms -mavx512f" } */
/* { dg-require-effective-target avx512f } */

/* Test with alloca (and DRAP).  */

#include <alloca.h>

int a[56];
volatile int b = -12345;
volatile const int d = 42;

void foo (int *x, int y, int z)
{
}

void (*volatile const foo_noinfo)(int *, int, int) = foo;

int main (int argc, char *argv[]) {
  int c;
  int *e = alloca (d);
  foo_noinfo (e, d, 0);
  for (; b; b++) {
    c = b;
    if (b & 1)
      c = 2;
    foo_noinfo (e, d, c);
    a[-(b % 56)] = c;
  }
  return 0;
}