Fix r216010 fallout

This fixes fallout from r216010, which causes Firefox build failures.
Just move the gcc_assert below the new if statement.

From-SVN: r216041
This commit is contained in:
Markus Trippelsdorf 2014-10-09 17:52:00 +00:00 committed by Markus Trippelsdorf
parent d0ff1cb4d9
commit 94c4084cf0
4 changed files with 59 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -1424,9 +1424,9 @@ check_stmt_for_type_change (ao_ref *ao ATTRIBUTE_UNUSED, tree vdef, void *data)
}
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)

View File

@ -1,3 +1,7 @@
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.

View File

@ -0,0 +1,49 @@
// { 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);
}