PR middle-end/71308
* gimple-fold.c (gimple_fold_call): Check that LHS is not null.
* g++.dg/torture/pr71308.C: New test.
From-SVN: r236815
+2016-05-27 Marek Polacek <polacek@redhat.com>
+
+ PR middle-end/71308
+ * gimple-fold.c (gimple_fold_call): Check that LHS is not null.
+
2016-05-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.md (2x risbg splitters): Use
== void_type_node))
gimple_call_set_fntype (stmt, TREE_TYPE (fndecl));
/* If the call becomes noreturn, remove the lhs. */
- if (gimple_call_noreturn_p (stmt)
+ if (lhs
+ && gimple_call_noreturn_p (stmt)
&& (VOID_TYPE_P (TREE_TYPE (gimple_call_fntype (stmt)))
|| should_remove_lhs_p (lhs)))
{
+2016-05-27 Marek Polacek <polacek@redhat.com>
+
+ PR middle-end/71308
+ * g++.dg/torture/pr71308.C: New test.
+
2016-05-27 Dominik Vogt <vogt@linux.vnet.ibm.com>
* gcc.dg/zero_bits_compound-1.c: New test.
--- /dev/null
+// PR middle-end/71308
+// { dg-do compile }
+
+class S
+{
+ void foo ();
+ virtual void bar () = 0;
+ virtual ~S ();
+};
+inline void
+S::foo ()
+{
+ bar ();
+};
+S::~S ()
+{
+ foo ();
+}