From d240d5fde9d3e9a790b7f585e2ecaba7c071d3a5 Mon Sep 17 00:00:00 2001 From: jason Date: Fri, 29 Aug 2014 19:30:10 +0000 Subject: [PATCH] * cp-demangle.c (d_dump): Only access field from s_fixed part of the union for DEMANGLE_COMPONENT_FIXED_TYPE. (d_count_templates_scopes): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214740 138bc75d-0d04-0410-961f-82ee72b054a4 --- libiberty/ChangeLog | 6 ++++++ libiberty/cp-demangle.c | 10 ++++++++-- libiberty/testsuite/demangle-expected | 5 +++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 96064ac7405..10a5afa62a9 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,9 @@ +2014-08-29 Andrew Burgess + + * cp-demangle.c (d_dump): Only access field from s_fixed part of + the union for DEMANGLE_COMPONENT_FIXED_TYPE. + (d_count_templates_scopes): Likewise. + 2014-08-13 Gary Benson * testsuite/demangler-fuzzer.c: New file. diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index c0d2ffee7d9..4ecdb1ee439 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -713,7 +713,9 @@ d_dump (struct demangle_component *dc, int indent) printf ("pointer to member type\n"); break; case DEMANGLE_COMPONENT_FIXED_TYPE: - printf ("fixed-point type\n"); + printf ("fixed-point type, accum? %d, sat? %d\n", + dc->u.s_fixed.accum, dc->u.s_fixed.sat); + d_dump (dc->u.s_fixed.length, indent + 2) break; case DEMANGLE_COMPONENT_ARGLIST: printf ("argument list\n"); @@ -3875,7 +3877,6 @@ d_count_templates_scopes (int *num_templates, int *num_scopes, case DEMANGLE_COMPONENT_FUNCTION_TYPE: case DEMANGLE_COMPONENT_ARRAY_TYPE: case DEMANGLE_COMPONENT_PTRMEM_TYPE: - case DEMANGLE_COMPONENT_FIXED_TYPE: case DEMANGLE_COMPONENT_VECTOR_TYPE: case DEMANGLE_COMPONENT_ARGLIST: case DEMANGLE_COMPONENT_TEMPLATE_ARGLIST: @@ -3920,6 +3921,11 @@ d_count_templates_scopes (int *num_templates, int *num_scopes, dc->u.s_extended_operator.name); break; + case DEMANGLE_COMPONENT_FIXED_TYPE: + d_count_templates_scopes (num_templates, num_scopes, + dc->u.s_fixed.length); + break; + case DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS: case DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS: d_count_templates_scopes (num_templates, num_scopes, diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index 864ee7e0f9c..f8420efac90 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -4343,6 +4343,11 @@ cereal::detail::InputBindingMap::Serializers cereal::p --format=gnu-v3 _ZNSt9_Any_data9_M_accessIPZ4postISt8functionIFvvEEEvOT_EUlvE_EERS5_v void post >(std::function&&)::{lambda()#1}*& std::_Any_data::_M_access >(void post >(std::function&&)::{lambda()#1}*&&)::{lambda()#1}*>() +# +--format=auto --no-params +_Z3xxxDFyuVb +xxx(unsigned long long _Fract, bool volatile) +xxx # https://sourceware.org/bugzilla/show_bug.cgi?id=16817 --format=auto --no-params _QueueNotification_QueueController__$4PPPPPPPM_A_INotice___Z -- 2.11.4.GIT