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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [libmudflap/] [testsuite/] [libmudflap.c/] [fail27-frag.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 275 jeremybenn
#include <stdio.h>
2
#include <stdlib.h>
3
#include <string.h>
4
 
5
char volatile *
6
__attribute__((noinline))
7
foo (unsigned i)
8
{
9
  char volatile buffer[10];
10
  char volatile *k = i ? & buffer[i] : NULL; /* defeat addr-of-local-returned warning */
11
  return k;
12
}
13
 
14
int main ()
15
{
16
char volatile *f = foo (5);
17
f[0] = 'b';
18
 
19
return 0;
20
}
21
/* { dg-output "mudflap violation 1.*" } */
22
/* { dg-output "Nearby object.*" } */
23
/* { dg-output "mudflap dead object.*buffer.*alloc.*dealloc" } */
24
/* { dg-do run { xfail *-*-* } } */

powered by: WebSVN 2.1.0

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