PR sanitizer/59415
* vtable-verify.c (verify_bb_vtables): Check the return value
of gimple_call_fn. Use is_gimple_call instead of gimple_code.
testsuite/
* g++.dg/ubsan/pr59415.C: New test.
From-SVN: r205805
+2013-12-09 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/59415
+ * vtable-verify.c (verify_bb_vtables): Check the return value
+ of gimple_call_fn. Use is_gimple_call instead of gimple_code.
+
2013-12-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm.md (generic_sched): Add cortexa12.
+2013-12-09 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/59415
+ * g++.dg/ubsan/pr59415.C: New test.
+
2013-12-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/52707
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=null -Wall -fvtable-verify=std" } */
+
+void
+foo (void)
+{
+ throw 0;
+}
stmt = gsi_stmt (gsi_virtual_call);
/* Count virtual calls. */
- if (gimple_code (stmt) == GIMPLE_CALL)
+ if (is_gimple_call (stmt))
{
tree fncall = gimple_call_fn (stmt);
- if (TREE_CODE (fncall) == OBJ_TYPE_REF)
+ if (fncall && TREE_CODE (fncall) == OBJ_TYPE_REF)
total_num_virtual_calls++;
}