Mercurial > hg > CbC > CbC_gcc
annotate libmudflap/testsuite/libmudflap.c/fail12-frag.c @ 55:77e2b8dfacca gcc-4.4.5
update it from 4.4.3 to 4.5.0
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Feb 2010 23:39:51 +0900 |
parents | a06113de4d67 |
children |
rev | line source |
---|---|
0 | 1 #include <stdio.h> |
2 #include <stdlib.h> | |
3 #include <string.h> | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
4 int *y; |
0 | 5 int main () |
6 { | |
7 int i = 10; | |
8 int *x = (int *) malloc (i * sizeof (int)); | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
9 y = x; |
0 | 10 while (i--) |
11 { | |
12 ++x; | |
13 *x = 0; | |
14 } | |
15 return 0; | |
16 } | |
17 /* { dg-output "mudflap violation 1.*" } */ | |
18 /* { dg-output "Nearby object 1.*" } */ | |
19 /* { dg-output "mudflap object.*malloc region.*" } */ | |
20 /* { dg-do run { xfail *-*-* } } */ |