Commit cadec7ca by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/72809 (ICE on x86_64-linux-gnu (Segmentation fault, tree_check))

	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
parent 98e5a19a
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.
......
......@@ -1293,7 +1293,8 @@ get_pseudo_ti_index (tree type)
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
......
// 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 ();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment