This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [c++] typeinfo for target types


On 04/13/2014 01:41 AM, Marc Glisse wrote:
> Hello,
> 
> this patch generates typeinfo for target types. On x86_64, it adds these 6
> lines to nm -C libsupc++.a. A follow-up patch will be needed to export and
> version those in the shared library.
> 
> +0000000000000000 V typeinfo for __float128
> +0000000000000000 V typeinfo for __float128 const*
> +0000000000000000 V typeinfo for __float128*
> +0000000000000000 V typeinfo name for __float128
> +0000000000000000 V typeinfo name for __float128 const*
> +0000000000000000 V typeinfo name for __float128*
> 
> Bootstrap and testsuite on x86_64-linux-gnu (a bit of noise in tsan/tls_race.c).
> 
> 2014-04-13  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.
> 

This is causing aarch64 builds to break.  Any c++ compilation aborts at

#0  fancy_abort (file=0x14195c8 "../../git-rh/gcc/cp/mangle.c", line=2303,
    function=0x1419ff8 <write_builtin_type(tree_node*)::__FUNCTION__>
    "write_builtin_type") at ../../git-rh/gcc/diagnostic.c:1190
#1  0x00000000007ce2b4 in write_builtin_type (
    type=<real_type 0x7fb1653540 __builtin_aarch64_simd_df>)
    at ../../git-rh/gcc/cp/mangle.c:2303
#2  0x00000000007cc85c in write_type (
    type=<real_type 0x7fb1653540 __builtin_aarch64_simd_df>)
    at ../../git-rh/gcc/cp/mangle.c:1969
#3  0x00000000007d4d98 in mangle_special_for_type (
    type=<real_type 0x7fb1653540 __builtin_aarch64_simd_df>,
    code=0x1419a98 "TI") at ../../git-rh/gcc/cp/mangle.c:3569
#4  0x00000000007d4dcc in mangle_typeinfo_for_type (
    type=<real_type 0x7fb1653540 __builtin_aarch64_simd_df>)
    at ../../git-rh/gcc/cp/mangle.c:3585
#5  0x000000000070618c in get_tinfo_decl (
    type=<real_type 0x7fb1653540 __builtin_aarch64_simd_df>)
    at ../../git-rh/gcc/cp/rtti.c:422
#6  0x0000000000709ff0 in emit_support_tinfo_1 (
    bltn=<real_type 0x7fb1653540 __builtin_aarch64_simd_df>)
    at ../../git-rh/gcc/cp/rtti.c:1485
#7  0x000000000070a344 in emit_support_tinfos ()
    at ../../git-rh/gcc/cp/rtti.c:1550

Presumably the backend needs to grow some mangling support for its builtins,
but in the meantime can we do something less drastic than abort?  Isn't this
only really an issue if someone tries to access one of these types via typeinfo?


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]