]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libstdc++/43622 (Incomplete C++ library support for __float128)
authorMarc Glisse <marc.glisse@inria.fr>
Tue, 22 Apr 2014 16:44:46 +0000 (18:44 +0200)
committerMarc Glisse <glisse@gcc.gnu.org>
Tue, 22 Apr 2014 16:44:46 +0000 (16:44 +0000)
2014-04-22  Marc Glisse  <marc.glisse@inria.fr>

PR libstdc++/43622
gcc/c-family/
* c-common.c (registered_builtin_types): Make non-static.
* c-common.h (registered_builtin_types): Declare.
gcc/cp/
* rtti.c (emit_support_tinfo_1): New function, extracted from
emit_support_tinfos.
(emit_support_tinfos): Call it and iterate on registered_builtin_types.
libstdc++-v3/
* config/abi/pre/gnu.ver (CXXABI_1.3.9): New version, new symbols.
* config/abi/pre/gnu-versioned-namespace.ver: New symbols.
* config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Likewise.

From-SVN: r209652

gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-common.h
gcc/cp/ChangeLog
gcc/cp/rtti.c
libstdc++-v3/ChangeLog
libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt
libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
libstdc++-v3/config/abi/pre/gnu.ver

index 206b47b13699059278787d1e90f77c16097b0103..66158caa6a95be31836fc78c608dd51a7b45007a 100644 (file)
@@ -1,3 +1,9 @@
+2014-04-22  Marc Glisse  <marc.glisse@inria.fr>
+
+       PR libstdc++/43622
+       * c-common.c (registered_builtin_types): Make non-static.
+       * c-common.h (registered_builtin_types): Declare.
+
 2014-04-14  Richard Biener  <rguenther@suse.de>
        Marc Glisse  <marc.glisse@inria.fr>
 
index c0e247b27071b267f7c3b8f52ac5587239132367..0b5ded8f6f990cdc2457e9c72f54c1884b71bb41 100644 (file)
@@ -3469,7 +3469,7 @@ c_common_fixed_point_type_for_size (unsigned int ibit, unsigned int fbit,
 
 /* Used for communication between c_common_type_for_mode and
    c_register_builtin_type.  */
-static GTY(()) tree registered_builtin_types;
+tree registered_builtin_types;
 
 /* Return a data type that has machine mode MODE.
    If the mode is an integer,
index 24959d83e33e2e8b972d13489c885ce27f20852e..57b7dceefdc18d6ff1aea25c7dc3c1e0c3f4fac2 100644 (file)
@@ -1013,6 +1013,10 @@ extern vec<tree, va_gc> *make_tree_vector_single (tree);
 extern vec<tree, va_gc> *make_tree_vector_from_list (tree);
 extern vec<tree, va_gc> *make_tree_vector_copy (const vec<tree, va_gc> *);
 
+/* Used for communication between c_common_type_for_mode and
+   c_register_builtin_type.  */
+extern GTY(()) tree registered_builtin_types;
+
 /* In c-gimplify.c  */
 extern void c_genericize (tree);
 extern int c_gimplify_expr (tree *, gimple_seq *, gimple_seq *);
index 2105ab2cd9113073ae9d075263a18837ecd44a35..854cc4b21a4c273dd2745b3bd809fe22d97c9005 100644 (file)
@@ -1,3 +1,10 @@
+2014-04-22  Marc Glisse  <marc.glisse@inria.fr>
+
+       PR libstdc++/43622
+       * rtti.c (emit_support_tinfo_1): New function, extracted from
+       emit_support_tinfos.
+       (emit_support_tinfos): Call it and iterate on registered_builtin_types.
+
 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
 
        PR c/59073
index a8e6d25c844428dbb7156d5aec07cc4c8147c5cf..a35036d64ac8fe87f51d39187c2594eaa7a56e75 100644 (file)
@@ -1465,6 +1465,44 @@ create_tinfo_types (void)
   pop_abi_namespace ();
 }
 
+/* Helper for emit_support_tinfos. Emits the type_info descriptor of
+   a single type.  */
+
+void
+emit_support_tinfo_1 (tree bltn)
+{
+  tree types[3];
+
+  if (bltn == NULL_TREE)
+    return;
+  types[0] = bltn;
+  types[1] = build_pointer_type (bltn);
+  types[2] = build_pointer_type (cp_build_qualified_type (bltn,
+                                                         TYPE_QUAL_CONST));
+
+  for (int i = 0; i < 3; ++i)
+    {
+      tree tinfo = get_tinfo_decl (types[i]);
+      TREE_USED (tinfo) = 1;
+      mark_needed (tinfo);
+      /* The C++ ABI requires that these objects be COMDAT.  But,
+        On systems without weak symbols, initialized COMDAT
+        objects are emitted with internal linkage.  (See
+        comdat_linkage for details.)  Since we want these objects
+        to have external linkage so that copies do not have to be
+        emitted in code outside the runtime library, we make them
+        non-COMDAT here.  
+
+        It might also not be necessary to follow this detail of the
+        ABI.  */
+      if (!flag_weak || ! targetm.cxx.library_rtti_comdat ())
+       {
+         gcc_assert (TREE_PUBLIC (tinfo) && !DECL_COMDAT (tinfo));
+         DECL_INTERFACE_KNOWN (tinfo) = 1;
+       }
+    }
+}
+
 /* Emit the type_info descriptors which are guaranteed to be in the runtime
    support.  Generating them here guarantees consistency with the other
    structures.  We use the following heuristic to determine when the runtime
@@ -1507,42 +1545,9 @@ emit_support_tinfos (void)
     return;
   doing_runtime = 1;
   for (ix = 0; fundamentals[ix]; ix++)
-    {
-      tree bltn = *fundamentals[ix];
-      tree types[3];
-      int i;
-
-      if (bltn == NULL_TREE)
-       continue;
-      types[0] = bltn;
-      types[1] = build_pointer_type (bltn);
-      types[2] = build_pointer_type (cp_build_qualified_type (bltn,
-                                                             TYPE_QUAL_CONST));
-
-      for (i = 0; i < 3; ++i)
-       {
-         tree tinfo;
-
-         tinfo = get_tinfo_decl (types[i]);
-         TREE_USED (tinfo) = 1;
-         mark_needed (tinfo);
-         /* The C++ ABI requires that these objects be COMDAT.  But,
-            On systems without weak symbols, initialized COMDAT
-            objects are emitted with internal linkage.  (See
-            comdat_linkage for details.)  Since we want these objects
-            to have external linkage so that copies do not have to be
-            emitted in code outside the runtime library, we make them
-            non-COMDAT here.  
-
-            It might also not be necessary to follow this detail of the
-            ABI.  */
-         if (!flag_weak || ! targetm.cxx.library_rtti_comdat ())
-           {
-             gcc_assert (TREE_PUBLIC (tinfo) && !DECL_COMDAT (tinfo));
-             DECL_INTERFACE_KNOWN (tinfo) = 1;
-           }
-       }
-    }
+    emit_support_tinfo_1 (*fundamentals[ix]);
+  for (tree t = registered_builtin_types; t; t = TREE_CHAIN (t))
+    emit_support_tinfo_1 (TREE_VALUE (t));
 }
 
 /* Finish a type info decl. DECL_PTR is a pointer to an unemitted
index ca277836a1176da4015ecf794effa4cbbc881cca..4a0a5cb73f08a9b39d5af5e797a3b04bac7db8fb 100644 (file)
@@ -1,3 +1,10 @@
+2014-04-22  Marc Glisse  <marc.glisse@inria.fr>
+
+       PR libstdc++/43622
+       * config/abi/pre/gnu.ver (CXXABI_1.3.9): New version, new symbols.
+       * config/abi/pre/gnu-versioned-namespace.ver: New symbols.
+       * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Likewise.
+
 2014-04-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * configure.host: Remove solaris2.9 handling.
index d86b830429353a3b0ad96ebaa94b2d36fb45a242..30d29b2063ffe89492fd2d337ecf42af34cababc 100644 (file)
@@ -2520,6 +2520,7 @@ OBJECT:0:CXXABI_1.3.5
 OBJECT:0:CXXABI_1.3.6
 OBJECT:0:CXXABI_1.3.7
 OBJECT:0:CXXABI_1.3.8
+OBJECT:0:CXXABI_1.3.9
 OBJECT:0:CXXABI_TM_1
 OBJECT:0:GLIBCXX_3.4
 OBJECT:0:GLIBCXX_3.4.1
@@ -2624,6 +2625,7 @@ OBJECT:16:_ZTIc@@CXXABI_1.3
 OBJECT:16:_ZTId@@CXXABI_1.3
 OBJECT:16:_ZTIe@@CXXABI_1.3
 OBJECT:16:_ZTIf@@CXXABI_1.3
+OBJECT:16:_ZTIg@@CXXABI_1.3.9
 OBJECT:16:_ZTIh@@CXXABI_1.3
 OBJECT:16:_ZTIi@@CXXABI_1.3
 OBJECT:16:_ZTIj@@CXXABI_1.3
@@ -3124,11 +3126,14 @@ OBJECT:2:_ZTSc@@CXXABI_1.3
 OBJECT:2:_ZTSd@@CXXABI_1.3
 OBJECT:2:_ZTSe@@CXXABI_1.3
 OBJECT:2:_ZTSf@@CXXABI_1.3
+OBJECT:2:_ZTSg@@CXXABI_1.3.9
 OBJECT:2:_ZTSh@@CXXABI_1.3
 OBJECT:2:_ZTSi@@C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BJECT:3:_ZTSPn@@CXXABI_1.3.9
+OBJECT:3:_ZTSPo@@CXXABI_1.3.9
 OBJECT:3:_ZTSPs@@CXXABI_1.3
 OBJECT:3:_ZTSPt@@CXXABI_1.3
 OBJECT:3:_ZTSPv@@CXXABI_1.3
@@ -3555,11 +3565,14 @@ OBJECT:4:_ZTSPKc@@CXXABI_1.3
 OBJECT:4:_ZTSPKd@@CXXABI_1.3
 OBJECT:4:_ZTSPKe@@CXXABI_1.3
 OBJECT:4:_ZTSPKf@@CXXABI_1.3
+OBJECT:4:_ZTSPKg@@CXXABI_1.3.9
 OBJECT:4:_ZTSPKh@@CXXABI_1.3
 OBJECT:4:_ZTSPKi@@CXXABI_1.3
 OBJECT:4:_ZTSPKj@@CXXABI_1.3
 OBJECT:4:_ZTSPKl@@CXXABI_1.3
 OBJECT:4:_ZTSPKm@@CXXABI_1.3
+OBJECT:4:_ZTSPKn@@CXXABI_1.3.9
+OBJECT:4:_ZTSPKo@@CXXABI_1.3.9
 OBJECT:4:_ZTSPKs@@CXXABI_1.3
 OBJECT:4:_ZTSPKt@@CXXABI_1.3
 OBJECT:4:_ZTSPKv@@CXXABI_1.3
index 31155b723264cb2b8de31942c95790bdc161659b..34360638c11dfa61df6b96b5d60ddc15dbc8de6c 100644 (file)
@@ -321,10 +321,10 @@ CXXABI_2.0 {
     _ZTIPDn;
     _ZTIPKDn;
 
-    # typeinfo for __int128 and unsigned __int128
-    _ZTI[no];
-    _ZTIP[no];
-    _ZTIPK[no];
+    # typeinfo for __int128, unsigned __int128 and __float128
+    _ZTI[gno];
+    _ZTIP[gno];
+    _ZTIPK[gno];
 
     # virtual table
     _ZTVN10__cxxabiv117__array_type_infoE;
index f3afb94197aa6b27feb3a0dc2c42fe49d89739d5..f0ce4f09a1f98fde319b332f494d5f0c4bfe8452 100644 (file)
@@ -1584,6 +1584,20 @@ CXXABI_1.3.8 {
 
 } CXXABI_1.3.7;
 
+CXXABI_1.3.9 {
+
+    # typeinfo name for __int128, unsigned __int128 and __float128
+    _ZTS[gno];
+    _ZTSP[gno];
+    _ZTSPK[gno];
+
+    # typeinfo for __float128
+    _ZTIg;
+    _ZTIPg;
+    _ZTIPKg;
+
+} CXXABI_1.3.8;
+
 # Symbols in the support library (libsupc++) supporting transactional memory.
 CXXABI_TM_1 {