summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ssp-3.c
blob: 98c12da8ba222e26e55d79eb1e088b19aa8fc7d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do assemble } */
/* { dg-options "-fstack-protector-strong -O1 -frename-registers" } */
/* { dg-require-effective-target fstack_protector } */

extern int bar (const char *s, int *argc);
extern int baz (const char *s);

char
foo (const char *s)
{
  int argc;
  int ret;
  if ( !bar (s, &argc))
    ret = baz (s);
  return *s;
}