OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [ssp-2.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run { target native } } */
2
/* { dg-options "-fstack-protector" } */
3
/* { dg-options "-fstack-protector -Wl,-multiply_defined,suppress" { target *-*-darwin* } } */
4
/* { dg-require-effective-target fstack_protector } */
5
 
6
#include <stdlib.h>
7
 
8
void
9
__stack_chk_fail (void)
10
{
11
  exit (0); /* pass */
12
}
13
 
14
void
15
overflow()
16
{
17
  int i = 0;
18
  char foo[30];
19
 
20
  /* Overflow buffer.  */
21
  for (i = 0; i < 50; i++)
22
      foo[i] = 42;
23
}
24
 
25
int main (void)
26
{
27
  overflow ();
28
  return 1; /* fail */
29
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.