1. 06 May, 2019 8 commits
    • Error only when a non-default -mabi is used with sanitizers (PR sanitizer/90312). · 080629d3
      2019-05-06  Martin Liska  <mliska@suse.cz>
      
      	PR sanitizer/90312
      	* config/i386/i386-options.c (ix86_option_override_internal): Error only
      	when -mabi is selected to a non-default version.
      2019-05-06  Martin Liska  <mliska@suse.cz>
      
      	PR sanitizer/90312
      	* gcc.dg/asan/pr87930.c: Run the test only on *linux or *gnu
      	systems.
      	* gcc.dg/tsan/pr88017.c: Likewise.
      
      From-SVN: r270899
      Martin Liska committed
    • Fix GNU coding style in lto-common.c. · ee7a003f
      2019-05-06  Martin Liska  <mliska@suse.cz>
      
      	* lto-common.c: Update coding style.
      	* lto.c (materialize_cgraph): Likewise.
      
      From-SVN: r270898
      Martin Liska committed
    • Add lto-dump tool. · 66d62d9f
      2019-05-06  Hrishikesh Kulkarni  <hrishikeshparag@gmail.com>
      	    Martin Liska  <mliska@suse.cz>
      
      	* Makefile.in: Add lto-dump.texi.
      	* cgraph.h: Add new functions get_visibility_string and
      	get_symtab_type_string.
      	* doc/gcc.texi: Include lto-dump section.
      	* doc/lto-dump.texi: New file.
      	* dumpfile.c (dump_switch_p_1): Use parse_dump_option.
      	(parse_dump_option): Factor out this function.
      	* dumpfile.h (enum dump_flag): Add new value TDF_ERROR.
      	(parse_dump_option): Export the function.
      	* symtab.c (symtab_node::get_visibility_string): New function.
      	(symtab_node::get_symtab_type_string): Likewise.
      2019-05-06  Hrishikesh Kulkarni  <hrishikeshparag@gmail.com>
      	    Martin Liska  <mliska@suse.cz>
      
      	* Make-lang.in: Add lto_dump-related definition.
      	* config-lang.in: Likewise.
      	* lang.opt: Add new language LTODump and options related
      	to LTO dump tool.
      	* lto-common.c (lto_read_decls): Support type statistics dump.
      	(lto_file_read): Likewise for object files.
      	* lto-dump.c: New file.
      	* lto-lang.c (lto_option_lang_mask): Move from ..
      	* lto.c (lto_option_lang_mask): .. here.
      	* lto.h (lto_option_lang_mask): New declaration.
      
      Co-Authored-By: Martin Liska <mliska@suse.cz>
      
      From-SVN: r270897
      Hrishikesh Kulkarni committed
    • Split part of functionality from lto.c to lto-common.c. · a79420f9
      2019-05-06  Martin Liska  <mliska@suse.cz>
      	    Hrishikesh Kulkarni  <hrishikeshparag@gmail.com>
      
      	* Make-lang.in: Add lto-common.o.
      	* config-lang.in: Likewise for gtfiles.
      	* lto-common.c: New file.
      	* lto-common.h: New file.
      	* lto-lang.c: Include lto-common.h.
      	* lto.c: Move most of the functionality
      	into lto-common.c file.
      
      Co-Authored-By: Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
      
      From-SVN: r270896
      Martin Liska committed
    • Split i386.c. · 2bf6d935
      2019-05-06  Martin Liska  <mliska@suse.cz>
      
      	* config/i386/i386-builtins.c: New file.
      	* config/i386/i386-builtins.h: New file.
      	* config/i386/i386-expand.c: New file.
      	* config/i386/i386-expand.h: New file.
      	* config/i386/i386-features.c: New file.
      	* config/i386/i386-features.h: New file.
      	* config/i386/i386-options.c: New file.
      	* config/i386/i386-options.h: New file.
      	* config.gcc: Add new files into extra_objs and
      	target_gtfiles.
      	* config/i386/i386.c: Split content of the file
      	into newly introduced files.
      	* config/i386/i386.h: Declare common variables
      	and macros.
      	* config/i386/t-i386: Define dependencies for new files.
      
      From-SVN: r270895
      Martin Liska committed
    • Fix a typo in two_value_replacement function · 94adc935
      GCC revision 267634 implemented two_value_replacement function.
      However, a typo occurred during the parameter check, which caused
      us to miss some optimizations.
      
      The intent of the code might be to check that the input parameters
      are const int and their difference is one.  However, when I read
      the code, I found that it is wrong to detect whether an input data
      plus one is equal to itself.  This could be a typo.
      
      2019-05-06  Li Jia He  <helijia@linux.ibm.com>
      
      	* tree-ssa-phiopt.c (two_value_replacement): Fix a typo in parameter
      	detection.
      	* gcc.dg/tree-ssa/pr37508.c: Add the no-ssa-phiopt option to skip phi
      	optimization.
      	* gcc.dg/tree-ssa/pr88676-2.c: New testcase.
      
      From-SVN: r270894
      Li Jia He committed
    • printers.py (add_one_template_type_printer): Add type printer for container… · 3997383b
      printers.py (add_one_template_type_printer): Add type printer for container types in std::__debug namespace.
      
      2019-05-06  François Dumont  <fdumont@gcc.gnu.org>
      
      	* python/libstdcxx/v6/printers.py (add_one_template_type_printer):
      	Add type printer for container types in std::__debug namespace.
      	* testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
      	(gdb-tests): Use distinct parameters for the type of test and use of
      	regex.
      	(gdb-test): Check for regex test even if 'whatis' test.
      	* testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
      	mode.
      	* testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
      	* testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
      	* testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
      	* testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
      	* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
      	* testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
      	* testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
      
      From-SVN: r270893
      François Dumont committed
    • Daily bump. · 95ae8efb
      From-SVN: r270892
      GCC Administrator committed
  2. 05 May, 2019 2 commits
  3. 04 May, 2019 9 commits
    • Fix reference to wrong class in comment · 5b503252
              * include/std/system_error (error_category): Fix comment.
      
      From-SVN: r270877
      Jonathan Wakely committed
    • PR libstdc++/90299 make filesystem::absolute overloads consistent · 854a5c77
      In this implementation it is an error to pass the empty path to absolute,
      because the empty path doesn't represent any file in the filesystem so
      the function cannot meet its postcondition.
      
      Currently the absolute(const path&, error_code&) overload reports an
      error for the empty path, but using errc::no_such_file_or_directory, and
      the other overload does not report an error. This patch makes them
      consistntly report an errc::invalid_argument error for the empty path.
      
      	PR libstdc++/90299
      	* src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
      	argument is an empty path.
      	(absolute(const path&, error_code&)): Use invalid_argument as error
      	code instead of no_such_file_or_directory.
      	* testsuite/27_io/filesystem/operations/absolute.cc: Check handling
      	of non-existent paths and empty paths with both overloads of absolute.
      
      From-SVN: r270874
      Jonathan Wakely committed
    • Improve API docs for <system_error> header · 2f7f1aca
      	* include/std/system_error (error_category, error_code)
      	(error_condition): Improve docs.
      	* libsupc++/exception: Add missing @addtogroup Doxygen command.
      	* libsupc++/exception_ptr.h (exception_ptr): Link equality operators
      	to class documentation. Suppress documentation for implementation
      	details.
      	* libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
      	Suppress documentation for implementation details.
      
      From-SVN: r270873
      Jonathan Wakely committed
    • Fix std::hash<std::error_condition> · fe6fb0d1
      The hash value should be based on the identity (i.e. address) of the
      error_category member, not its object representation (i.e. underlying
      bytes).
      
      	* include/std/system_error (error_code): Remove friend declaration
      	for hash<error_code>.
      	(hash<error_code>::operator()): Use public member functions to access
      	value and category.
      	(hash<error_condition>::operator()): Use address of category, not
      	its object representation.
      	* src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
      	Use public member functions to access value and category.
      	* testsuite/19_diagnostics/error_condition/hash.cc: New test.
      
      From-SVN: r270872
      Jonathan Wakely committed
    • crontab: Snapshots from trunk are now GCC 10 related. · 34d9c2c2
      	* crontab: Snapshots from trunk are now GCC 10 related.
      	Add GCC 9 snapshots from the respective branch.
      
      From-SVN: r270871
      Gerald Pfeifer committed
    • Add missing PR libstdc++/90277 reference. · 9db3f73d
      From-SVN: r270870
      François Dumont committed
    • Add myself to MAINTAINERS. · d1b65077
      2019-05-04  Roland Illig  <roland.illig@gmx.de>
      
      	* MAINTAINERS (Write After Approval): Add myself.
      
      From-SVN: r270869
      Roland Illig committed
    • hashtable.h (_Hashtable<>::rehash): Review comment. · de6f5f57
      2019-05-04  François Dumont  <fdumont@gcc.gnu.org>
      
      	* include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
      	* include/bits/hashtable_policy.h
      	(_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
      	(_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
      	(_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
      	smaller than input value rather than always greater. Preserve
      	_M_next_resize if called with 0 input. Use __builtin_floorl.
      	(_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
      	elements + number of insertions is greater than _M_next_resize. Start
      	with 11 buckets if not told otherwise. Use __builtin_floorl.
      	(_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
      	* src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
      	Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
      	(_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
      	told otherwise. Use __builtin_floorl.
      	* testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
      	to also validate _Power2_rehash_policy.
      	* testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
      	Adapt.
      
      From-SVN: r270868
      François Dumont committed
    • Daily bump. · a3871acd
      From-SVN: r270867
      GCC Administrator committed
  4. 03 May, 2019 20 commits
  5. 02 May, 2019 1 commit
    • PR libstdc++/90314 fix non-equivalent declarations of std::swap · 315f8b5f
      In order to use the _GLIBCXX_NOEXCEPT_IF macro for an expression
      containing commas I enclosed it in parentheses, so the preprocessor
      wouldn't treat it as two arguments to the function-like macro. Clang
      gives an error because now the noexcept-specifier noexcept((C)) is not
      equivalent to the noexcept(C) one on the declaration of swap in
      <type_traits>.
      
      Instead of requiring extra parentheses around the expression, redefine
      _GLIBCXX_NOEXCEPT_IF as a variadic macro (even though supporting that in
      C++98 is a GNU extension).
      
      	PR libstdc++/90314
      	* include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
      	* include/bits/move.h (swap): Remove extra parentheses.
      
      From-SVN: r270827
      Jonathan Wakely committed