1. 26 Sep, 2014 2 commits
  2. 23 Sep, 2014 1 commit
    • demangle.h (DMGL_DLANG): New macro. · 43b1b9ed
      include/:
      	* demangle.h (DMGL_DLANG): New macro.
      	(DMGL_STYLE_MASK): Add DMGL_DLANG.
      	(demangling_styles): Add dlang_demangling.
      	(DLANG_DEMANGLING_STYLE_STRING): New macro.
      	(DLANG_DEMANGLING): New macro.
      	(dlang_demangle): New prototype.
      libiberty/:
      	* Makefile.in (CFILES): Add d-demangle.c.
      	(REQUIRED_OFILES): Add d-demangle.o.
      	* cplus-dem.c (libiberty_demanglers): Add dlang_demangling case.
      	(cplus_demangle): Likewise.
      	* d-demangle.c: New file.
      	* testsuite/Makefile.in (really-check): Add check-d-demangle.
      	* testsuite/d-demangle-expected: New file.
      
      From-SVN: r215530
      Iain Buclaw committed
  3. 19 Sep, 2014 1 commit
  4. 29 Aug, 2014 1 commit
  5. 13 Aug, 2014 1 commit
  6. 11 Jun, 2014 1 commit
    • Delete temporary string within demangler even in failure cases. · ac8345a5
      A call to demangle_template might allocate storage within a temporary
      string even if the call to demangle_template eventually returns
      failure.
      
      This will never cause the demangler to crash, but does leak memory, as
      a result I've not added any tests for this.
      
      Calling string_delete is safe, even if nothing is allocated into the
      string, the string is initialised with string_init, so we know the
      internal pointers are NULL.
      
      libiberty/ChangeLog
      
      	* cplus-dem.c (do_type): Call string_delete even if the call to
      	demangle_template fails.
      
      From-SVN: r211449
      Andrew Burgess committed
  7. 01 Jun, 2014 1 commit
  8. 28 May, 2014 1 commit
    • Fix demangler testsuite crashes with CP_DEMANGLE_DEBUG defined · bc2eed9a
      Running the demangler's testsuite with CP_DEMANGLE_DEBUG defined
      crashes, with:
      
       Program received signal SIGSEGV, Segmentation fault.
       0x000000000040a8c3 in d_dump (dc=0x1, indent=12) at ../../src/libiberty/cp-demangle.c:567
       567       switch (dc->type)
      
       (gdb) bt 3
       #0  0x000000000040a8c3 in d_dump (dc=0x1, indent=12) at ../../src/libiberty/cp-demangle.c:567
       #1  0x000000000040ae47 in d_dump (dc=0x7fffffffd098, indent=10) at ../../src/libiberty/cp-demangle.c:787
       #2  0x000000000040ae47 in d_dump (dc=0x7fffffffd0c8, indent=8) at ../../src/libiberty/cp-demangle.c:787
      
      Note dc=0x1, which is obviously a bogus pointer.  This is the end of
      d_dump recursing for a component type that that doesn't actually have
      subtrees:
      
       787       d_dump (d_left (dc), indent + 2);
       788       d_dump (d_right (dc), indent + 2);
      
      This fixes the two cases the testsuite currently trips on.
      
      libiberty/
      2014-05-28  Pedro Alves  <palves@redhat.com>
      
      	* cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_FUNCTION_PARAM
      	and DEMANGLE_COMPONENT_NUMBER.
      
      From-SVN: r211035
      Pedro Alves committed
  9. 22 May, 2014 1 commit
  10. 14 May, 2014 1 commit
  11. 08 May, 2014 1 commit
    • cp-demangle.c (struct d_component_stack): New structure. · 861c3495
      libiberty/
      2014-05-08  Gary Benson  <gbenson@redhat.com>
      
      	* cp-demangle.c (struct d_component_stack): New structure.
      	(struct d_print_info): New field component_stack.
      	(d_print_init): Initialize the above.
      	(d_print_comp_inner): Renamed from d_print_comp.
      	Do not restore template stack if it would cause a loop.
      	(d_print_comp): New function.
      	* testsuite/demangle-expected: New test cases.
      
      From-SVN: r210205
      Gary Benson committed
  12. 17 Apr, 2014 1 commit
    • re PR sanitizer/56781 (boostrap-asan failure: fixincl fails to link (missing -lasan)) · 4f148bbc
      	PR sanitizer/56781
      lto-plugin/
      	* Makefile.am (CFLAGS, LDFLAGS): Filter out -fsanitize=address.
      	(liblto_plugin_la_LIBADD, liblto_plugin_la_LDFLAGS,
      	liblto_plugin_la_DEPENDENCIES): Prefer ../libiberty/noasan/libiberty.a
      	over ../libiberty/pic/libiberty.a if the former exists.
      	* Makefile.in: Regenerated.
      libiberty/
      	* maint-tool: Also emit rule for noasan/ subdirectory.
      	* configure.ac (NOASANFLAG): Set and substitute.
      	* Makefile.in: Regenerated.
      	(NOASANFLAG): Set.
      	(all, $(TARGETLIB), mostlyclean): Handle noasan subdir like pic
      	subdir.
      	(stamp-noasandir): New goal.
      	* configure: Regenerated.
      
      From-SVN: r209476
      Jakub Jelinek committed
  13. 01 Apr, 2014 1 commit
  14. 28 Mar, 2014 1 commit
  15. 13 Mar, 2014 2 commits
  16. 28 Jan, 2014 1 commit
  17. 21 Jan, 2014 1 commit
    • include · d2d21de9
      	* ansidecl.h (ANSI_PROTOTYPES, PTRCONST, LONG_DOUBLE, PARAMS)
      	(VPARAMS, VA_START, VA_OPEN, VA_CLOSE, VA_FIXEDARG, CONST)
      	(VOLATILE, SIGNED, PROTO, EXFUN, DEFUN, DEFUN_VOID, AND, DOTS)
      	(NOARGS): Don't define.
      	* libiberty.h (expandargv, writeargv): Don't use PARAMS.
      libiberty
      	* _doprint.c (checkit): Use stdarg, not VA_* macros.
      	* asprintf.c (asprintf): Use stdarg, not VA_* macros.
      	* concat.c (concat_length, concat_copy, concat_copy2, concat)
      	(reconcat): Use stdarg, not VA_* macros.
      	* snprintf.c (snprintf): Use stdarg, not VA_* macros.
      	* vasprintf.c (checkit): Use stdarg, not VA_* macros.
      	* vsnprintf.c (checkit): Use stdarg, not VA_* macros.
      
      From-SVN: r206881
      Tom Tromey committed
  18. 06 Jan, 2014 2 commits
    • libiberty: fix --enable-install-libiberty flag [PR 56780] · 0225cc0f
      Commit 199570 fixed the --disable-install-libiberty behavior, but it also
      added a bug where the enable path never works because the initial clear
      of target_header_dir wasn't deleted.  So we end up initializing properly
      at the top only to reset it at the end all the time.
      
      From-SVN: r206367
      Mike Frysinger committed
    • cp-demangle.c (struct d_print_info): New fields next_saved_scope... · 0a15a50e
      libiberty/
      2014-01-06  Gary Benson  <gbenson@redhat.com>
      
      	* cp-demangle.c (struct d_print_info): New fields
      	next_saved_scope, copy_templates, next_copy_template and
      	num_copy_templates.
      	(d_count_templates): New function.
      	(d_print_init): New parameter "dc".
      	Estimate numbers of templates and scopes required.
      	(d_print_free): Removed function.
      	(cplus_demangle_print_callback): Allocate stack for
      	templates and scopes.  Removed call to d_print_free.
      	(d_copy_templates): Removed function.
      	(d_save_scope): New function.
      	(d_get_saved_scope): Likewise.
      	(d_print_comp): Replace state saving/restoring code with
      	calls to d_save_scope and d_get_saved_scope.
      
      From-SVN: r206362
      Gary Benson committed
  19. 23 Dec, 2013 1 commit
    • re PR c++/41090 (Using static label reference in c++ class constructor produces wrong code) · 1f26ac87
      	PR c++/41090
      	Add -fdeclone-ctor-dtor.
      gcc/cp/
      	* optimize.c (can_alias_cdtor, populate_clone_array): Split out
      	from maybe_clone_body.
      	(maybe_thunk_body): New function.
      	(maybe_clone_body): Call it.
      	* mangle.c (write_mangled_name): Remove code to suppress
      	writing of mangled name for cloned constructor or destructor.
      	(write_special_name_constructor): Handle decloned constructor.
      	(write_special_name_destructor): Handle decloned destructor.
      	* method.c (trivial_fn_p): Handle decloning.
      	* semantics.c (expand_or_defer_fn_1): Clone after setting linkage.
      gcc/c-family/
      	* c.opt: Add -fdeclone-ctor-dtor.
      	* c-opts.c (c_common_post_options): Default to on iff -Os.
      gcc/
      	* cgraph.h (struct cgraph_node): Add calls_comdat_local.
      	(symtab_comdat_local_p, symtab_in_same_comdat_p): New.
      	* cif-code.def: Add USES_COMDAT_LOCAL.
      	* symtab.c (verify_symtab_base): Make sure we don't refer to a
      	comdat-local symbol from outside its comdat.
      	* cgraph.c (verify_cgraph_node): Likewise.
      	* cgraphunit.c (mark_functions_to_output): Don't mark comdat-locals.
      	* ipa.c (symtab_remove_unreachable_nodes): Likewise.
      	(function_and_variable_visibility): Handle comdat-local fns.
      	* ipa-cp.c (determine_versionability): Don't clone comdat-locals.
      	* ipa-inline-analysis.c (compute_inline_parameters): Update
      	calls_comdat_local.
      	* ipa-inline-transform.c (inline_call): Likewise.
      	(save_inline_function_body): Don't clear DECL_COMDAT_GROUP.
      	* ipa-inline.c (can_inline_edge_p): Check calls_comdat_local.
      	* lto-cgraph.c (input_overwrite_node): Read calls_comdat_local.
      	(lto_output_node): Write it.
      	* symtab.c (symtab_dissolve_same_comdat_group_list): Clear
      	DECL_COMDAT_GROUP for comdat-locals.
      include/
      	* demangle.h (enum gnu_v3_ctor_kinds):
      	Added literal gnu_v3_unified_ctor.
      	(enum gnu_v3_ctor_kinds):
      	Added literal gnu_v3_unified_dtor.
      libiberty/
      	* cp-demangle.c (cplus_demangle_fill_ctor,cplus_demangle_fill_dtor):
      	Handle unified ctor/dtor.
      	(d_ctor_dtor_name): Handle unified ctor/dtor.
      
      From-SVN: r206182
      Jason Merrill committed
  20. 22 Nov, 2013 1 commit
    • Fix demangler to handle conversion operators correctly. · 85d09f61
      libiberty/
      	PR other/59195
      	* cp-demangle.c (struct d_info_checkpoint): New struct.
      	(struct d_print_info): Add current_template field.
      	(d_operator_name): Set flag when processing a conversion
      	operator.
      	(cplus_demangle_type): When processing <template-args> for
      	a conversion operator, backtrack if necessary.
      	(d_expression_1): Renamed from d_expression.
      	(d_expression): New wrapper around d_expression_1.
      	(d_checkpoint): New function.
      	(d_backtrack): New function.
      	(d_print_init): Initialize current_template.
      	(d_print_comp): Set current_template.
      	(d_print_cast): Put current_template in scope for
      	printing conversion operator name.
      	(cplus_demangle_init_info): Initialize is_expression and
      	is_conversion.
      	* cp-demangle.h (struct d_info): Add is_expression and
      	is_conversion fields.
      	* testsuite/demangle-expected: New test cases.
      
      From-SVN: r205292
      Cary Coutant committed
  21. 15 Nov, 2013 1 commit
  22. 12 Nov, 2013 1 commit
  23. 29 Oct, 2013 1 commit
    • re PR tree-optimization/58689 ([meta-bug] __attribute__((returns_nonnull)) enhancements) · eda14d6a
      2013-10-29  Marc Glisse  <marc.glisse@inria.fr>
      
      	PR tree-optimization/58689
      include/
      	* ansidecl.h (ATTRIBUTE_RETURNS_NONNULL): New macro.
      	* libiberty.h (basename, lbasename, dos_lbasename, unix_lbasename,
      	concat_copy): Mark with attributes nonnull(1) and returns_nonnull.
      	(concat, reconcat, concat_copy2, choose_temp_base, xstrerror,
      	xmalloc, xrealloc, xcalloc, xstrdup, xstrndup, xmemdup, pex_init):
      	Mark with attribute returns_nonnull.
      
      libiberty/
      	* concat.c: Remove note about xmalloc.
      
      From-SVN: r204159
      Marc Glisse committed
  24. 27 Oct, 2013 1 commit
  25. 25 Oct, 2013 1 commit
    • cp-demangle.c (struct d_saved_scope): New structure. · c24d86bc
      libiberty/
      2013-10-25  Gary Benson  <gbenson@redhat.com>
      
      	* cp-demangle.c (struct d_saved_scope): New structure.
      	(struct d_print_info): New fields saved_scopes and
      	num_saved_scopes.
      	(d_print_init): Initialize the above.
      	(d_print_free): New function.
      	(cplus_demangle_print_callback): Call the above.
      	(d_copy_templates): New function.
      	(d_print_comp): New variables saved_templates and
      	need_template_restore.
      	[DEMANGLE_COMPONENT_REFERENCE,
      	DEMANGLE_COMPONENT_RVALUE_REFERENCE]: Capture scope the first
      	time the component is traversed, and use the captured scope for
      	subsequent traversals.
      	* testsuite/demangle-expected: Add regression test.
      
      From-SVN: r204068
      Gary Benson committed
  26. 23 Oct, 2013 2 commits
  27. 15 Oct, 2013 1 commit
    • Add --enable-host-shared configuration option · 459260ec
      /
      	* configure.ac: Add --enable-host-shared
      	* configure: Regenerate.
      
      gcc/
      	* Makefile.in (PICFLAG): New.
      	(enable_host_shared): New.
      	(INTERNAL_CFLAGS): Use PICFLAG.
      	(LIBIBERTY): Use pic build of libiberty.a if configured with
      	--enable-host-shared.
      	* configure.ac: Add --enable-host-shared, setting up new
      	PICFLAG variable.
      	* configure: Regenerate.
      	* doc/install.texi (--enable-shared): Add note contrasting it
      	with...
      	(--enable-host-shared): New option.
      
      libbacktrace/
      	* configure.ac: Add --enable-host-shared, setting up
      	pre-existing PIC_FLAG variable within Makefile.am et al.
      	* configure: Regenerate.
      
      libcpp/
      	* Makefile.in (PICFLAG): New.
      	(ALL_CFLAGS): Add PICFLAG.
      	(ALL_CXXFLAGS): Likewise.
      	* configure.ac: Add --enable-host-shared, setting up new
      	PICFLAG variable.
      	* configure: Regenerate.
      
      libdecnumber/
      	* Makefile.in (PICFLAG): New.
      	(ALL_CFLAGS): Add PICFLAG.
      	* configure.ac: Add --enable-host-shared, setting up new
      	PICFLAG variable.
      	* configure: Regenerate.
      
      libiberty/
      	* configure.ac: If --enable-host-shared, use -fPIC.
      	* configure: Regenerate.
      
      zlib/
      	* configure.ac: Add --enable-host-shared, setting up new
      	PICFLAG variable.
      	* Makefile.am: Add PICFLAG to libz_a_CFLAGS.
      	* Makefile.in: Regenerate.
      	* configure: Regenerate.
      
      From-SVN: r203632
      David Malcolm committed
  28. 12 Oct, 2013 1 commit
  29. 12 Sep, 2013 1 commit
  30. 10 Sep, 2013 2 commits
    • re PR bootstrap/58386 (libstdc++.so.6: undefined symbol: htab_hash_pointer) · 8b415b27
      2013-09-10  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR bootstrap/58386
      	Revert:
      
      	2013-09-10  Gary Benson  <gbenson@redhat.com>
      
      	* cp-demangle.c: Include hashtab.h.
      	(struct d_print_info): New field saved_scopes.
      	(d_print_init): Initialize the above.
      	(d_print_free): New function.
      	(cplus_demangle_print_callback): Call the above.
      	(struct d_saved_scope): New structure.
      	(d_store_scope): New function.
      	(d_free_scope) Likewise.
      	(d_restore_scope) Likewise.
      	(d_hash_saved_scope) Likewise.
      	(d_equal_saved_scope) Likewise.
      	(d_print_comp): New variable saved_scope.
      	[DEMANGLE_COMPONENT_REFERENCE,
      	DEMANGLE_COMPONENT_RVALUE_REFERENCE]: Capture scope the first
      	time the component is traversed, and use the captured scope for
      	subsequent traversals.
      
      From-SVN: r202480
      Paolo Carlini committed
    • cp-demangle.c: Include hashtab.h. · 669ea36c
      2013-09-10  Gary Benson  <gbenson@redhat.com>
      
      	* cp-demangle.c: Include hashtab.h.
      	(struct d_print_info): New field saved_scopes.
      	(d_print_init): Initialize the above.
      	(d_print_free): New function.
      	(cplus_demangle_print_callback): Call the above.
      	(struct d_saved_scope): New structure.
      	(d_store_scope): New function.
      	(d_free_scope) Likewise.
      	(d_restore_scope) Likewise.
      	(d_hash_saved_scope) Likewise.
      	(d_equal_saved_scope) Likewise.
      	(d_print_comp): New variable saved_scope.
      	[DEMANGLE_COMPONENT_REFERENCE,
      	DEMANGLE_COMPONENT_RVALUE_REFERENCE]: Capture scope the first
      	time the component is traversed, and use the captured scope for
      	subsequent traversals.
      
      From-SVN: r202442
      Gary Benson committed
  31. 20 Aug, 2013 1 commit
    • floatformat.h (floatformat_ibm_long_double): Delete. · a98cbc36
      include/
      	* floatformat.h (floatformat_ibm_long_double): Delete.
      	(floatformat_ibm_long_double_big): Declare.
      	(floatformat_ibm_long_double_little): Declare.
      libiberty/
      	* floatformat.c (floatformat_ibm_long_double): Rename to..
      	(floatformat_ibm_long_double_big): ..this.
      	(floatformat_ibm_long_double_little): New.
      
      From-SVN: r201869
      Alan Modra committed
  32. 22 Jul, 2013 1 commit
  33. 21 Jul, 2013 1 commit
  34. 09 Jul, 2013 1 commit
  35. 01 Jun, 2013 1 commit
    • re PR other/56780 (--disable-install-libiberty still installs libiberty.a) · 8c9fddf4
      	PR other/56780
      	* libiberty/configure.ac: Move test for --enable-install-libiberty
      	outside of the 'with_target_subdir' test so that it actually gets
      	run.  Add output messages to show the test result.
      	* libiberty/configure: Regenerate.
      	* libiberty/Makefile.in (install_to_libdir): Place the
      	installation of the libiberty library in the same guard as that
      	used for the headers to prevent it being installed unless
      	requested via --enable-install-libiberty.
      
      From-SVN: r199570
      Matt Burgess committed