PR c++/72809
* rtti.c (get_pseudo_ti_index): Return TK_CLASS_TYPE for
builtin aggregate types without TYPE_BINFO.
* g++.dg/eh/stdarg1.C: New test.
From-SVN: r239272
+2016-08-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/72809
+ * rtti.c (get_pseudo_ti_index): Return TK_CLASS_TYPE for
+ builtin aggregate types without TYPE_BINFO.
+
2016-08-08 Jason Merrill <jason@redhat.com>
Implement C++17 constexpr lambda.
ix = TK_CLASS_TYPE;
break;
}
- else if (!BINFO_N_BASE_BINFOS (TYPE_BINFO (type)))
+ else if (!TYPE_BINFO (type)
+ || !BINFO_N_BASE_BINFOS (TYPE_BINFO (type)))
{
ix = TK_CLASS_TYPE;
break;
+2016-08-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/72809
+ * g++.dg/eh/stdarg1.C: New test.
+
2016-08-08 Andi Kleen <ak@linux.intel.com>
* lib/profopt.exp: (auto-profopt-execute): Don't include full
--- /dev/null
+// PR c++/72809
+// { dg-do compile }
+
+#include <stdarg.h>
+
+int
+foo (int a, ...)
+{
+ va_list ap;
+ int r = 0;
+ va_start (ap, a);
+ try
+ {
+ if (a == 1)
+ throw (ap);
+ }
+ catch (va_list b)
+ {
+ r = va_arg (b, int);
+ }
+ va_end (ap);
+ return r;
+}
+
+int
+main ()
+{
+ if (foo (0) != 0 || foo (1, 7) != 7)
+ __builtin_abort ();
+}