This fixes fallout from r216010, which causes Firefox build failures.
Just move the gcc_assert below the new if statement.
From-SVN: r216041
+2014-10-09 Markus Trippelsdorf <markus@trippelsdorf.de>
+
+ * pa-polymorphic-call.c (check_stmt_for_type_change): Move
+ assertion.
+
2014-10-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/63380
}
type = extr_type_from_vtbl_ptr_store (stmt, tci, &offset);
- gcc_assert (!type || TYPE_MAIN_VARIANT (type) == type);
if (type == error_mark_node)
return false;
+ gcc_assert (!type || TYPE_MAIN_VARIANT (type) == type);
if (!type)
{
if (dump_file)
+2014-10-09 Markus Trippelsdorf <markus@trippelsdorf.de>
+
+ * g++.dg/ipa/polymorphic-call-1.C: New testcase.
+
2014-10-09 Marc Glisse <marc.glisse@inria.fr>
* g++.dg/cpp0x/constexpr-52892-1.C: Error on missing const in C++14.
--- /dev/null
+// { dg-do compile }
+// { dg-options "-O2" }
+class A;
+class B
+{
+ A *mRawPtr;
+
+public:
+ void *StartAssignment___trans_tmp_2;
+ A **
+ m_fn1 ()
+ {
+ StartAssignment___trans_tmp_2 = &mRawPtr;
+ return reinterpret_cast<A **> (StartAssignment___trans_tmp_2);
+ }
+};
+class C
+{
+public:
+ C (B &p1) : mTargetSmartPtr (p1) {}
+ operator A **() { return mTargetSmartPtr.m_fn1 (); }
+ B &mTargetSmartPtr;
+};
+class A
+{
+public:
+ A ();
+};
+class D
+{
+ D (bool);
+ B mNewEntry;
+ virtual int m_fn2 ();
+};
+C
+fn1 (B &p1)
+{
+ return p1;
+}
+void
+fn2 (bool, A **)
+{
+ new A;
+}
+D::D (bool p1)
+{
+ A **a = fn1 (mNewEntry);
+ fn2 (p1, a);
+}