forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2017-09-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/82291 * tree-if-conv.c (predicate_mem_writes): Make sure to remove writes in blocks predicated with false. * gcc.dg/torture/pr82291.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253093 138bc75d-0d04-0410-961f-82ee72b054a4
- Loading branch information
rguenth
committed
Sep 22, 2017
1 parent
4c03ed5
commit fc1c9df
Showing
4 changed files
with
148 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* { dg-do run } */ | ||
|
||
int a, c, d, *h; | ||
unsigned b; | ||
|
||
int *fn1 () | ||
{ | ||
int *f[3], g = 0; | ||
for (; g < 3; g++) | ||
f[g] = &a; | ||
if (--b > a) | ||
{ | ||
if (a > b) | ||
d++; | ||
return f[0]; | ||
} | ||
} | ||
|
||
void fn2 () | ||
{ | ||
for (; c >= 0; --c) | ||
{ | ||
int j[] = { 0, 0, 0, 0, 0 }; | ||
int *k = fn1 (); | ||
if (!k) | ||
__builtin_abort (); | ||
h = &j[4]; | ||
} | ||
} | ||
|
||
int main () | ||
{ | ||
fn2 (); | ||
if (d != 0) | ||
__builtin_abort (); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters