14c41b9bb9
2009-07-01 Richard Guenther <rguenther@suse.de> PR tree-optimization/19831 * tree-ssa-dce.c (propagate_necessity): Calls to functions that only act as barriers do not make any previous stores necessary. * tree-ssa-structalias.c (handle_lhs_call): Delay making HEAP variables global, do not add a constraint from nonlocal. (find_func_aliases): Handle escapes through return statements. (compute_points_to_sets): Make escaped HEAP variables global. * gcc.dg/tree-ssa/20041122-1.c: Enable TBAA, scan FRE dump, make allocated memory escape. Un-XFAIL. * gcc.dg/vect/pr21591.c: Make allocated memory escape. * gcc.dg/vect/pr31699.c: Likewise. * gcc.dg/tree-ssa/ssa-dce-7.c: New testcase. libmudflap/ * testsuite/libmudflap.c/fail11-frag.c: Make allocated memory escape. * testsuite/libmudflap.c/fail12-frag.c: Likewise. * testsuite/libmudflap.c/fail16-frag.c: Likewise. * testsuite/libmudflap.c/fail31-frag.c: Likewise. From-SVN: r149140
21 lines
367 B
C
21 lines
367 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
char *y;
|
|
int main ()
|
|
{
|
|
int i = 10;
|
|
char *x = (char *) malloc (i * sizeof (char));
|
|
y = x;
|
|
while (i--)
|
|
{
|
|
++x;
|
|
*x = 0;
|
|
}
|
|
return 0;
|
|
}
|
|
/* { dg-output "mudflap violation 1.*" } */
|
|
/* { dg-output "Nearby object 1.*" } */
|
|
/* { dg-output "mudflap object.*malloc region.*" } */
|
|
/* { dg-do run { xfail *-*-* } } */
|