re PR middle-end/77766 (wrong code at -O2 and -O3 in 64-bit mode on x86_64-linux-gnu (executable hangs))

PR tree-optimization/77766
	PR tree-optimization/78856
	* gcc.c-torture/execute/pr77766.c: New test.

From-SVN: r244287
This commit is contained in:
Jeff Law 2017-01-10 13:55:59 -07:00 committed by Jeff Law
parent dc703d70ec
commit 5363d9d949
2 changed files with 34 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2017-01-10 Jeff Law <law@redhat.com>
PR tree-optimization/77766
PR tree-optimization/78856
* gcc.c-torture/execute/pr77766.c: New test.
2016-01-10 Richard Biener <rguenther@suse.de>
PR tree-optimization/79034

View File

@ -0,0 +1,28 @@
char a;
short b, d = 5, h;
char c[1];
int e, f = 4, g, j;
int main() {
int i;
for (; f; f = a) {
g = 0;
for (; g <= 32; ++g) {
i = 0;
for (; i < 3; i++)
while (1 > d)
if (c[b])
break;
L:
if (j)
break;
}
}
e = 0;
for (; e; e = 0) {
d++;
for (; h;)
goto L;
}
return 0;
}