Commit Graph

168241 Commits

Author SHA1 Message Date
Thomas Schwinge 2bbbfa4e28 Clean up libgomp GCC 5 legacy support
libgomp/
	* oacc-parallel.c: Add comments to legacy entry points (GCC 5).

From-SVN: r270901
2019-05-06 10:49:55 +02:00
Richard Biener 33a0bfcdca re PR testsuite/90331 (New test case gcc.dg/pr87314-1.c fails)
2019-05-06  Richard Biener  <rguenther@suse.de>

	PR testsuite/90331
	* gcc.dg/pr87314-1.c: Align the substring to open up
	string merging for targets aligning strings to 8 bytes.

From-SVN: r270900
2019-05-06 07:38:26 +00:00
Martin Liska 080629d32e Error only when a non-default -mabi is used with sanitizers (PR sanitizer/90312).
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
2019-05-06 07:35:59 +00:00
Martin Liska ee7a003f97 Fix GNU coding style in lto-common.c.
2019-05-06  Martin Liska  <mliska@suse.cz>

	* lto-common.c: Update coding style.
	* lto.c (materialize_cgraph): Likewise.

From-SVN: r270898
2019-05-06 07:23:35 +00:00
Hrishikesh Kulkarni 66d62d9f2e Add lto-dump tool.
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
2019-05-06 07:23:25 +00:00
Martin Liska a79420f995 Split part of functionality from lto.c to lto-common.c.
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
2019-05-06 07:23:03 +00:00
Martin Liska 2bf6d93547 Split i386.c.
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
2019-05-06 07:18:26 +00:00
Li Jia He 94adc935af Fix a typo in two_value_replacement function
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
2019-05-06 06:00:03 +00:00
François Dumont 3997383be1 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
2019-05-06 05:33:23 +00:00
GCC Administrator 95ae8efbc0 Daily bump.
From-SVN: r270892
2019-05-06 00:16:16 +00:00
Thomas Koenig 89d1f77616 re PR fortran/90344 (small code that compiles and runs in 7.3.0 but not 7.4.1)
2019-05-05  Thomas Koenig <tkoenig@gcc.gnu.org>

	PR fortran/90344
	* gfortran.dg/pr90344.f90: New test.

From-SVN: r270882
2019-05-05 13:53:24 +00:00
GCC Administrator cd173fc8ec Daily bump.
From-SVN: r270881
2019-05-05 00:16:19 +00:00
Jonathan Wakely 5b5032522b Fix reference to wrong class in comment
* include/std/system_error (error_category): Fix comment.

From-SVN: r270877
2019-05-04 16:52:52 +01:00
Jonathan Wakely 854a5c7722 PR libstdc++/90299 make filesystem::absolute overloads consistent
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
2019-05-04 15:35:33 +01:00
Jonathan Wakely 2f7f1aca29 Improve API docs for <system_error> header
* 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
2019-05-04 15:35:29 +01:00
Jonathan Wakely fe6fb0d159 Fix std::hash<std::error_condition>
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
2019-05-04 15:35:25 +01:00
Gerald Pfeifer 34d9c2c269 crontab: Snapshots from trunk are now GCC 10 related.
* crontab: Snapshots from trunk are now GCC 10 related.
	Add GCC 9 snapshots from the respective branch.

From-SVN: r270871
2019-05-04 13:28:49 +00:00
François Dumont 9db3f73dbf Add missing PR libstdc++/90277 reference.
From-SVN: r270870
2019-05-04 07:41:39 +00:00
Roland Illig d1b6507727 Add myself to MAINTAINERS.
2019-05-04  Roland Illig  <roland.illig@gmx.de>

	* MAINTAINERS (Write After Approval): Add myself.

From-SVN: r270869
2019-05-04 07:38:52 +00:00
François Dumont de6f5f5765 hashtable.h (_Hashtable<>::rehash): Review comment.
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
2019-05-04 07:38:46 +00:00
GCC Administrator a3871acdb8 Daily bump.
From-SVN: r270867
2019-05-04 00:16:16 +00:00
Ian Lance Taylor 08c8a26e9c compiler: recognize and optimize array range clear
Recognize
    
            for i := range a { a[i] = zero }
    
    for array or slice a, and rewrite it to call memclr, as the gc
    compiler does.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/169398

From-SVN: r270862
2019-05-03 21:45:35 +00:00
Jonathan Wakely e339291fc1 Fix new testcase to not require std::copysign
Use __builtin_copysign{,f,l} when std::copysign isn't available.

	PR libstdc++/61761
	* testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
	std::copysign.

From-SVN: r270859
2019-05-03 20:25:05 +01:00
Jonathan Wakely 56e5b093de Avoid -Woverflow warning in __numeric_limits_integer
This is the same fix as was done for std::numeric_limits in r183905.

	PR libstdc++/52119
	* include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
	overflow warning with -Wpedantic -Wsystem-headers.

From-SVN: r270858
2019-05-03 20:13:31 +01:00
Ian Lance Taylor 16df703871 os/user: disable TestGroupIds for AIX
The corresponding Go Toolchain patch is CL 164039
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/175079

From-SVN: r270857
2019-05-03 17:15:54 +00:00
Richard Earnshaw 38fa938bbf [arm] PR target/89400 fix thumb1 unaligned access expansion
Armv6 has support for unaligned accesses to memory.  However, the
thumb1 code patterns were trying to use the 32-bit code constraints.
One failure mode from this was that the patterns are designed to be
compatible with conditional execution and this was then causing an
assert in the compiler.

The unaligned_loadhis pattern is only used for expanding extv, which
in turn is only enabled for systems supporting thumb2.  Given that
there is no simple expansion for a thumb1 sign-extending load (the
instruction has no immediate offset form and requires two registers in
the address) it seems simpler to just disable this for thumb1.

Fixed thusly:

	PR target/89400
	* config/arm/arm.md (unaligned_loadsi): Add variant for thumb1.
	Restrict 'all' variant to 32-bit configurations.
	(unaligned_loadhiu): Likewise.
	(unaligned_storehi): Likewise.
	(unaligned_storesi): Likewise.
	(unaligned_loadhis): Disable when compiling for thumb1.

From-SVN: r270853
2019-05-03 13:45:59 +00:00
Marc Glisse 051ef623d6 Let ldist ignore clobbers
2019-05-03  Marc Glisse  <marc.glisse@inria.fr>

	PR tree-optimization/90269
gcc/
	* tree-loop-distribution.c (find_seed_stmts_for_distribution):
	Ignore clobbers.

gcc/testsuite/
	* g++.dg/tree-ssa/ldist-1.C: New file.

From-SVN: r270852
2019-05-03 13:41:36 +00:00
Martin Liska b119c05542 Come up with is_empty for hash_{table,map,set}.
2019-05-03  Martin Liska  <mliska@suse.cz>

	* hash-map.h: Add is_empty function.
	* hash-set.h: Likewise.
	* hash-table.h: Likewise.
	* dwarf2out.c (dwarf2out_finish): Use is_empty instead of
	elements () == 0 (and similar usages).
	* gimple-ssa-store-merging.c (pass_store_merging::terminate_and_process_all_chains): Likewise.
	* gimplify.c (gimplify_bind_expr): Likewise.
	(gimplify_switch_expr): Likewise.
	* hash-map-tests.c (test_map_of_strings_to_int): Likewise.
	* ipa-icf.c (sem_item_optimizer::remove_symtab_node): Likewise.
	* postreload-gcse.c (dump_hash_table): Likewise.
	(gcse_after_reload_main): Likewise.
	* predict.c (combine_predictions_for_bb): Likewise.
	* tree-parloops.c (reduction_phi): Likewise.
	(separate_decls_in_region): Likewise.
	(transform_to_exit_first_loop): Likewise.
	(gen_parallel_loop): Likewise.
	(gather_scalar_reductions): Likewise.
	(try_create_reduction_list): Likewise.
	* var-tracking.c (dump_vars): Likewise.
	(emit_notes_for_changes): Likewise.
	(vt_emit_notes): Likewise.
2019-05-03  Martin Liska  <mliska@suse.cz>

	* call.c (build_aggr_conv): Use is_empty instead of
	elements () == 0 (and similar usages).
	* parser.c (cp_parser_lambda_introducer): Likewise.

From-SVN: r270851
2019-05-03 12:37:22 +00:00
Richard Biener 3353ebf0d9 re PR tree-optimization/90316 (large compile time increase in opt / alias stmt walking for Go example)
2019-05-03  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/90316
	* tree-ssa-pre.c (pass_pre::execute): Re-compute DOM fast queries
	before running VN.

From-SVN: r270848
2019-05-03 11:21:18 +00:00
Richard Biener 419c5f9987 tree-vect-stmts.c (get_group_load_store_type): Avoid peeling for gaps by loading only lower halves of vectors if possible.
2019-05-03  Richard Biener  <rguenther@suse.de>

	* tree-vect-stmts.c (get_group_load_store_type): Avoid
	peeling for gaps by loading only lower halves of vectors
	if possible.
	(vectorizable_load): Likewise.

	* gcc.dg/vect/slp-reduc-sad-2.c: New testcase.

From-SVN: r270847
2019-05-03 10:47:21 +00:00
Richard Biener 839d0860cf re PR tree-optimization/89518 (missed optimisation for array address calculations)
2019-05-03  Richard Biener  <rguenther@suse.de>

	PR middle-end/89518
	* match.pd: Add pattern to optimize (A / B) * B + (A % B) to A.

	* gcc.dg/pr89518.c: New testcase.

From-SVN: r270846
2019-05-03 10:46:13 +00:00
Richard Biener a4f9edf36c re PR tree-optimization/87314 (pointless comparison of malloc result to a string not eliminated)
2019-05-03  Richard Biener  <rguenther@suse.de>

	PR middle-end/87314
	* match.pd (cmp (convert1?@2 addr@0) (convert2? addr@1)):
	Handle STRING_CST vs DECL or STRING_CST.

	* gcc.dg/pr87314-1.c: New testcase.

From-SVN: r270845
2019-05-03 10:44:17 +00:00
Richard Biener a7eb97ad26 re PR middle-end/88963 (gcc generates terrible code for vectors of 64+ length which are not natively supported)
2019-05-03  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/88963
	* tree-ssa-forwprop.c (pass_forwprop::execute): Rewrite
	vector loads feeding only BIT_FIELD_REFs to component
	loads.  Rewrite stores fed by CONSTRUCTORs to component
	stores.

	* gcc.dg/tree-ssa/ssa-fre-31.c: Disable forwprop.
	* gcc.target/i386/pr88963-1.c: New testcase.
	* gcc.target/i386/pr88963-2.c: Likewise.

From-SVN: r270844
2019-05-03 10:39:56 +00:00
Dominique d'Humieres e7a89a659a re PR target/88809 (do not use rep-scasb for inline strlen/memchr)
2019-05-03  Dominique d'Humieres  <dominiq@gcc.gnu.org>

	PR target/88809
	* gcc.target/i386/pr88809.c: Adjust for darwin.
	* gcc.target/i386/pr88809-2.c: Adjust for i386 and darwin.

From-SVN: r270843
2019-05-03 12:00:27 +02:00
Jakub Jelinek d6fc19a0c5 * gennews (files): Add files for GCC 9.
From-SVN: r270837
2019-05-03 09:40:10 +02:00
Jakub Jelinek f66409e0b1 opts.h (finish_options): Remove lang_mask argument.
* opts.h (finish_options): Remove lang_mask argument.
	(print_help, help_option_argument): Declare.
	* opts.c (print_help): Remove forward declaration, no longer static.
	(finish_options): Remove lang_mask argument, don't call print_help
	here.
	* opts-global.c (decode_options): Adjust finish_option caller, call
	print_help here.

From-SVN: r270836
2019-05-03 09:33:04 +02:00
Jakub Jelinek d1700aa140 re PR tree-optimization/90303 (ICE in hash_odr_name with fastcall attribute starting with r267359)
PR tree-optimization/90303
	* ipa-devirt.c (obj_type_ref_class, get_odr_type): Don't use
	TYPE_CANONICAL for TYPE_STRUCTURAL_EQUALITY_P types in !in_lto_p mode.

	* g++.target/i386/pr90303.C: New test.

From-SVN: r270835
2019-05-03 09:32:06 +02:00
Jakub Jelinek 061a799b8e Makefile.am (finclude): Remove.
* Makefile.am (finclude): Remove.
	* Makefile.in: Regenerated.

From-SVN: r270834
2019-05-03 09:20:04 +02:00
Richard Biener 37f808c4a6 re PR c++/89698 (Run-time error due to optimization of field access after cast at -Os/-O2 and higher)
2019-05-03  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/89698
	* gimple-fold.c (canonicalize_constructor_val): Early out
	for constants, handle unfolded INTEGER_CSTs as they appear in
	C++ virtual table ctors.

	* g++.dg/tree-ssa/pr89698.C: New testcase.

From-SVN: r270833
2019-05-03 07:07:28 +00:00
Richard Biener c0f9d1fd7e passes.c (execute_function_todo): Remove dead code.
2019-05-03  Richard Biener  <rguenther@suse.de>

	* passes.c (execute_function_todo): Remove dead code.

From-SVN: r270832
2019-05-03 07:05:34 +00:00
GCC Administrator eae0da61e5 Daily bump.
From-SVN: r270831
2019-05-03 00:16:20 +00:00
Jonathan Wakely 315f8b5f18 PR libstdc++/90314 fix non-equivalent declarations of std::swap
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
2019-05-02 22:23:38 +01:00
Jonathan Wakely b752e2c926 Remove redundant __constexpr_addressof function
The std::__addressof function is always constexpr, even in C++14, so we
can just use that.

	* include/experimental/bits/lfts_config.h: Improve doc markup.
	* include/experimental/optional: Improve docs.
	(_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
	(__constexpr_addressof): Remove.
	(optional::operator->()): Use std::__addressof().
	* include/std/optional (optional::operator->()): Adjust whitespace.
	* testsuite/experimental/optional/constexpr/observers/2.cc: Check
	that operator-> is still constexpr with overloaded operator&. Change
	to compile-only test.
	* testsuite/experimental/optional/constexpr/observers/3.cc: Change to
	compile-only test.

From-SVN: r270826
2019-05-02 22:23:35 +01:00
Jonathan Wakely efa9d8eef0 Improve smart pointer docs
* include/bits/shared_ptr.h: Improve docs.
	* include/bits/shared_ptr_atomic.h: Likewise.
	* include/bits/unique_ptr.h: Likewise. Adjust whitespace.

From-SVN: r270825
2019-05-02 22:23:25 +01:00
Joseph Myers c4cb56a154 * gcc.pot: Regenerate.
From-SVN: r270822
2019-05-02 21:30:14 +01:00
Segher Boessenkool fc9613c640 rs6000: Make debug regnums independent of internal ones
Where we use "internal GCC register numbers" in debug info, that
defines an ABI, so we cannot change those numbers.  But we want to
change the internal numbers, and sometimes we do that without
remembering this gotcha anyway; so let's make everything independent
of the internal numbers.

For those registers that are not recognised here (we still have MQ for
example, but also the GCC-internal frame pointer and arg pointer
registers), this just returns the internal register number.  This is a
bit worrying: that number could be the same as that for a register we
validly want to have in debug info.  I first had a gcc_unreachable ()
for that, but this does now work because dwarf2cfi calls
rs6000_dbx_register_number for every internal register.  Then I just
returned 0 for the internal regs, but that causes various regression
tests to fail.  So now I return the internal register number again,
as it was before; but this needs to be fixed.


	* config/rs6000/rs6000.c (rs6000_dbx_register_number): Do not use
	the internal register number, for any "real" register.

From-SVN: r270820
2019-05-02 20:46:38 +02:00
Segher Boessenkool f58bd25275 rs6000: Debug regnums for TM registers
Since GCC 8, we have output incorrect numbers for the transactional
memory registers.

Also, we didn't output the correct DWARF register numbers for those.
The number for sprN is 100+N.

This fixes both these issues.


	* config/rs6000/rs6000.c (rs6000_dbx_register_number): Return the
	correct numbers for TFHAR, TFIAR, TEXASR.

From-SVN: r270819
2019-05-02 20:45:22 +02:00
Maciej W. Rozycki b74c94ff41 libphobos: Correct my identity in the last ChangeLog entry
From-SVN: r270817
2019-05-02 17:03:25 +00:00
Maciej W. Rozycki 1770f16993 libphobos: RISC-V: Fix soft-float build errors with IEEE exception flags
Fix assembly errors:

.../libphobos/src/std/math.d: Assembler messages:.../libphobos/src/std/math.d:4773: Error: unrecognized opcode `frflags a0'.../libphobos/src/std/math.d:4856: Error: unrecognized opcode `fsflags a5'.../libphobos/src/std/math.d:4856: Error: unrecognized opcode `fsflags a5'.../libphobos/src/std/math.d:4773: Error: unrecognized opcode `frflags a0'.../libphobos/src/std/math.d:5549: Error: unrecognized opcode `fscsr a5'.../libphobos/src/std/math.d:5456: Error: unrecognized opcode `frcsr a5'.../libphobos/src/std/math.d:5456: Error: unrecognized opcode `frcsr a5'.../libphobos/src/std/math.d:5549: Error: unrecognized opcode `fscsr a5'.../libphobos/src/std/math.d:5456: Error: unrecognized opcode `frcsr a5'.../libphobos/src/std/math.d:5549: Error: unrecognized opcode `fscsr a0'.../libphobos/src/std/math.d:5456: Error: unrecognized opcode `frcsr a0'.../libphobos/src/std/math.d:5456: Error: unrecognized opcode `frcsr a0'.../libphobos/src/std/math.d:5549: Error: unrecognized opcode `fscsr s2'make[8]: *** [Makefile:1119: std/math.lo] Error 1

triggered with the RISC-V lp64 multilib in a GCC build configured with 
`--enable-multilib --enable-languages=all --target=riscv64-linux-gnu'. 
This is due to unconditional explicit use of F extension instructions 
within inline assembly, to access IEEE exception flags.  The use of 
these instructions is not allowed when building for a soft-float ABI.

Correct the problem by wrapping said inline assembly into a conditional 
such that if `D_SoftFloat' is true, then reads from IEEE exception flags 
return 0 and writes are ignored instead, complementing r270522 
("libphobos: Add D support for RISC-V Linux"), which is an updated 
version of <https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00325.html>, 
where the problematic code has originated from.

libphobos/ChangeLog:

2019-05-02  Maciej W. Rozycki  <macro@wdc.com>

	* std/math.d (IeeeFlags.getIeeeFlags): Handle RISC-V soft-float ABI.
	(IeeeFlags.resetIeeeFlags): Likewise.
	(FloatingPointControl.getControlState): Likewise.
	(FloatingPointControl.setControlState): Likewise.

From-SVN: r270815
2019-05-02 16:38:08 +00:00
Jonathan Wakely 8c6a71e47c Miscellaneous API doc improvements
* include/bits/basic_string.h: Fix iterator/index confusion in
	Doxygen comments.
	* include/bits/range_access.h: Fix Doxygen warnings.
	* include/bits/refwrap.h: Do not document implementation details.
	(ref, cref): Group docs with reference_wrapper.
	* include/std/fstream: Fix Doxygen markup.
	* libsupc++/initializer_list (begin, end): Group docs with
	initializer_list.

From-SVN: r270814
2019-05-02 16:46:50 +01:00