aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-12-03 14:30:41 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-12-03 14:30:41 +0100
commit959ded615c23a9595c7965f9373c578d2cb4afa3 (patch)
tree87b80458996aca2a7ff0fe6ded3c22a9467cd995
parentbcda485bdf8b8e7c645648e124e787f78846b2c6 (diff)
downloadgcc-959ded615c23a9595c7965f9373c578d2cb4afa3.zip
gcc-959ded615c23a9595c7965f9373c578d2cb4afa3.tar.gz
gcc-959ded615c23a9595c7965f9373c578d2cb4afa3.tar.bz2
re PR tree-optimization/71109 (gcc ICE at -O3 on valid code on x86_64-linux-gnu in "maybe_record_trace_start")
PR tree-optimization/71109 * gcc.c-torture/compile/pr71109.c: New test. From-SVN: r266738
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr71109.c31
2 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index eae0dfa..2032b88 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@
2018-12-03 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/71109
+ * gcc.c-torture/compile/pr71109.c: New test.
+
PR target/88287
* g++.target/aarch64/sve/vcond_1.C: Adjust for comparison
canonicalization.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr71109.c b/gcc/testsuite/gcc.c-torture/compile/pr71109.c
new file mode 100644
index 0000000..f86ba60
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr71109.c
@@ -0,0 +1,31 @@
+/* PR tree-optimization/71109 */
+
+struct S { int g, h; signed char i; int j; signed char k; int l[4]; } a, c;
+struct T { signed char g; } e;
+int *b, d;
+static void foo ();
+
+void
+bar (void)
+{
+ while (d)
+ {
+ int k;
+ struct T f[3];
+ foo (bar, a);
+ for (k = 0;; k++)
+ f[k] = e;
+ }
+}
+
+static inline void
+foo (int x, struct S y, struct T z)
+{
+ for (z.g = 2; z.g; z.g--)
+ {
+ c = a = y;
+ *b |= 6;
+ if (y.g)
+ break;
+ }
+}