class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN ignoring other...
authorJan Hubicka <hubicka@ucw.cz>
Sat, 24 May 2014 01:41:06 +0000 (03:41 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 24 May 2014 01:41:06 +0000 (01:41 +0000)
* class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
ignoring other target adjustments.

From-SVN: r210886

gcc/cp/ChangeLog
gcc/cp/class.c

index 90ded5b0bd41443ff31b3afa4955ca93304ef0de..5f6ee37baaa3b4592d807c728c29fb47948f95a0 100644 (file)
@@ -1,3 +1,8 @@
+2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
+
+       * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
+       ignoring other target adjustments.
+
 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
 
        * semantics.c (finish_omp_clauses): Remove duplicated variable
index 05aacfa859821d642de31d4ca14d45ff4c2e03ca..14780e787dae3f2d9a12c5c6cb9cdfd80c34ded6 100644 (file)
@@ -768,11 +768,8 @@ build_vtable (tree class_type, tree name, tree vtable_type)
   TREE_READONLY (decl) = 1;
   DECL_VIRTUAL_P (decl) = 1;
   DECL_ALIGN (decl) = TARGET_VTABLE_ENTRY_ALIGN;
+  DECL_USER_ALIGN (decl) = true;
   DECL_VTABLE_OR_VTT_P (decl) = 1;
-  /* At one time the vtable info was grabbed 2 words at a time.  This
-     fails on sparc unless you have 8-byte alignment.  (tiemann) */
-  DECL_ALIGN (decl) = MAX (TYPE_ALIGN (double_type_node),
-                          DECL_ALIGN (decl));
   set_linkage_according_to_type (class_type, decl);
   /* The vtable has not been defined -- yet.  */
   DECL_EXTERNAL (decl) = 1;