mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-25 18:16:06 +08:00
re PR tree-optimization/61681 (wrong code at -Os and above on x86_64-linux-gnu)
2014-07-08 Richard Biener <rguenther@suse.de> PR tree-optimization/61681 * tree-ssa-structalias.c (find_what_var_points_to): Expand NONLOCAL inside ESCAPED. * gcc.dg/torture/pr61681.c: New testcase. From-SVN: r212349
This commit is contained in:
parent
e33f43b9a6
commit
e8e938e0b0
@ -1,3 +1,9 @@
|
||||
2014-07-08 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/61681
|
||||
* tree-ssa-structalias.c (find_what_var_points_to): Expand
|
||||
NONLOCAL inside ESCAPED.
|
||||
|
||||
2014-07-08 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/61680
|
||||
|
@ -1,3 +1,8 @@
|
||||
2014-07-08 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/61681
|
||||
* gcc.dg/torture/pr61681.c: New testcase.
|
||||
|
||||
2014-07-08 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/61680
|
||||
|
37
gcc/testsuite/gcc.dg/torture/pr61681.c
Normal file
37
gcc/testsuite/gcc.dg/torture/pr61681.c
Normal file
@ -0,0 +1,37 @@
|
||||
/* { dg-do run } */
|
||||
|
||||
extern void abort (void);
|
||||
|
||||
int a = 1, *e = &a, **f = &e, *l, *p, j;
|
||||
static int b;
|
||||
long d;
|
||||
short g;
|
||||
|
||||
void
|
||||
fn1 (int *p)
|
||||
{
|
||||
int m;
|
||||
if (!(*p & j))
|
||||
{
|
||||
int *n = &m;
|
||||
for (d = 6; d; d--)
|
||||
{
|
||||
for (g = 0; g < 1; g++)
|
||||
{
|
||||
n = l = *f;
|
||||
b = *p;
|
||||
}
|
||||
*n = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
p = *f;
|
||||
fn1 (p);
|
||||
if (b != 0)
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
@ -6106,6 +6106,10 @@ find_what_var_points_to (varinfo_t orig_vi)
|
||||
pt->ipa_escaped = 1;
|
||||
else
|
||||
pt->escaped = 1;
|
||||
/* Expand some special vars of ESCAPED in-place here. */
|
||||
varinfo_t evi = get_varinfo (find (escaped_id));
|
||||
if (bitmap_bit_p (evi->solution, nonlocal_id))
|
||||
pt->nonlocal = 1;
|
||||
}
|
||||
else if (vi->id == nonlocal_id)
|
||||
pt->nonlocal = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user