Martin Liska [Mon, 6 May 2019 07:23:35 +0000 (09:23 +0200)]
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
Hrishikesh Kulkarni [Mon, 6 May 2019 07:23:25 +0000 (07:23 +0000)]
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
Martin Liska [Mon, 6 May 2019 07:23:03 +0000 (09:23 +0200)]
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
Martin Liska [Mon, 6 May 2019 07:18:26 +0000 (09:18 +0200)]
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
Li Jia He [Mon, 6 May 2019 06:00:03 +0000 (06:00 +0000)]
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
François Dumont [Mon, 6 May 2019 05:33:23 +0000 (05:33 +0000)]
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
GCC Administrator [Mon, 6 May 2019 00:16:16 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270892
Thomas Koenig [Sun, 5 May 2019 13:53:24 +0000 (13:53 +0000)]
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
GCC Administrator [Sun, 5 May 2019 00:16:19 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270881
Jonathan Wakely [Sat, 4 May 2019 15:52:52 +0000 (16:52 +0100)]
Fix reference to wrong class in comment
* include/std/system_error (error_category): Fix comment.
From-SVN: r270877
Jonathan Wakely [Sat, 4 May 2019 14:35:33 +0000 (15:35 +0100)]
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
Jonathan Wakely [Sat, 4 May 2019 14:35:29 +0000 (15:35 +0100)]
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
Jonathan Wakely [Sat, 4 May 2019 14:35:25 +0000 (15:35 +0100)]
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
Gerald Pfeifer [Sat, 4 May 2019 13:28:49 +0000 (13:28 +0000)]
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
François Dumont [Sat, 4 May 2019 07:41:39 +0000 (07:41 +0000)]
Add missing PR libstdc++/90277 reference.
From-SVN: r270870
Roland Illig [Sat, 4 May 2019 07:38:52 +0000 (07:38 +0000)]
Add myself to MAINTAINERS.
2019-05-04 Roland Illig <roland.illig@gmx.de>
* MAINTAINERS (Write After Approval): Add myself.
From-SVN: r270869
François Dumont [Sat, 4 May 2019 07:38:46 +0000 (07:38 +0000)]
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
GCC Administrator [Sat, 4 May 2019 00:16:16 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270867
Ian Lance Taylor [Fri, 3 May 2019 21:45:35 +0000 (21:45 +0000)]
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
Jonathan Wakely [Fri, 3 May 2019 19:25:05 +0000 (20:25 +0100)]
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
Jonathan Wakely [Fri, 3 May 2019 19:13:31 +0000 (20:13 +0100)]
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
Ian Lance Taylor [Fri, 3 May 2019 17:15:54 +0000 (17:15 +0000)]
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
Richard Earnshaw [Fri, 3 May 2019 13:45:59 +0000 (13:45 +0000)]
[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
Marc Glisse [Fri, 3 May 2019 13:41:36 +0000 (15:41 +0200)]
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
Martin Liska [Fri, 3 May 2019 12:37:22 +0000 (14:37 +0200)]
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
Richard Biener [Fri, 3 May 2019 11:21:18 +0000 (11:21 +0000)]
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
Richard Biener [Fri, 3 May 2019 10:47:21 +0000 (10:47 +0000)]
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
Richard Biener [Fri, 3 May 2019 10:46:13 +0000 (10:46 +0000)]
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
Richard Biener [Fri, 3 May 2019 10:44:17 +0000 (10:44 +0000)]
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
Richard Biener [Fri, 3 May 2019 10:39:56 +0000 (10:39 +0000)]
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
Dominique d'Humieres [Fri, 3 May 2019 10:00:27 +0000 (12:00 +0200)]
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
Jakub Jelinek [Fri, 3 May 2019 07:40:10 +0000 (09:40 +0200)]
* gennews (files): Add files for GCC 9.
From-SVN: r270837
Jakub Jelinek [Fri, 3 May 2019 07:33:04 +0000 (09:33 +0200)]
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
Jakub Jelinek [Fri, 3 May 2019 07:32:06 +0000 (09:32 +0200)]
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
Jakub Jelinek [Fri, 3 May 2019 07:20:04 +0000 (09:20 +0200)]
Makefile.am (finclude): Remove.
* Makefile.am (finclude): Remove.
* Makefile.in: Regenerated.
From-SVN: r270834
Richard Biener [Fri, 3 May 2019 07:07:28 +0000 (07:07 +0000)]
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
Richard Biener [Fri, 3 May 2019 07:05:34 +0000 (07:05 +0000)]
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
GCC Administrator [Fri, 3 May 2019 00:16:20 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270831
Jonathan Wakely [Thu, 2 May 2019 21:23:38 +0000 (22:23 +0100)]
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
Jonathan Wakely [Thu, 2 May 2019 21:23:35 +0000 (22:23 +0100)]
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
Jonathan Wakely [Thu, 2 May 2019 21:23:25 +0000 (22:23 +0100)]
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
Joseph Myers [Thu, 2 May 2019 20:30:14 +0000 (21:30 +0100)]
* gcc.pot: Regenerate.
From-SVN: r270822
Segher Boessenkool [Thu, 2 May 2019 18:46:38 +0000 (20:46 +0200)]
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
Segher Boessenkool [Thu, 2 May 2019 18:45:22 +0000 (20:45 +0200)]
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
Maciej W. Rozycki [Thu, 2 May 2019 17:03:25 +0000 (17:03 +0000)]
libphobos: Correct my identity in the last ChangeLog entry
From-SVN: r270817
Maciej W. Rozycki [Thu, 2 May 2019 16:38:08 +0000 (16:38 +0000)]
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
Jonathan Wakely [Thu, 2 May 2019 15:46:50 +0000 (16:46 +0100)]
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
Jonathan Wakely [Thu, 2 May 2019 15:46:46 +0000 (16:46 +0100)]
Allow Markdown formatting in Doxygen comments
* doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
From-SVN: r270813
Jonathan Wakely [Thu, 2 May 2019 15:46:42 +0000 (16:46 +0100)]
Improve docs for mutexes
* include/bits/unique_lock.h: Fix/improve doxygen markup.
* include/std/mutex: Likewise.
* include/std/shared_mutex: Likewise.
From-SVN: r270812
Jonathan Wakely [Thu, 2 May 2019 15:46:38 +0000 (16:46 +0100)]
Improve docs for C++17 Filesystem library
* include/bits/fs_dir.h: Fix/improve doxygen markup.
* include/bits/fs_fwd.h: Likewise.
* include/bits/fs_ops.h: Likewise.
* include/bits/fs_path.h: Likewise.
* include/std/filesystem: Likewise.
From-SVN: r270811
Jonathan Wakely [Thu, 2 May 2019 15:46:34 +0000 (16:46 +0100)]
Improve docs for Networking TS
* include/experimental/bits/net.h: Fix/improve doxygen markup.
* include/experimental/buffer: Likewise.
* include/experimental/executor: Likewise.
* include/experimental/internet: Likewise.
* include/experimental/io_context: Likewise.
* include/experimental/net: Likewise.
* include/experimental/netfwd: Likewise.
* include/experimental/socket: Likewise.
* include/experimental/timer: Likewise.
From-SVN: r270810
Jonathan Wakely [Thu, 2 May 2019 15:46:29 +0000 (16:46 +0100)]
Improve docs for Library Fundamentals TS
* doc/doxygen/doxygroups.cc: Move description of experimental group
here.
* include/experimental/algorithm: Add to libfund-ts doc group.
* include/experimental/any: Likewise. Do not document implementation
details.
* include/experimental/array: Add to libfund-ts doc group.
* include/experimental/bits/lfts_config.h: Define libfund-ts doc group
for Library Fundamentals.
* include/experimental/chrono: Add to libfund-ts doc group.
* include/experimental/deque: Likewise.
* include/experimental/forward_list: Likewise.
* include/experimental/functional: Likewise.
* include/experimental/iterator: Likewise.
* include/experimental/list: Likewise.
* include/experimental/map: Likewise.
* include/experimental/memory: Likewise.
* include/experimental/memory_resource: Likewise. Improve docs.
details.
* include/experimental/numeric: Add to libfund-ts doc group.
* include/experimental/optional: Likewise.
* include/experimental/propagate_const: Likewise.
* include/experimental/random: Likewise.
* include/experimental/ratio: Likewise.
* include/experimental/regex: Likewise.
* include/experimental/set: Likewise.
* include/experimental/source_location: Likewise.
* include/experimental/string: Likewise.
* include/experimental/string_view: Likewise.
* include/experimental/system_error: Likewise.
* include/experimental/tuple: Likewise.
* include/experimental/type_traits: Likewise.
* include/experimental/unordered_map: Likewise.
* include/experimental/unordered_set: Likewise.
* include/experimental/utility: Likewise.
* include/experimental/vector: Likewise.
* testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
* testsuite/experimental/array/neg.cc: Adjust dg-error.
* testsuite/experimental/propagate_const/assignment/move_neg.cc:
Likewise.
* testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
* testsuite/experimental/propagate_const/requirements2.cc: Likewise.
* testsuite/experimental/propagate_const/requirements3.cc: Likewise.
* testsuite/experimental/propagate_const/requirements4.cc: Likewise.
* testsuite/experimental/propagate_const/requirements5.cc: Likewise.
From-SVN: r270809
Jonathan Wakely [Thu, 2 May 2019 15:45:32 +0000 (16:45 +0100)]
Improve docs for Filesystem TS
* include/experimental/bits/fs_dir.h: Fix Doxygen markup.
* include/experimental/bits/fs_fwd.h: Improve docs.
* include/experimental/bits/fs_ops.h: fix Doxygen markup.
* include/experimental/bits/fs_path.h: Likewise.
(path, filesystem_error, u8path): Improve docs.
* include/experimental/filesystem: Link to docs for TS.
From-SVN: r270808
Jonathan Wakely [Thu, 2 May 2019 15:45:04 +0000 (16:45 +0100)]
Improve API docs for <memory> and <scoped_allocator>
* config/allocator/new_allocator_base.h (__allocator_base): Add
workaround for Doxygen bug #6945.
* include/std/memory: Improve docs. Define group for pointer safety.
* include/std/scoped_allocator: Improve docs. Use "undocumented"
conditional to suppress documentation for implementation details.
From-SVN: r270807
Jonathan Wakely [Thu, 2 May 2019 15:44:59 +0000 (16:44 +0100)]
Improve API docs for mathematical special functions
This prevents "Mathematical Special Functions" appearing in the
top-level menu of the generated HTML docs, and adds "TR1" to the title
for the TR1 docs, to avoid duplicate titles.
* include/bits/specfun.h: Improve docs.
* include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
and namespaces.
From-SVN: r270806
Jonathan Wakely [Thu, 2 May 2019 15:44:55 +0000 (16:44 +0100)]
Improve Doxygen docs for nested namespaces
* doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
(std::experimental): Add docs.
* doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
namespace to nothing when generating docs.
* include/bits/regex_constants.h (std::regex_constants): Improve docs.
* include/std/chrono (std::chrono): Likewise.
* include/std/functional (std::placeholders): Likewise.
* include/std/thread (std::this_thread): Likewise.
From-SVN: r270805
Jonathan Wakely [Thu, 2 May 2019 15:44:51 +0000 (16:44 +0100)]
Fix markup for Parallel Mode docs
* include/parallel/settings.h: Fix Doxygen markup.
From-SVN: r270804
Jonathan Wakely [Thu, 2 May 2019 15:44:46 +0000 (16:44 +0100)]
Adjust Doxygen processing of pb_ds containers
Several of the pb_ds headers are intended to be included multiple times,
within the definition of various class templates. The including files
define macros like PB_DS_CLASS_C_DEC and PB_DS_GEN_POS before including
these headers.
In some cases the types defined in the headers are actually nested types
within other classes, and so should not have been documented as though
they are declared in the global namespace, as in:
https://gcc.gnu.org/onlinedocs/gcc-8.3.0/libstdc++/api/a12028.html
In other cases the headers provide inline member function definitions,
but when processed by Doxygen the class name "PB_DS_CLASS_C_DEC" is not
recognised.
This patch makes Doxygen ignore definitions that only make sense when
included in the right context with the right macros defined.
* include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
anything unless PB_DS_CLASS_C_DEC is defined.
* include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
* include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
Likewise.
* include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
* include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
* include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
* include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
Likewise.
* include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
* include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
Likewise.
* include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
Likewise.
From-SVN: r270803
Jonathan Wakely [Thu, 2 May 2019 15:44:16 +0000 (16:44 +0100)]
Update libstdc++ Doxygen config
The GROUP_NESTED_COMPOUNDS option means that types nested inside inline
namespaces or other classes will be automatically added to a Doxygen
group, e.g. this actually works as intended:
/**
* @defgroup chrono Time
* @ingroup utilities
*
* Classes and functions for time.
* @{
*/
namespace chrono
{
template<typename _Rep, typename _Period = ratio<1>>
struct duration;
template<typename _Clock, typename _Dur = typename _Clock::duration>
struct time_point;
}
/// @}
Currently chrono::duration and chrono::time_point are not added to the
"chrono" group. They would need an explicit @ingroup tag added to them
individually. With GROUP_NESTED_COMPOUNDS=YES they get added to the
enclosing group.
The SORT_BY_SCOPE_NAME option means that the list of classes will sort
by class name, not the full qualified-id. Currently the alphabetical
Class List for classes beginning with 'c' looks like:
char_traits (__gnu_cxx)
character (__gnu_cxx)
condition_base (__gnu_cxx)
const_iterator_
condition_variable_any (std::_V2)
cauchy_distribution (std)
char_traits (std)
i.e. the list is sorted by the namespaces first, then the class names.
This is not helpful when you don't know which namespace a class might be
in, and inline namespaces with reserved names are not hidden (see
https://github.com/doxygen/doxygen/issues/5914 for a feature request to
allow that).
With SORT_BY_SCOPE_NAME=NO the list looks like:
cauchy_distribution (std)
char_traits (__gnu_cxx)
char_traits (std)
character (__gnu_cxx)
condition_base (__gnu_cxx)
condition_variable_any (std::_V2)
const_iterator_
This allows you to find a class by name more easily.
Also add PREDEFINED macros so that __attribute__ and various macros like
_GLIBCXX_NO_DISCARD, _GLIBCXX14_CONSTEXPR don't appear in the generated
docs.
* doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
_GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
Doxygen expands.
From-SVN: r270802
Iain Sandoe [Thu, 2 May 2019 14:55:21 +0000 (14:55 +0000)]
darwin, testsuite, fix a failing test.
The istantiate2.C test has started to fail since Darwin's impl. of
this part of the ABI was fixed. It now emits the same output as
other platforms (and clang).
2019-05-02 Iain Sandoe <iain@sandoe.co.uk>
* g++.dg/ext/instantiate2.C: Remove special-caseing for Darwin.
From-SVN: r270801
Richard Biener [Thu, 2 May 2019 14:08:08 +0000 (14:08 +0000)]
re PR tree-optimization/89653 (Missing vectorization of loop containing std::min/std::max and temporary)
2019-05-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/89653
* tree-ssa-loop.c (pass_data_tree_loop_init): Execute
update-address-taken before the pass.
* passes.def (pass_tree_loop_init): Put comment before it.
* g++.dg/vect/pr89653.cc: New testcase.
From-SVN: r270800
Richard Biener [Thu, 2 May 2019 14:05:27 +0000 (14:05 +0000)]
re PR tree-optimization/89509 (restrict doesnt work with subfield accesses)
2019-05-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/89509
* tree-ssa-structalias.c (compute_dependence_clique): Look
at the first subvar when determining whether it is restrict.
* gcc.dg/torture/restrict-8.c: New testcase.
From-SVN: r270799
Richard Biener [Thu, 2 May 2019 13:58:47 +0000 (13:58 +0000)]
re PR lto/85574 (LTO bootstapped binaries differ)
2019-05-02 Richard Biener <rguenther@suse.de>
PR bootstrap/85574
* Makefile.tpl (compare target): Also compare extra-compare
files.
* Makefile.in: Regenerate.
config/
* bootstrap-lto.mk (extra-compare): Set to gcc/lto1$(exeext).
From-SVN: r270798
Iain Sandoe [Thu, 2 May 2019 13:44:17 +0000 (13:44 +0000)]
darwin - fix a failing test
An inflexible regex caused these tests to regress.
2019-05-02 Iain Sandoe <iain@sandoe.co.uk>
* gcc.dg/tree-prof/section-attr-1.c: Update scan-asm regex
for cold section label.
* gcc.dg/tree-prof/section-attr-2.c: Likewise.
* gcc.dg/tree-prof/section-attr-3.c: Likewise.
From-SVN: r270797
Rainer Orth [Thu, 2 May 2019 13:31:04 +0000 (13:31 +0000)]
Restrict gcc.target/i386/spellcheck-options-5.c to Linux targets
* gcc.target/i386/spellcheck-options-5.c: Restrict to Linux and
GNU targets.
From-SVN: r270795
Jakub Jelinek [Thu, 2 May 2019 13:02:27 +0000 (15:02 +0200)]
Makefile.am (gfor_cdir): Remove $(MULTISUBDIR).
* Makefile.am (gfor_cdir): Remove $(MULTISUBDIR).
* Makefile.in: Regenerated.
From-SVN: r270793
Nathan Sidwell [Thu, 2 May 2019 12:42:32 +0000 (12:42 +0000)]
[C++ PATCH] remove unreachable code
https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00039.html
* semantics.c (finish_id_expression_1): Remove unreachable code.
From-SVN: r270792
Richard Biener [Thu, 2 May 2019 11:17:00 +0000 (11:17 +0000)]
re PR tree-optimization/90273 (GCC runs out of memory building Firefox)
2019-05-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/90273
* tree-ssa-dce.c (eliminate_unnecessary_stmts): Eliminate
useless debug stmts.
From-SVN: r270791
Alejandro Martinez [Thu, 2 May 2019 09:58:00 +0000 (09:58 +0000)]
[Aarch64][SVE] Dot product support
This patch does two things. For the general vectoriser, it adds support to
perform fully masked reductions over expressions that don't support masking.
This is achieved by using VEC_COND_EXPR where possible. At the moment this is
implemented for DOT_PROD_EXPR only, but the framework is there to extend it to
other expressions.
Related to that, this patch adds support to vectorize dot product using SVE. It
also uses the new functionality to ensure that the resulting loop is masked.
Given this input code:
uint32_t
dotprod (uint8_t *restrict x, uint8_t *restrict y, int n)
{
uint32_t sum = 0;
for (int i = 0; i < n; i++)
{
sum += x[i] * y[i];
}
return sum;
}
The resulting SVE code is:
0000000000000000 <dotprod>:
0:
7100005f cmp w2, #0x0
4:
5400024d b.le 4c <dotprod+0x4c>
8:
d2800003 mov x3, #0x0 // #0
c:
93407c42 sxtw x2, w2
10:
2538c001 mov z1.b, #0
14:
25221fe0 whilelo p0.b, xzr, x2
18:
2538c003 mov z3.b, #0
1c:
d503201f nop
20:
a4034002 ld1b {z2.b}, p0/z, [x0, x3]
24:
a4034020 ld1b {z0.b}, p0/z, [x1, x3]
28:
0430e3e3 incb x3
2c:
0523c000 sel z0.b, p0, z0.b, z3.b
30:
25221c60 whilelo p0.b, x3, x2
34:
44820401 udot z1.s, z0.b, z2.b
38:
54ffff41 b.ne 20 <dotprod+0x20> // b.any
3c:
2598e3e0 ptrue p0.s
40:
04812021 uaddv d1, p0, z1.s
44:
1e260020 fmov w0, s1
48:
d65f03c0 ret
4c:
1e2703e1 fmov s1, wzr
50:
1e260020 fmov w0, s1
54:
d65f03c0 ret
Notice how udot is used inside a fully masked loop.
I tested this patch in an aarch64 machine bootstrapping the compiler and
running the checks.
gcc/Changelog:
2019-05-02 Alejandro Martinez <alejandro.martinezvicente@arm.com>
* config/aarch64/aarch64-sve.md (<sur>dot_prod<vsi2qi>): Taken from SVE
ACLE branch.
* config/aarch64/iterators.md: Copied Vetype_fourth, VSI2QI and vsi2qi from
SVE ACLE branch.
* tree-vect-loop.c (use_mask_by_cond_expr_p): New function to check if a
VEC_COND_EXPR be inserted to emulate a conditional internal function.
(build_vect_cond_expr): Emit the VEC_COND_EXPR.
(vectorizable_reduction): Use the functions above to vectorize in a
fully masked loop codes that don't have a conditional internal
function.
gcc/testsuite/Changelog:
2019-05-02 Alejandro Martinez <alejandro.martinezvicente@arm.com>
* gcc.target/aarch64/sve/dot_1.c: New test for dot product.
From-SVN: r270790
Martin Liska [Thu, 2 May 2019 08:43:25 +0000 (10:43 +0200)]
Enhance target and target_clone error messages.
2019-05-02 Martin Liska <mliska@suse.cz>
* cgraphclones.c: Call valid_attribute_p with 1 for
target_clone.
* config/i386/i386-c.c (ix86_pragma_target_parse): Use 0 as
it's for target attribute.
* config/i386/i386-protos.h (ix86_valid_target_attribute_tree):
Add new boolean argument.
* config/i386/i386.c (ix86_valid_target_attribute_inner_p):
Likewise.
(ix86_valid_target_attribute_tree): Pass target_clone_attr
to ix86_valid_target_attribute_inner_p.
(ix86_valid_target_attribute_p): Pass flags argument to
ix86_valid_target_attribute_inner_p.
(get_builtin_code_for_version): Use 0 as it's target attribute.
2019-05-02 Martin Liska <mliska@suse.cz>
* gcc.target/i386/funcspec-4.c: Update scanned pattern.
* g++.target/i386/pr57362.C: Likewise.
From-SVN: r270789
Martin Liska [Thu, 2 May 2019 08:16:12 +0000 (10:16 +0200)]
Postpone print of --help=* option.
2019-05-02 Martin Liska <mliska@suse.cz>
* gcc.c (process_command): Add dummy file only
if n_infiles == 0.
* opts-global.c (decode_options): Pass lang_mask.
* opts.c (print_help): New function.
(finish_options): Print --help if help_option_argument
is set.
(common_handle_option): Factor out content of OPT__help_
into print_help.
* opts.h (finish_options): Add new argument.
From-SVN: r270788
Martin Liska [Thu, 2 May 2019 07:57:38 +0000 (09:57 +0200)]
Prefer to use strlen call instead of inline expansion (PR target/88809).
2019-05-02 Martin Liska <mliska@suse.cz>
PR target/88809
* config/i386/i386.c (ix86_expand_strlen): Use strlen call.
With -minline-all-stringops use inline expansion using 4B loop.
* doc/invoke.texi: Document the change of
-minline-all-stringops.
2019-05-02 Martin Liska <mliska@suse.cz>
PR target/88809
* gcc.target/i386/pr88809.c: New test.
* gcc.target/i386/pr88809-2.c: New test.
From-SVN: r270787
GCC Administrator [Thu, 2 May 2019 00:16:20 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270786
Ian Lance Taylor [Wed, 1 May 2019 21:37:00 +0000 (21:37 +0000)]
compiler: recognize and optimize map range clear
Recognize
for k := range m { delete(m, k) }
for map m, and rewrite it to runtime.mapclear, as the gc compiler
does.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/169397
From-SVN: r270780
Ian Lance Taylor [Wed, 1 May 2019 21:34:16 +0000 (21:34 +0000)]
compiler,runtime: do more direct interfaces
A direct interface is an interface whose data word contains the
actual data value, instead of a pointer to it. The gc toolchain
creates a direct interface if the value is pointer shaped, that
includes pointers (including unsafe.Pointer), functions, channels,
maps, and structs and arrays containing a single pointer-shaped
field. In gccgo, we only do this for pointers. This CL unifies
direct interface types with gc. This reduces allocations when
converting such types to interfaces.
Our method functions used to always take pointer receivers, to
make interface calls easy. Now for direct interface types, their
value methods will take value receivers. For a pointer to those
types, when converted to interface, the interface data contains
the pointer. For that interface to call a value method, it will
need a wrapper method that dereference the pointer and invokes
the value method. The wrapper method, instead of the actual one,
is put into the itable of the pointer type.
In the runtime, adjust funcPC for the new layout of interfaces of
functions.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/168409
From-SVN: r270779
Ian Lance Taylor [Wed, 1 May 2019 20:27:36 +0000 (20:27 +0000)]
runtime: persistentalloc and cache itabs
Previously, each time we do an interface conversion for which the
method table is not known at compile time, we allocate a new
method table.
This CL ports the mechanism of itab caching from the gc runtime,
adapted to our itab representation and method finding mechanism.
With the cache, we reuse the same itab for the same (interface,
concrete) type pair. This reduces allocations in interface
conversions.
Unlike the gc runtime, we don't prepopulate the cache with
statically allocated itabs, as currently we don't have a way to
find them. This means we don't deduplicate run-time allocated
itabs with compile-time allocated ones. But that is not too bad
-- it is just a cache anyway.
As now itabs are never freed, it is also possible to drop the
write barrier for writing the first word of an interface header.
I'll leave this optimization for the future.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/171617
From-SVN: r270778
Andrew Benson [Wed, 1 May 2019 19:47:51 +0000 (19:47 +0000)]
module.c (write_module): Initialize module_column before writing module to ensure line break occurs at...
* module.c (write_module): Initialize module_column before writing
module to ensure line break occurs at correct column
From-SVN: r270777
Dominique d'Humieres [Wed, 1 May 2019 17:40:22 +0000 (19:40 +0200)]
re PR fortran/60144 (Misleading error message when missing "then" after "if" and "else if")
2019-05-01 Dominique d'Humieres <dominiq@gcc.gnu.org>
PR fortran/60144
* match.c (gfc_match_parens): Change the location for missing ')'.
(gfc_match_if): Detect a missing '('. Remove the spurious named
constant error. Change the wording of some errors.
(gfc_match_else): Change the wording of an error.
(gfc_match_elseif): Detect a missing '('. Improve the matching
process to get a better syntax analysis.
PR fortran/60144
* gfortran.dg/block_name_2.f90: Adjust dg-error.
* gfortran.dg/dec_type_print_3.f90.f90: Likewise
* gfortran.dg/pr60144.f90: New test.
From-SVN: r270776
Jeff Law [Wed, 1 May 2019 17:33:32 +0000 (11:33 -0600)]
re PR tree-optimization/88797 (Unneeded branch added when function is inlined (function runs faster if not inlined))
PR tree-optimization/88797
* gimple-ssa-split-paths (is_feasible_trace): Reject cases where the
PHI feeds a conditional on the RHS of an assignment.
PR tree-optimization/88797
* g++.dg/tree-ssa/pr88797.C: New test.
From-SVN: r270775
Rainer Orth [Wed, 1 May 2019 16:14:30 +0000 (16:14 +0000)]
Update Solaris baselines for GCC 9.1
* config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
* config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
* config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
* config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
* config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
* config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
Likewise.
* config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
* config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
Likewise.
From-SVN: r270773
Nathan Sidwell [Wed, 1 May 2019 11:38:54 +0000 (11:38 +0000)]
[C++ PATCH] Simplify class member lookup
https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00004.html
gcc/cp/
* name-lookup.h (get_class_binding_direct): Change final arg to
bool.
(get_class_binding): Likewise.
* name-lookup.c (get_class_binding_direct): Replace TYPE_OR_FNS
arg with WANT_TYPE bool. Simplify.
(get_class_binding): Adjust final arg.
* decl.c (reshape_init_class): Adjust get_class_binding calls.
gcc/testsuite/
* g++.dg/cpp0x/decltype9.C: Adjust expected diagnostics.
From-SVN: r270765
Andrew Waterman [Wed, 1 May 2019 04:45:34 +0000 (21:45 -0700)]
RISC-V: Update last ChangeLog entry to mention Andrew Waterman.
From-SVN: r270764
GCC Administrator [Wed, 1 May 2019 00:16:14 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270763
Jonathan Wakely [Wed, 1 May 2019 00:08:36 +0000 (01:08 +0100)]
PR libstdc++/61761 fix std::proj for targets without C99 cproj
The current generic implementation of __complex_proj used when cproj is
not available calculates the wrong projection, giving a different result
than given by C99's cproj.
When C99 cproj is not available but isinf and copysign are, use those to
give correct results for float, double and long double. Otherwise, and
for other specializations of std::complex, just use a generic version
that returns its argument, and so doesn't support infinities.
We might want to consider adding additional overloads of __complex_proj
to support extended types such as _Float64x, _Float128 etc.
PR libstdc++/61761
* include/std/complex (__complex_proj): Return parameter unchanged.
[_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
floating-point types to take std::complex arguments.
[_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
floating-point types.
* testsuite/26_numerics/complex/proj.cc: New test.
From-SVN: r270759
Andrew Waterman [Tue, 30 Apr 2019 23:45:36 +0000 (16:45 -0700)]
RISC-V: Short-forward-branch opt for SiFive 7 series cores.
gcc/
* config/riscv/constraints.md (L): New.
* config/riscv/predicates.md (lui_operand): New.
(sfb_alu_operand): New.
* config/riscv/riscv-protos.h (riscv_expand_conditional_move): Declare.
* config/riscv/riscv.c (riscv_expand_conditional_move): New.
* config/riscv/riscv.h (TARGET_SFB_ALU): New.
* config/riscv/risc.md (type): Add sfb_alu.
(branch<mode>): Renamed from branch_order<mode>. Change predicate for
operand 3 to reg_or_0_operand. In output string, change %3 to %z3.
(branch_zero<mode>): Delete.
(mov<mode>cc): New.
(mov<GPR:mode><X:mode>cc): Likewise.
* config/riscv/sifive-7.md (sifive_7_sfb_alu): New. Use in bypasses.
From-SVN: r270758
Nathan Sidwell [Tue, 30 Apr 2019 20:23:45 +0000 (20:23 +0000)]
[GC PATCH] Correct TS marking of _EXPR nodes
https://gcc.gnu.org/ml/gcc-patches/2019-04/msg01266.html
gcc/
* tree.h (MARK_TS_EXP): New.
gcc/c-family/
* c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
gcc/cp/
* cp-objcp-common.c (cp_common_init_ts): Use MARK_TS_EXP for _EXPR
nodes. Call c_common_init_ts.
From-SVN: r270711
Joseph Myers [Tue, 30 Apr 2019 19:57:37 +0000 (20:57 +0100)]
* de.po: Update.
From-SVN: r270709
Jakub Jelinek [Tue, 30 Apr 2019 16:30:44 +0000 (18:30 +0200)]
re PR target/89093 (C++ exception handling clobbers d8 VFP register)
PR target/89093
* gcc.target/aarch64/return_address_sign_3.c: Remove extra space in
target attribute.
From-SVN: r270705
Roland Illig [Tue, 30 Apr 2019 16:14:40 +0000 (16:14 +0000)]
* check-internal-format-escaping.py: New version using polib.
From-SVN: r270704
Giuliano Belinassi [Tue, 30 Apr 2019 15:06:31 +0000 (15:06 +0000)]
sinhatanh-2.c: Count the number of functions.
* gcc.dg/sinhatanh-2.c: Count the number of functions.
* gcc.dg/sinhatanh-3.c: Likewise.
From-SVN: r270703
Ben L [Tue, 30 Apr 2019 14:39:14 +0000 (14:39 +0000)]
d-demangle.c (dlang_parse_assocarray): Correctly handle error result.
* d-demangle.c (dlang_parse_assocarray): Correctly handle error result.
* testsuite/d-demangle-expected: Add testcase.
From-SVN: r270700
Ben L [Tue, 30 Apr 2019 14:37:51 +0000 (14:37 +0000)]
d-demangle.c (dlang_parse_tuple): Correctly handle error result.
* d-demangle.c (dlang_parse_tuple): Correctly handle error result.
* testsuite/d-demangle-expected: Add testcase.
From-SVN: r270699
Ben L [Tue, 30 Apr 2019 14:36:24 +0000 (14:36 +0000)]
d-demangle.c (dlang_parse_structlit): Correctly handle error result.
* d-demangle.c (dlang_parse_structlit): Correctly handle error result.
* testsuite/d-demangle-expected: Add testcase.
From-SVN: r270698
Ben L [Tue, 30 Apr 2019 14:34:52 +0000 (14:34 +0000)]
d-demangle.c (dlang_parse_arrayliteral): Correctly handle error result.
* d-demangle.c (dlang_parse_arrayliteral): Correctly handle error result.
* testsuite/d-demangle-expected: Add testcase.
From-SVN: r270697
Ben L [Tue, 30 Apr 2019 14:32:38 +0000 (14:32 +0000)]
d-demangle.c (dlang_parse_integer): Fix stack underflow.
* d-demangle.c (dlang_parse_integer): Fix stack underflow.
* testsuite/d-demangle-expected: Add testcase.
From-SVN: r270696
Ben L [Tue, 30 Apr 2019 14:22:41 +0000 (14:22 +0000)]
cp-demangle (d_print_comp_inner): Guard against a NULL 'typed_name'.
* cp-demangle (d_print_comp_inner): Guard against a NULL 'typed_name'.
* testsuite/demangle-expected: Add testcase.
From-SVN: r270695
Ben L [Tue, 30 Apr 2019 14:20:11 +0000 (14:20 +0000)]
cp-demangle.c (d_encoding): Guard against NULL return values from d_right (dc).
* cp-demangle.c (d_encoding): Guard against NULL return values from
d_right (dc).
* testsuite/demangle-expected: Add testcase.
From-SVN: r270694
Martin Liska [Tue, 30 Apr 2019 13:50:24 +0000 (15:50 +0200)]
Add option suggestion for -Werror=foo and corresponding pragma.
2019-04-30 Martin Liska <mliska@suse.cz>
* opts.c (enable_warning_as_error): Provide hints
for unknown options.
2019-04-30 Martin Liska <mliska@suse.cz>
* c-pragma.c (handle_pragma_diagnostic): Provide hints
for unknown options.
2019-04-30 Martin Liska <mliska@suse.cz>
* gcc.dg/Werror-13.c: Add new tests for it.
* gcc.dg/pragma-diag-6.c: Likewise.
From-SVN: r270693
Martin Liska [Tue, 30 Apr 2019 13:31:22 +0000 (15:31 +0200)]
Add missing dash for 2 options in documentation (PR debug/90288).
2019-04-30 Martin Liska <mliska@suse.cz>
PR debug/90288
* doc/invoke.texi: Add missing dash for gas-locview-support
and gno-as-locview-support.
From-SVN: r270692
Jakub Jelinek [Tue, 30 Apr 2019 12:11:18 +0000 (14:11 +0200)]
Remove unintended part of r270680 commit.
From-SVN: r270691