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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [libmudflap/] [testsuite/] [libmudflap.c/] [fail26-frag.c] - Blame information for rev 844

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

Line No. Rev Author Line
1 38 julius
#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.