+2015-02-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/65003
+ * varasm.c (place_block_symbol): Assert that DECL_RTL of the
+ ultimate alias is MEM with SYMBOL_REF satisfying
+ SYMBOL_REF_HAS_BLOCK_INFO_P as its operand. Don't pass the MEM
+ to place_block_symbol, but instead pass the SYMBOL_REF operand of it.
+
2015-02-11 Thomas Schwinge <thomas@codesourcery.com>
* config/nvptx/mkoffload.c: Include "diagnostic.h" instead of
+2015-02-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/65003
+ * g++.dg/opt/pr65003.C: New test.
+
2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
* lib/target-supports.exp (check_effective_target_pie): Renamed
--- /dev/null
+// PR middle-end/65003
+// { dg-do compile }
+// { dg-options "-O2" }
+// { dg-additional-options "-fpic" { target fpic } }
+
+struct A
+{
+ void operator= (A &);
+ A ();
+};
+struct B
+{
+ A b;
+};
+struct C
+{
+ virtual bool foo (int &, bool) const;
+};
+struct D : virtual C
+{
+ bool foo (int &, bool) const;
+ B e;
+};
+struct F : D
+{
+ F (int &, const int &, const A &);
+ bool foo (int &, bool) const;
+};
+bool D::foo (int &, bool) const {}
+F::F (int &, const int &, const A &) {}
+bool F::foo (int &, bool) const {}
{
rtx target = DECL_RTL (snode->ultimate_alias_target ()->decl);
+ gcc_assert (MEM_P (target)
+ && GET_CODE (XEXP (target, 0)) == SYMBOL_REF
+ && SYMBOL_REF_HAS_BLOCK_INFO_P (XEXP (target, 0)));
+ target = XEXP (target, 0);
place_block_symbol (target);
SYMBOL_REF_BLOCK_OFFSET (symbol) = SYMBOL_REF_BLOCK_OFFSET (target);
return;