Added testcase for PR 83329
authorMartin Jambor <mjambor@suse.cz>
Tue, 19 Dec 2017 10:43:00 +0000 (11:43 +0100)
committerMartin Jambor <jamborm@gcc.gnu.org>
Tue, 19 Dec 2017 10:43:00 +0000 (11:43 +0100)
2017-12-19  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/83329
* gcc.dg/tree-ssa/pr83329.c: New test

From-SVN: r255814

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr83329.c [new file with mode: 0644]

index 5c735b0c03961441b2797f80a82718c58cef11f6..02b45eb0078f999582df07d1c60a280870218347 100644 (file)
@@ -1,3 +1,8 @@
+2017-12-19  Martin Jambor  <mjambor@suse.cz>
+
+       PR tree-optimization/83329
+       * gcc.dg/tree-ssa/pr83329.c: New test
+
 2017-12-19  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/79490
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr83329.c b/gcc/testsuite/gcc.dg/tree-ssa/pr83329.c
new file mode 100644 (file)
index 0000000..feabc00
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+typedef struct {
+  long a;
+  long b;
+} c;
+
+c *d;
+char e, f, g;
+void h() {
+  d[0].a = &g - &f;
+  d[0].b = &e - &f;
+}