aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Walloca-14.c
blob: 51362b2d6bee230285556d48a77254c6f16d67c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* PR tree-optimization/80109 */
/* { dg-do compile } */
/* { dg-require-effective-target alloca } */
/* { dg-skip-if "small address space" { "pdp11-*-*" } } */
/* { dg-options "-O2 -Walloca-larger-than=126812070" { target ptr32plus }  } */
/* { dg-options "-O2 -Walloca-larger-than=12070" { target { ! ptr32plus } } } */

void
g (int *p)
{
  extern void f (void *);

  void *q = __builtin_alloca (p); /* { dg-warning "passing argument 1" } */
  /* { dg-warning "unbounded use of 'alloca'" "unbounded" { target *-*-* } .-1 } */
  f (q);
}