blob: e881058867fdc9f253528332e82d4394b9fc0169 [file] [log] [blame]
/* APPLE LOCAL file mainline */
/* { dg-do run { target native } } */
/* { dg-options "-fstack-protector" } */
#include <stdlib.h>
void
__stack_chk_fail (void)
{
exit (0); /* pass */
}
void
overflow()
{
int i = 0;
char foo[30];
/* Overflow buffer. */
for (i = 0; i < 50; i++)
foo[i] = 42;
}
int main (void)
{
overflow ();
return 1; /* fail */
}