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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [ssp-1.c] - Blame information for rev 301

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do run { target native } } */
2
/* { dg-options "-fstack-protector" } */
3
/* { dg-require-effective-target fstack_protector } */
4
 
5
#include <stdlib.h>
6
 
7
void
8
__stack_chk_fail (void)
9
{
10
  exit (0); /* pass */
11
}
12
 
13
int main ()
14
{
15
  int i;
16
  char foo[255];
17
 
18
  // smash stack
19
  for (i = 0; i <= 400; i++)
20
    foo[i] = 42;
21
 
22
  return 1; /* fail */
23
}

powered by: WebSVN 2.1.0

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