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

Subversion Repositories openrisc

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

Go to most recent revision | 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
int main ()
5
{
6
char *foo;
7
 
8
__mf_set_options ("-check-initialization");
9
foo = (char *)malloc (1);
10
 
11
/* These two operations each expand to a read-modify-write.
12
 * Even though the end result is that every bit of foo[0] is
13
 * eventually written to deterministically, the first read
14
 * triggers an uninit error.  Ideally, it shouldn't, so this
15
 * should be treated more like a regular XFAIL.  */
16
foo[0] &= 0xfe;
17
foo[0] |= 0x01;
18
 
19
return foo[0];
20
}
21
/* { dg-output "mudflap violation 1.*" } */
22
/* { dg-output "Nearby object.*" } */
23
/* { dg-output "mudflap object.*malloc region.*1r/0w.*" } */
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.