re PR target/82823 (ICE in ix86_expand_prologue, at config/i386/i386.c:13171 with...
authorJeff Law <law@redhat.com>
Fri, 3 Nov 2017 20:42:41 +0000 (14:42 -0600)
committerJeff Law <law@gcc.gnu.org>
Fri, 3 Nov 2017 20:42:41 +0000 (14:42 -0600)
PR target/82823
* g++.dg/torture/pr82823.C: New test.

From-SVN: r254398

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr82823.C [new file with mode: 0644]

index 4cc2ced..0a08fe2 100644 (file)
@@ -1,5 +1,8 @@
 2017-11-03  Jeff Law  <law@redhat.com>
 
+       PR target/82823
+       * g++.dg/torture/pr82823.C: New test.
+
        * gcc.target/i386/stack-check-12.c: New test.
 
 2017-11-03  Jakub Jelinek  <jakub@redhat.com>
diff --git a/gcc/testsuite/g++.dg/torture/pr82823.C b/gcc/testsuite/g++.dg/torture/pr82823.C
new file mode 100644 (file)
index 0000000..dab369e
--- /dev/null
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-additional-options "-fstack-clash-protection" }
+// { dg-require-effective-target supports_stack_clash_protection }
+
+
+class a
+{
+public:
+  ~a ();
+  int b;
+};
+class c
+{
+public:
+  a m_fn1 ();
+};
+class d
+{
+  int e ();
+  c f;
+};
+int
+d::e ()
+{
+  return f.m_fn1 ().b;
+}