diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2014-04-22 18:44:46 +0200 |
---|---|---|
committer | Marc Glisse <glisse@gcc.gnu.org> | 2014-04-22 16:44:46 +0000 |
commit | 793c625fb803247ea5b759c11dbeb3d6882cd74a (patch) | |
tree | 44bd0f6e4b48f83095c786032dba2ce89733a04f /gcc | |
parent | c6d43074d81f1d46a061689d66a68d775aa4250a (diff) | |
download | gcc-793c625fb803247ea5b759c11dbeb3d6882cd74a.zip gcc-793c625fb803247ea5b759c11dbeb3d6882cd74a.tar.gz gcc-793c625fb803247ea5b759c11dbeb3d6882cd74a.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/c-family/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-family/c-common.c | 2 | ||||
-rw-r--r-- | gcc/c-family/c-common.h | 4 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/rtti.c | 77 |
5 files changed, 59 insertions, 37 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 206b47b..66158ca 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -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> diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index c0e247b..0b5ded8 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -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, diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index 24959d8..57b7dce 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -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 *); diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2105ab2c..854cc4b 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index a8e6d25..a35036d 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -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 |