view gcc/testsuite/gcc.dg/ssp-3.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

/* { 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;
}