view gcc/testsuite/gcc.target/s390/stack-clash-3.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 2b5abeee2509
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-options "-O2 -march=z900 -fstack-clash-protection -mbackchain" } */

extern void bar (char *);

void
foo ()
{
  char * mem = __builtin_alloca (20000);
  bar (mem);
}

/* For alloca a common code routine emits the probes.  Make sure the
   "probe_stack" expander is used in that case. We want to use mem
   compares instead of stores.  */
/* { dg-final { scan-assembler-times "cg\t" 5 { target lp64 } } } */
/* { dg-final { scan-assembler-times "c\t" 5 { target { ! lp64 } } } } */