From: Jeff Law Date: Tue, 10 Jan 2017 20:55:59 +0000 (-0700) Subject: re PR middle-end/77766 (wrong code at -O2 and -O3 in 64-bit mode on x86_64-linux... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5363d9d949cf4e0527037cd1a7032fdd3f6964ed;p=gcc.git 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bc86b4f37de..009d32d730a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2017-01-10 Jeff Law + + PR tree-optimization/77766 + PR tree-optimization/78856 + * gcc.c-torture/execute/pr77766.c: New test. + 2016-01-10 Richard Biener PR tree-optimization/79034 diff --git a/gcc/testsuite/gcc.c-torture/execute/pr77766.c b/gcc/testsuite/gcc.c-torture/execute/pr77766.c new file mode 100644 index 00000000000..f8f61ad0f7b --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr77766.c @@ -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; +} +