Commit 793c625f by Marc Glisse Committed by Marc Glisse

re PR libstdc++/43622 (Incomplete C++ library support for __float128)

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
parent c6d43074
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> 2014-04-14 Richard Biener <rguenther@suse.de>
Marc Glisse <marc.glisse@inria.fr> Marc Glisse <marc.glisse@inria.fr>
......
...@@ -3469,7 +3469,7 @@ c_common_fixed_point_type_for_size (unsigned int ibit, unsigned int fbit, ...@@ -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 /* Used for communication between c_common_type_for_mode and
c_register_builtin_type. */ c_register_builtin_type. */
static GTY(()) tree registered_builtin_types; tree registered_builtin_types;
/* Return a data type that has machine mode MODE. /* Return a data type that has machine mode MODE.
If the mode is an integer, If the mode is an integer,
......
...@@ -1013,6 +1013,10 @@ extern vec<tree, va_gc> *make_tree_vector_single (tree); ...@@ -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_from_list (tree);
extern vec<tree, va_gc> *make_tree_vector_copy (const vec<tree, va_gc> *); 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 */ /* In c-gimplify.c */
extern void c_genericize (tree); extern void c_genericize (tree);
extern int c_gimplify_expr (tree *, gimple_seq *, gimple_seq *); extern int c_gimplify_expr (tree *, gimple_seq *, gimple_seq *);
......
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> 2014-04-22 Jakub Jelinek <jakub@redhat.com>
PR c/59073 PR c/59073
......
...@@ -1465,6 +1465,44 @@ create_tinfo_types (void) ...@@ -1465,6 +1465,44 @@ create_tinfo_types (void)
pop_abi_namespace (); 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 /* Emit the type_info descriptors which are guaranteed to be in the runtime
support. Generating them here guarantees consistency with the other support. Generating them here guarantees consistency with the other
structures. We use the following heuristic to determine when the runtime structures. We use the following heuristic to determine when the runtime
...@@ -1507,42 +1545,9 @@ emit_support_tinfos (void) ...@@ -1507,42 +1545,9 @@ emit_support_tinfos (void)
return; return;
doing_runtime = 1; doing_runtime = 1;
for (ix = 0; fundamentals[ix]; ix++) for (ix = 0; fundamentals[ix]; ix++)
{ emit_support_tinfo_1 (*fundamentals[ix]);
tree bltn = *fundamentals[ix]; for (tree t = registered_builtin_types; t; t = TREE_CHAIN (t))
tree types[3]; emit_support_tinfo_1 (TREE_VALUE (t));
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;
}
}
}
} }
/* Finish a type info decl. DECL_PTR is a pointer to an unemitted /* Finish a type info decl. DECL_PTR is a pointer to an unemitted
......
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> 2014-04-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.host: Remove solaris2.9 handling. * configure.host: Remove solaris2.9 handling.
......
...@@ -2520,6 +2520,7 @@ OBJECT:0:CXXABI_1.3.5 ...@@ -2520,6 +2520,7 @@ OBJECT:0:CXXABI_1.3.5
OBJECT:0:CXXABI_1.3.6 OBJECT:0:CXXABI_1.3.6
OBJECT:0:CXXABI_1.3.7 OBJECT:0:CXXABI_1.3.7
OBJECT:0:CXXABI_1.3.8 OBJECT:0:CXXABI_1.3.8
OBJECT:0:CXXABI_1.3.9
OBJECT:0:CXXABI_TM_1 OBJECT:0:CXXABI_TM_1
OBJECT:0:GLIBCXX_3.4 OBJECT:0:GLIBCXX_3.4
OBJECT:0:GLIBCXX_3.4.1 OBJECT:0:GLIBCXX_3.4.1
...@@ -2624,6 +2625,7 @@ OBJECT:16:_ZTIc@@CXXABI_1.3 ...@@ -2624,6 +2625,7 @@ OBJECT:16:_ZTIc@@CXXABI_1.3
OBJECT:16:_ZTId@@CXXABI_1.3 OBJECT:16:_ZTId@@CXXABI_1.3
OBJECT:16:_ZTIe@@CXXABI_1.3 OBJECT:16:_ZTIe@@CXXABI_1.3
OBJECT:16:_ZTIf@@CXXABI_1.3 OBJECT:16:_ZTIf@@CXXABI_1.3
OBJECT:16:_ZTIg@@CXXABI_1.3.9
OBJECT:16:_ZTIh@@CXXABI_1.3 OBJECT:16:_ZTIh@@CXXABI_1.3
OBJECT:16:_ZTIi@@CXXABI_1.3 OBJECT:16:_ZTIi@@CXXABI_1.3
OBJECT:16:_ZTIj@@CXXABI_1.3 OBJECT:16:_ZTIj@@CXXABI_1.3
...@@ -3124,11 +3126,14 @@ OBJECT:2:_ZTSc@@CXXABI_1.3 ...@@ -3124,11 +3126,14 @@ OBJECT:2:_ZTSc@@CXXABI_1.3
OBJECT:2:_ZTSd@@CXXABI_1.3 OBJECT:2:_ZTSd@@CXXABI_1.3
OBJECT:2:_ZTSe@@CXXABI_1.3 OBJECT:2:_ZTSe@@CXXABI_1.3
OBJECT:2:_ZTSf@@CXXABI_1.3 OBJECT:2:_ZTSf@@CXXABI_1.3
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ZTIPKDn;
# typeinfo for __int128 and unsigned __int128 # typeinfo for __int128, unsigned __int128 and __float128
_ZTI[no]; _ZTI[gno];
_ZTIP[no]; _ZTIP[gno];
_ZTIPK[no]; _ZTIPK[gno];
# virtual table # virtual table
_ZTVN10__cxxabiv117__array_type_infoE; _ZTVN10__cxxabiv117__array_type_infoE;
......
...@@ -1584,6 +1584,20 @@ CXXABI_1.3.8 { ...@@ -1584,6 +1584,20 @@ CXXABI_1.3.8 {
} CXXABI_1.3.7; } 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. # Symbols in the support library (libsupc++) supporting transactional memory.
CXXABI_TM_1 { CXXABI_TM_1 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment