view gcc/testsuite/gcc.dg/Wframe-larger-than-2.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line source

/* Exercise -Wframe-larger-than= with a byte-size suffix.
   { dg-do compile }
   { dg-options "-O -Wframe-larger-than=1KB" }
   { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */

extern void f (void*, ...);

void frame_size_912 (void)
{
  char a[512];
  char b[400];
  f (a, b);
}

void frame_size_1025 (void)
{
  char a[512];
  char b[513];
  f (a, b);
} /* { dg-warning "frame size of \[0-9\]+ bytes is larger than 1024 bytes" } */