PR c++/89285
* g++.dg/cpp1y/constexpr-89285-2.C: New test.
From-SVN: r269188
+2019-02-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/89285
+ * g++.dg/cpp1y/constexpr-89285-2.C: New test.
+
2019-02-25 Dominique d'Humieres <dominiq@gcc.gnu.org>
PR libfortran/89274
--- /dev/null
+// PR c++/89285
+// { dg-do compile { target c++14 } }
+
+struct A {
+ int a {};
+};
+struct B {
+ int b {};
+ constexpr B (A *x) {
+ int *c = &x->a;
+ while (*c)
+ c = reinterpret_cast<int *>((reinterpret_cast<char *>(c) + *c));
+ *c = reinterpret_cast<char *>(this) - reinterpret_cast<char *>(c);
+ }
+};
+struct C : A {
+ B bar {this};
+};
+
+C foo {};