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 206b47b..66158ca 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 c0e247b..0b5ded8 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 24959d8..57b7dce 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 2105ab2..854cc4b 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 a8e6d25..a35036d 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 ca27783..4a0a5cb 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 d86b830..30d29b2 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@@CXXABI_1.3
 OBJECT:2:_ZTSj@@CXXABI_1.3
 OBJECT:2:_ZTSl@@CXXABI_1.3
 OBJECT:2:_ZTSm@@CXXABI_1.3
+OBJECT:2:_ZTSn@@CXXABI_1.3.9
+OBJECT:2:_ZTSo@@CXXABI_1.3.9
 OBJECT:2:_ZTSs@@CXXABI_1.3
 OBJECT:2:_ZTSt@@CXXABI_1.3
 OBJECT:2:_ZTSv@@CXXABI_1.3
@@ -3155,6 +3160,7 @@ OBJECT:32:_ZTIPKc@@CXXABI_1.3
 OBJECT:32:_ZTIPKd@@CXXABI_1.3
 OBJECT:32:_ZTIPKe@@CXXABI_1.3
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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 31155b7..3436063 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 f3afb94..f0ce4f0 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 {