platform/upstream/gcc.git
5 years agopr91684.c: Use effective-target arm_prefer_ldrd_strd.
Bernd Edlinger [Sat, 7 Sep 2019 18:26:26 +0000 (18:26 +0000)]
pr91684.c: Use effective-target arm_prefer_ldrd_strd.

2019-09-07  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * gcc.target/arm/pr91684.c: Use effective-target arm_prefer_ldrd_strd.

From-SVN: r275489

5 years agodecomp2.C: Add TLS options.
David Edelsohn [Sat, 7 Sep 2019 15:23:51 +0000 (15:23 +0000)]
decomp2.C: Add TLS options.

        * g++.dg/cpp2a/decomp2.C: Add TLS options.
        * gcc.target/powerpc/pr88233.c: Limit to lp64.

From-SVN: r275488

5 years agore PR tree-optimization/91665 (ICE in build_vector_from_val, at tree.c:1904)
Jakub Jelinek [Sat, 7 Sep 2019 09:52:01 +0000 (11:52 +0200)]
re PR tree-optimization/91665 (ICE in build_vector_from_val, at tree.c:1904)

PR tree-optimization/91665
* tree-vect-loop.c (vectorizable_reduction): Punt if base has type
incompatible with the type of PHI result.

* gcc.dg/vect/pr91665.c: New test.

From-SVN: r275486

5 years agoadd PR target/91684 to ChangeLog
Bernd Edlinger [Sat, 7 Sep 2019 05:11:16 +0000 (05:11 +0000)]
add PR target/91684 to ChangeLog

From-SVN: r275484

5 years agoarm.c (arm_block_set_aligned_non_vect): Use gen_unaligned_storedi for 4-byte aligned...
Bernd Edlinger [Sat, 7 Sep 2019 04:38:58 +0000 (04:38 +0000)]
arm.c (arm_block_set_aligned_non_vect): Use gen_unaligned_storedi for 4-byte aligned addresses.

2019-09-07  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * config/arm/arm.c (arm_block_set_aligned_non_vect): Use
        gen_unaligned_storedi for 4-byte aligned addresses.

testsuite:
2019-09-07  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * gcc.target/arm/pr91684.c: New test.

From-SVN: r275483

5 years agoDaily bump.
GCC Administrator [Sat, 7 Sep 2019 00:16:46 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r275482

5 years agoRISC-V: Re-enable -msave-restore for shared libraries.
Jim Wilson [Sat, 7 Sep 2019 00:09:21 +0000 (00:09 +0000)]
RISC-V: Re-enable -msave-restore for shared libraries.

This re-enables -msave-restore for shared libraries, and uses the
t-slibgcc-libgcc file to get the save-restore routines included directly
in shared libraries so that we don't need to indirect through the PLT
to reach them, which doesn't work.

gcc/
* config/riscv/riscv.c (riscv_option_override): Revert 2019-08-30
change.

libgcc/
* config.host (riscv*-*-linux*): Add t-slibgcc-libgcc to tmake_file.
(riscv*-*-freebsd*): Likewise.

From-SVN: r275478

5 years agors6000: Delete UNSPEC_MV_CR_OV.
Segher Boessenkool [Fri, 6 Sep 2019 19:43:47 +0000 (21:43 +0200)]
rs6000: Delete UNSPEC_MV_CR_OV.

This isn't used since 2018.  (It's a remnant of paired single support).

* config/rs6000/rs6000.md (unspec): Delete UNSPEC_MV_CR_OV.

From-SVN: r275477

5 years agors6000: Delete UNSPEC_FRSP
Segher Boessenkool [Fri, 6 Sep 2019 19:42:38 +0000 (21:42 +0200)]
rs6000: Delete UNSPEC_FRSP

This isn't used since 2012.  (It's a remnant of RIOS support).

* config/rs6000/rs6000.c (rs6000_rtx_costs) <case UNSPEC>: Delete.
* config/rs6000/rs6000.md (unspec): Delete UNSPEC_FRSP.

From-SVN: r275476

5 years agore PR target/91654 (Regressions of SPEC2017 rate caused by r274994)
Uros Bizjak [Fri, 6 Sep 2019 19:27:58 +0000 (21:27 +0200)]
re PR target/91654 (Regressions of SPEC2017 rate caused by r274994)

PR target/91654
* config/i386/x86-tune-costs.h (skylake_cost): Raise the
cost of SSE->integer and integer->SSE moves from 2 to 6.
(core_cost): Ditto.

From-SVN: r275475

5 years agolibgo: update to Go 1.13beta1 release
Ian Lance Taylor [Fri, 6 Sep 2019 18:12:46 +0000 (18:12 +0000)]
libgo: update to Go 1.13beta1 release

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/193497

From-SVN: r275473

5 years agofunction.c (assign_parm_find_data_types): Use RECORD_OR_UNION_TYPE_P before testing...
Jakub Jelinek [Fri, 6 Sep 2019 17:33:41 +0000 (19:33 +0200)]
function.c (assign_parm_find_data_types): Use RECORD_OR_UNION_TYPE_P before testing TYPE_TRANSPARENT_AGGR.

* function.c (assign_parm_find_data_types): Use RECORD_OR_UNION_TYPE_P
before testing TYPE_TRANSPARENT_AGGR.
* calls.c (initialize_argument_information, load_register_parameters):
Likewise.

From-SVN: r275472

5 years agoinf-compare-1.c: Skip AIX.
David Edelsohn [Fri, 6 Sep 2019 15:29:01 +0000 (15:29 +0000)]
inf-compare-1.c: Skip AIX.

        * gcc.dg/torture/inf-compare-1.c: Skip AIX.
        * gcc.dg/torture/inf-compare-2.c: Skip AIX.
        * gcc.dg/torture/inf-compare-3.c: Skip AIX.
        * gcc.dg/torture/inf-compare-4.c: Skip AIX.
        * gcc.dg/torture/pr52451.c: Skip AIX.
        * gcc.dg/torture/pr68264.c: Skip AIX
        * gcc.dg/torture/pr91323.c: Skip AIX.

From-SVN: r275464

5 years agoWarray-bounds-4.C: Skip AIX.
David Edelsohn [Fri, 6 Sep 2019 15:24:28 +0000 (15:24 +0000)]
Warray-bounds-4.C: Skip AIX.

        * g++.dg/warn/Warray-bounds-4.C: Skip AIX.
        * g++.dg/warn/Warray-bounds-8.C: Skip AIX.
        * g++.dg/opt/flifetime-dse2.C: XFAIL AIX.
        * g++.dg/opt/flifetime-dse4.C: XFAIL AIX.

From-SVN: r275462

5 years agoFix testcase to not use LTO with -fvtable-verify.
Caroline Tice [Fri, 6 Sep 2019 14:54:48 +0000 (07:54 -0700)]
Fix testcase to not use LTO with -fvtable-verify.

2019-09-05  Caroline Tice  <cmtice@google.com>

        PR testsuite/91670
        * g++.dg/ubsan/pr59415.C: Disable LTO, since test uses
        -fvtable-verify, and the two options are no longer allowed
        together.

From-SVN: r275460

5 years agoDefine std::ssize for C++20 (P1227R2)
Jonathan Wakely [Fri, 6 Sep 2019 12:54:51 +0000 (13:54 +0100)]
Define std::ssize for C++20 (P1227R2)

* include/bits/range_access.h (ssize): Define for C++20.
* testsuite/24_iterators/range_access_cpp20.cc: New test.
* doc/xml/manual/status_cxx2020.xml: Update P1227R2 status.
* doc/html/*: Regenerate.

From-SVN: r275458

5 years ago[preprocessor] Popping "" file names
Nathan Sidwell [Fri, 6 Sep 2019 12:54:19 +0000 (12:54 +0000)]
[preprocessor] Popping "" file names

https://gcc.gnu.org/ml/gcc-patches/2019-08/msg02069.html
New # semantics for popping to "" name.
libcpp/
* directives.c (do_linemarker): Popping to "" name means get the
name from the include stack..

From-SVN: r275457

5 years ago[PATCH] Deprecate -frepo option.
Nathan Sidwell [Fri, 6 Sep 2019 12:51:44 +0000 (12:51 +0000)]
[PATCH] Deprecate -frepo option.

https://gcc.gnu.org/ml/gcc-patches/2019-09/msg00379.html
PR c++/91125
* cp-tree.h (IDENTIFIER_REPO_CHOSEN, DECL_REPO_AVAILABLE_P): Delete.
(struct lang_decl_base): Remove repo_available_p.
* decl.c (duplicate_decls): Don't copy DECL_REPO_AVAILABLE_P.

From-SVN: r275456

5 years ago[C++ PATCH] Reserve a decl_lang bit
Nathan Sidwell [Fri, 6 Sep 2019 11:22:09 +0000 (11:22 +0000)]
[C++ PATCH] Reserve a decl_lang bit

https://gcc.gnu.org/ml/gcc-patches/2019-09/msg00365.html
Reserve TREE_LANG_FLAG_3 for modules.
gcc/cp/
* cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): Delete.
(DECL_NON_TRIVIALLY_INITIALIZED_P): Move to TREE_LANG_FLAG_6.
* class.c (build_ctor_vtbl_group): Don't set
DECL_CONSTRUCTION_VTABLE_P.
* decl2.c (determine_visibility_from_class): Don't check
DECL_CONSTRUCTION_VTABLE_P anymore.

From-SVN: r275455

5 years agoFix GCC_LINUX_FUTEX to work with C99 compilers
Florian Weimer [Fri, 6 Sep 2019 10:27:36 +0000 (12:27 +0200)]
Fix GCC_LINUX_FUTEX to work with C99 compilers

Without this change, libstdc++ is built without futex symbols if GCC
rejects implicit function declarations by default.

From-SVN: r275454

5 years ago[arm] Add missing predicated-short-it variants to cmp_and and cmp_ior patterns
Richard Earnshaw [Fri, 6 Sep 2019 09:58:14 +0000 (09:58 +0000)]
[arm] Add missing predicated-short-it variants to cmp_and and cmp_ior patterns

The cmp_and and cmp_ior patterns were missing a couple of short-it
variants for thumb2, where the comparisons are all using registers
some of which were HI_REGS.

* config/arm/arm.md (cmp_and): Add short-it variant for thumb2 with
high regs.
(cmp_ior): Likewise.

From-SVN: r275453

5 years agoImprove documentation of for statement.
Martin Liska [Fri, 6 Sep 2019 09:38:28 +0000 (11:38 +0200)]
Improve documentation of for statement.

2019-09-06  Martin Liska  <mliska@suse.cz>

* doc/match-and-simplify.texi: Separate tuples with ;.

From-SVN: r275452

5 years agoRemove support for repo files (PR c++/91125).
Martin Liska [Fri, 6 Sep 2019 06:58:42 +0000 (08:58 +0200)]
Remove support for repo files (PR c++/91125).

2019-09-06  Martin Liska  <mliska@suse.cz>

PR c++/91125
* Makefile.in: Remove tlink.o.
* collect2.c (do_link): New function isolated
from do_tlink.
(main): Use.
* collect2.h (do_tlink): Remove declaration of do_tlink.
* doc/extend.texi: Remove documentation of -frepo.
* doc/invoke.texi: Likewise.
* doc/sourcebuild.texi: Remove cleanup-repo-files.
* tlink.c: Remove.
2019-09-06  Martin Liska  <mliska@suse.cz>

PR c++/91125
* c-common.c: Remove definition of flag_use_repository.
* c-common.h: Likewise.
* c-opts.c (c_common_handle_option):
Do not handle OPT_frepo option.
* c.opt: Mark the option with Deprecated.
2019-09-06  Martin Liska  <mliska@suse.cz>

PR c++/91125
* Make-lang.in: Remove repo.o.
* config-lang.in: Likewise.
* cp-tree.h (init_repo): Remove declarations
of repo-related functions.
(repo_emit_p): Likewise.
(repo_export_class_p): Likewise.
(finish_repo): Likewise.
* decl2.c (import_export_class): Always
set -1 value/
(mark_needed): Remove -frepo from comment.
(import_export_decl): Similarly here.
(c_parse_final_cleanups): Remove call of finish_repo.
* lex.c (cxx_init): Remove call to init_repo.
* optimize.c (can_alias_cdtor): Remove dead condition.
* pt.c (push_template_decl_real): Update comment.
(instantiate_decl): Remove dead code used for -frepo.
* repo.c: Remove.
2019-09-06  Martin Liska  <mliska@suse.cz>

PR c++/91125
* g++.dg/parse/repo1.C: Remove.
* g++.dg/rtti/repo1.C: Remove.
* g++.dg/template/repo1.C: Remove.
* g++.dg/template/repo10.C: Remove.
* g++.dg/template/repo11.C: Remove.
* g++.dg/template/repo2.C: Remove.
* g++.dg/template/repo3.C: Remove.
* g++.dg/template/repo4.C: Remove.
* g++.dg/template/repo5.C: Remove.
* g++.dg/template/repo6.C: Remove.
* g++.dg/template/repo7.C: Remove.
* g++.dg/template/repo8.C: Remove.
* g++.dg/template/repo9.C: Remove.
* g++.old-deja/g++.pt/instantiate4.C: Remove.
* g++.old-deja/g++.pt/instantiate6.C: Remove.
* g++.old-deja/g++.pt/repo1.C: Remove.
* g++.old-deja/g++.pt/repo2.C: Remove.
* g++.old-deja/g++.pt/repo3.C: Remove.
* g++.old-deja/g++.pt/repo4.C: Remove.
* lib/g++.exp: Remove removal of repo files.
* lib/gcc-dg.exp: Likewise.
* lib/obj-c++.exp: Likewise.

From-SVN: r275450

5 years agoDaily bump.
GCC Administrator [Fri, 6 Sep 2019 00:16:38 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r275449

5 years agoRISC-V: Fix bad insn splits with paradoxical subregs.
Jakub Jelinek [Thu, 5 Sep 2019 20:32:55 +0000 (22:32 +0200)]
RISC-V: Fix bad insn splits with paradoxical subregs.

Shifting by more than the size of a SUBREG_REG doesn't work, so we either
need to disable splits if an input is paradoxical, or else we need to
generate a clean temporary for intermediate results.

Jakub wrote the first version of this patch, so gets primary credit for it.

gcc/
PR target/91635
* config/riscv/riscv.md (zero_extendsidi2, zero_extendhi<GPR:mode>2,
extend<SHORT:mode><SUPERQI:mode>2): Don't split if
paradoxical_subreg_p (operands[0]).
(*lshrsi3_zero_extend_3+1, *lshrsi3_zero_extend_3+2): Add clobber and
use as intermediate value.

gcc/testsuite/
PR target/91635
* gcc.c-torture/execute/pr91635.c: New test.
* gcc.target/riscv/shift-shift-4.c: New test.
* gcc.target/riscv/shift-shift-5.c: New test.

Co-Authored-By: Jim Wilson <jimw@sifive.com>
From-SVN: r275444

5 years agore PR fortran/91496 (!GCC$ directives error if mistyped or unknown)
Harald Anlauf [Thu, 5 Sep 2019 20:13:00 +0000 (20:13 +0000)]
re PR fortran/91496 (!GCC$ directives error if mistyped or unknown)

2019-09-05  Harald Anlauf  <anlauf@gmx.de>

PR fortran/91496
* parse.c (parse_executable): Improve error messages for
improperly placed pragmas not preceeding a loop.

PR fortran/91496
* gfortran.dg/directive_unroll_5.f90: Adjust error message.

From-SVN: r275442

5 years agore PR fortran/91660 (Missing error on invalid type declaration)
Steven G. Kargl [Thu, 5 Sep 2019 18:14:34 +0000 (18:14 +0000)]
re PR fortran/91660 (Missing error on invalid type declaration)

2019-09-05  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91660
* decl.c (gfc_match_decl_type_spec): Improve and restore error
message for malformed types-spec.

2019-09-05  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91660
* gfortran.dg/pdt_4.f03: Fix invalid code.
* gfortran.dg/pr91660_1.f90: New test.
* gfortran.dg/pr91660_2.f90: Ditto.

From-SVN: r275426

5 years agoPR c++/91644 - ICE with constinit in function template.
Marek Polacek [Thu, 5 Sep 2019 15:37:52 +0000 (15:37 +0000)]
PR c++/91644 - ICE with constinit in function template.

* decl.c (start_decl): Call retrofit_lang_decl for constinit variables.
* pt.c (tsubst_expr): Pass LOOKUP_CONSTINIT down to cp_finish_decl for
constinit variables.

* g++.dg/cpp2a/constinit13.C: New test.

From-SVN: r275421

5 years agoGlobal GCN instructions need nops too.
Andrew Stubbs [Thu, 5 Sep 2019 14:21:28 +0000 (14:21 +0000)]
Global GCN instructions need nops too.

2019-09-05  Andrew Stubbs  <ams@codesourcery.com>

gcc/
* config/gcn/gcn.md (*movti_insn): Set delayeduse for global_store.
(sync_compare_and_swap<mode>_insn): Likewise.

From-SVN: r275414

5 years agoImprove precondition checks for std::span
Jonathan Wakely [Thu, 5 Sep 2019 13:48:33 +0000 (14:48 +0100)]
Improve precondition checks for std::span

* doc/xml/manual/status_cxx2020.xml: Update status for P0122R7 and
P1024R3. Remove entry for P0920R2.
* include/std/span  (__cpp_lib_span): Change value.
(__extent_storage, __extent_storage<dynamic_extent>): Remove default
constructor.
(span): Replace __extent_storage base class with data member.
(span::_S_subspan_extent): New function.
(span::empty()): Add nodiscard attribute.
(span::front, span::back, span::operator[]): Check preconditions.
(span::first, span::last, span::subspan): Add noexcept. Improve
precondition checks (LWG 3103).
(get): Remove redundant condition from static_assert.
(tuple_element<I, span<T, E>>): Fix static_assert message and simplify.
(as_writable_bytes): Add inline specifier.
* include/std/version (__cpp_lib_span): Change value.
* testsuite/23_containers/span/back_neg.cc: Remove stray semi-colon.
* testsuite/23_containers/span/front_neg.cc: Likewise.
* testsuite/23_containers/span/index_op_neg.cc: Likewise.
* testsuite/23_containers/span/last_neg.cc: Improve test.
* testsuite/23_containers/span/subspan_neg.cc: Likewise.
* testsuite/23_containers/span/1.cc: New test.
* testsuite/23_containers/span/2.cc: New test.
* testsuite/23_containers/span/back_assert_neg.cc: New test.
* testsuite/23_containers/span/first_2_assert_neg.cc: New test.
* testsuite/23_containers/span/first_assert_neg.cc: New test.
* testsuite/23_containers/span/first_neg.cc: New test.
* testsuite/23_containers/span/front_assert_neg.cc: New test.
* testsuite/23_containers/span/index_op_assert_neg.cc: New test.
* testsuite/23_containers/span/last_2_assert_neg.cc: New test.
* testsuite/23_containers/span/last_assert_neg.cc: New test.
* testsuite/23_containers/span/subspan_2_assert_neg.cc: New test.
* testsuite/23_containers/span/subspan_3_assert_neg.cc: New test.
* testsuite/23_containers/span/subspan_4_assert_neg.cc: New test.
* testsuite/23_containers/span/subspan_5_assert_neg.cc: New test.
* testsuite/23_containers/span/subspan_6_assert_neg.cc: New test.
* testsuite/23_containers/span/subspan_assert_neg.cc: New test.

From-SVN: r275411

5 years agore PR target/91615 ([armeb] ICEs since r274986)
Bernd Edlinger [Thu, 5 Sep 2019 13:40:17 +0000 (13:40 +0000)]
re PR target/91615 ([armeb] ICEs since r274986)

2019-09-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR middle-end/91615
        * expr.c (expand_expr_real_1): Handle misaligned TARGET_MEM_REF
        without movmisalign optab.

From-SVN: r275409

5 years agore PR middle-end/91001 (internal compiler error: in extract_insn, at recog.c:2310)
Jakub Jelinek [Thu, 5 Sep 2019 13:30:23 +0000 (15:30 +0200)]
re PR middle-end/91001 (internal compiler error: in extract_insn, at recog.c:2310)

PR middle-end/91001
PR middle-end/91105
PR middle-end/91106
* calls.c (load_register_parameters): For TYPE_TRANSPARENT_AGGR
types, use type of their first field instead of type of
args[i].tree_value.

* gcc.c-torture/compile/pr91001.c: New test.

From-SVN: r275408

5 years agore PR rtl-optimization/91656 (wrong code with -fgcse-after-reload)
Richard Biener [Thu, 5 Sep 2019 13:23:28 +0000 (13:23 +0000)]
re PR rtl-optimization/91656 (wrong code with -fgcse-after-reload)

2019-09-05  Richard Biener  <rguenther@suse.de>

PR rtl-optimization/91656
* postreload-gcse.c (record_last_mem_set_info): Revert addition
of early out.

* gcc.dg/torture/pr91656-1.c: New testcase.
* gcc.dg/torture/pr91656-2.c: Likewise.
* gcc.dg/torture/pr91656-3.c: Likewise.

From-SVN: r275406

5 years ago[C++ PATCH] vtable decl marking
Nathan Sidwell [Thu, 5 Sep 2019 11:31:08 +0000 (11:31 +0000)]
[C++ PATCH] vtable decl marking

https://gcc.gnu.org/ml/gcc-patches/2019-08/msg02063.html
* cp-tree.h (DECL_VTABLE_OR_VTT_P): Forward to DECL_VIRTUAL_P.

From-SVN: r275404

5 years agoImplement std::span for C++20
JeanHeyd Meneide [Thu, 5 Sep 2019 11:27:45 +0000 (11:27 +0000)]
Implement std::span for C++20

2019-09-05  JeanHeyd Meneide  <phdofthehouse@gmail.com>

* include/Makefile.am: Add <span> header.
* include/Makefile.in: Regenerate.
* include/bits/range_access.h (__adl_begin, __adl_end, __adl_cbegin)
(__adl_cend, __adl_rbegin, __adl_rend, __adl_crbegin, __adl_crend)
(__adl_data, __adl_cdata, __adl_size, __adl_empty, __adl_to_address):
New functions for performing argument-dependent lookup of range
customization points.
* include/bits/stl_iterator.h (__normal_iterator): Add
_GLIBCXX20_CONSTEXPR to all functions.
* include/std/span: New header.
* include/std/version (__cpp_lib_span): Define feature test macro.
* testsuite/23_containers/span/contiguous_range_neg.cc: New test.
* testsuite/23_containers/span/everything.cc: New test.
* testsuite/23_containers/span/get_neg.cc: New test.
* testsuite/23_containers/span/last_neg.cc: New test.
* testsuite/23_containers/span/subspan_neg.cc: New test.
* testsuite/23_containers/span/tuple_element_dynamic_neg.cc: New test.
* testsuite/23_containers/span/tuple_element_oob_neg.cc: New test.
* testsuite/23_containers/span/tuple_size_neg.cc: New test.

From-SVN: r275403

5 years ago[preprocessor/91639] #includes at EOF
Nathan Sidwell [Thu, 5 Sep 2019 11:23:48 +0000 (11:23 +0000)]
[preprocessor/91639] #includes at EOF

https://gcc.gnu.org/ml/gcc-patches/2019-09/msg00280.html
libcpp/
PR preprocessor/91639
* directives.c (do_include_common): Tell lexer we're a #include.
* files.c (_cpp_stack_file): Lexer will have always incremented.
* internal.h (struct cpp_context): Extend in_directive's
semantics.
* lex.c (_cpp_lex_direct): Increment line for final \n when lexing
for an ISO #include.
* line-map.c (linemap_line_start): Remember if we overflowed.

gcc/testsuite/
PR preprocessor/91639
* c-c++-common/cpp/pr91639.c: New.
* c-c++-common/cpp/pr91639-one.h: New.
* c-c++-common/cpp/pr91639-two.h: New.

From-SVN: r275402

5 years agore PR middle-end/90501 (ICE: address taken, but ADDRESSABLE bit not set)
Richard Biener [Thu, 5 Sep 2019 11:02:43 +0000 (11:02 +0000)]
re PR middle-end/90501 (ICE: address taken, but ADDRESSABLE bit not set)

2019-09-05  Richard Biener  <rguenther@suse.de>

PR middle-end/90501
* tree-inline.c (declare_return_variable): Mark the return
slot as addressable after building an address of it.

From-SVN: r275401

5 years agoinstall.texi: Update and clarify requirements to build GNAT.
Arnaud Charlet [Thu, 5 Sep 2019 09:51:38 +0000 (09:51 +0000)]
install.texi: Update and clarify requirements to build GNAT.

* doc/install.texi: Update and clarify requirements to build GNAT.

From-SVN: r275400

5 years agoForce IFN_LOAD/STORE_LANES operands to be memory (PR91577)
Richard Sandiford [Thu, 5 Sep 2019 07:50:07 +0000 (07:50 +0000)]
Force IFN_LOAD/STORE_LANES operands to be memory (PR91577)

This patch uses the workaround Richi suggested in the PR: make
discover_nonconstant_array_refs mark the source of an IFN_LOAD_LANES
call and the destination of an IFN_STORE_LANES call as addressable,
so that they don't end up being REG rtxes during expansion.

I had to move the discover_nonconstant_array_refs call outside the
currently_expanding_to_rtl block since otherwise mark_addressable
just queues the decision for later.

2019-09-05  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
PR middle-end/91577
* cfgexpand.c (discover_nonconstant_array_refs): Force the source
of an IFN_LOAD_LANES call and the destination of an IFN_STORE_LANES
call to be in memory.
(pass_expand::execute): Call discover_nonconstant_array_refs before
setting currently_expanding_to_rtl.

gcc/testsuite/
PR middle-end/91577
* gfortran.dg/pr91577.f90: New test, taken from temporary_1.f90.

From-SVN: r275399

5 years agoRemove broken URL from libstdc++ manual
Jonathan Wakely [Thu, 5 Sep 2019 07:46:00 +0000 (08:46 +0100)]
Remove broken URL from libstdc++ manual

The URL for the "What Are Allocators Good For?" article has been a
recurring source of problems. It moved from the C/C++ Users Journal
website to the Dr Dobbs site after CUJ shut down, and the original
domain changed hands, leaving old links pointing to nefarious sites.

Now the URL to the copy on drdobbs.com no longer works either and I
can't find a (legal) copy of the article online. The simplest solution
is to remove the URL.

* doc/xml/manual/allocator.xml: Remove URL for bibliography entry.
* doc/html/*: Regenerate.

From-SVN: r275398

5 years agoImprove PRNG jumping when using threads
Janne Blomqvist [Thu, 5 Sep 2019 06:59:55 +0000 (09:59 +0300)]
Improve PRNG jumping when using threads

Currently, when a new thread needs to use the RANDOM_NUMBER intrinsic,
the per-thread PRNG state is initialized by copying the master state
and then jumping forwards N*2**128 entries in the stream so that the
PRNG streams for different threads don't alias each other, where N is
the number of threads that have so far initialized the PRNG.

With this patch the master state itself is jumped forwards once each
time a new thread initializes the PRNG, thus obviating the need to
jump through all the N-1 previous streams. Effectively turning an O(N)
algorithm into an O(1) one.

Regtested on x86_64-pc-linux-gnu.

libgfortran/ChangeLog:

2019-09-05  Janne Blomqvist  <jb@gcc.gnu.org>

* intrinsics/random.c (master_init): Replace with
master_state.init.
(njumps): Remove variable.
(master_state): Make instance of struct prng_state.
(init_rand_state): When jumping, update the master_state once
instead of keeping track of how many jumps need to be done.
(SZU64): Modify to handle new master_state.
(SZ): Likewise.
(random_seed_i4): Likewise.
(random_seed_i8): Likewise.

From-SVN: r275397

5 years agore PR tree-optimization/91663 (split function can be re-inlined, leaving bad stack...
Ian Lance Taylor [Thu, 5 Sep 2019 04:12:30 +0000 (04:12 +0000)]
re PR tree-optimization/91663 (split function can be re-inlined, leaving bad stack trace)

PR tree-optimization/91663
* go-lang.c (go_langhook_post_options): Clear
flag_partial_inlining.

From-SVN: r275396

5 years agoDaily bump.
GCC Administrator [Thu, 5 Sep 2019 00:16:27 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r275395

5 years agore PR fortran/91650 (ICE in gfc_conv_constant_to_tree, at fortran/trans-const.c:370)
Steven G. Kargl [Wed, 4 Sep 2019 23:21:12 +0000 (23:21 +0000)]
re PR fortran/91650 (ICE in gfc_conv_constant_to_tree, at fortran/trans-const.c:370)

2019-09-04  Steven G. Kargl  <kargl@gcvc.gnu.org>

PR fortran/91650
* io.c (match_io_element):  An output IO list item cannot be a BOZ.

2019-09-04  Steven G. Kargl  <kargl@gcvc.gnu.org>

PR fortran/91650
* gfortran.dg/pr91650_1.f90: New test.
* gfortran.dg/pr91650_2.f90: Ditto.

From-SVN: r275391

5 years agoPR libstdc++/41861 Add full steady_clock support to condition_variable
Mike Crowe [Wed, 4 Sep 2019 22:43:29 +0000 (22:43 +0000)]
PR libstdc++/41861 Add full steady_clock support to condition_variable

The pthread_cond_clockwait function is available in glibc since the 2.30
release. If this function is available in the C library it can be used
to fix PR libstdc++/41861 by supporting std::chrono::steady_clock
properly with std::condition_variable.

This means that code using std::condition_variable::wait_for or
std::condition_variable::wait_until with std::chrono::steady_clock is no
longer subject to timing out early or potentially waiting for much
longer if the system clock is warped at an inopportune moment.

If pthread_cond_clockwait is available then std::chrono::steady_clock is
deemed to be the "best" clock available which means that it is used for
the relative wait_for calls and absolute wait_until calls using
user-defined clocks. Calls explicitly using std::chrono::system_clock
continue to use CLOCK_REALTIME via __gthread_cond_timedwait.

If pthread_cond_clockwait is not available then
std::chrono::system_clock is deemed to be the "best" clock available
which means that the previous suboptimal behaviour remains.

2019-09-04  Mike Crowe  <mac@mcrowe.com>

PR libstdc++/41861
* acinclude.m4 (GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT): Check for new
pthread_cond_clockwait function.
* configure.ac: Use GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT.
* configure: Regenerate.
* config.h.in: Regenerate.
* include/std/condition_variable: (condition_variable): Rename
__steady_clock_t typedef and add system_clock. Change __clock_t to be
a typedef for the preferred clock to convert arbitrary other clocks to.
[_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (wait_until): Add a steady_clock
overload.
(wait_until): Change __clock_t overload to use system_clock.
[_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (__wait_until_impl): Add
steady_clock overload that calls pthread_cond_clockwait.
(__wait_until_impl): Change __clock_t overload to use system_clock.
(condition_variable_any) [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT]: Use
steady_clock for __clock_t if pthread_cond_clockwait is available.

From-SVN: r275390

5 years agoAdd user-defined clock to libstdc++ condition_variable tests
Mike Crowe [Wed, 4 Sep 2019 22:43:20 +0000 (22:43 +0000)]
Add user-defined clock to libstdc++ condition_variable tests

2019-09-04  Mike Crowe  <mac@mcrowe.com>

* testsuite/30_threads/condition_variable/members/2.cc (test01):
Parameterise so that test can be run against an arbitrary clock.
(main): Test using std::chrono::steady_clock and a user-defined
clock in addition to the previous std::chrono::system_clock.
* testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.

From-SVN: r275389

5 years agoDisallow -fvtable-verify and -flto to be used together.
Caroline Tice [Wed, 4 Sep 2019 22:33:27 +0000 (15:33 -0700)]
Disallow -fvtable-verify and -flto to be used together.

Vtable verification currently does not work properly with
link time optimization.  Until this can be fixed users should
not be allowed to specify both options together.

2019-09-04  Caroline Tice  <cmtice@google.com>

        *  opts.c (finish_options):  Disallow -fvtable-verify and -flto to be
           specified together.

From-SVN: r275388

5 years agoRemove -fdeduce-init-list.
Marek Polacek [Wed, 4 Sep 2019 20:10:13 +0000 (20:10 +0000)]
Remove -fdeduce-init-list.

From-SVN: r275387

5 years agore PR target/32413 (internal compiler error: in reload_cse_simplify_operands, at...
Uros Bizjak [Wed, 4 Sep 2019 18:25:05 +0000 (20:25 +0200)]
re PR target/32413 (internal compiler error: in reload_cse_simplify_operands, at postreload.c:396)

PR target/32413
* config/i386/i386.c (inline_secondary_memory_needed): Return true
for QI and HImode moves between SSE and general registers.

From-SVN: r275377

5 years agoAdd warning Wenum-conversion for C and ObjC.
Prathamesh Kulkarni [Wed, 4 Sep 2019 16:25:21 +0000 (16:25 +0000)]
Add warning Wenum-conversion for C and ObjC.

The patch enables warning with Wextra due to PR91593 and warnings with
allmodconfig kernel build. Once these issues are resolved, we could
consider promoting it to Wall.

2019-09-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

PR c/78736
* doc/invoke.texi: Document -Wenum-conversion.

c-family
* c.opt (Wenum-conversion): New option.

c/
* c-typeck.c (convert_for_assignment): Handle Wenum-conversion.

testsuite/
* gcc.dg/Wenum-conversion.c: New test-case.

From-SVN: r275376

5 years agomklog: Do not print changed functions in testsuite
Martin Liska [Wed, 4 Sep 2019 08:08:20 +0000 (10:08 +0200)]
mklog: Do not print changed functions in testsuite

2019-09-04  Martin Liska  <mliska@suse.cz>

* mklog: Do not print changed functions for
testsuite files.

From-SVN: r275369

5 years agomklog: parse PR references from new test files
Martin Liska [Wed, 4 Sep 2019 08:08:06 +0000 (10:08 +0200)]
mklog: parse PR references from new test files

2019-09-04  Martin Liska  <mliska@suse.cz>

* mklog: Parse PR references from newly added
test files.

From-SVN: r275368

5 years agoUse argparse.ArgumentParser for mklog.
Martin Liska [Wed, 4 Sep 2019 08:07:37 +0000 (10:07 +0200)]
Use argparse.ArgumentParser for mklog.

2019-09-04  Martin Liska  <mliska@suse.cz>

* mklog: Use argparse instead of getopt.

From-SVN: r275367

5 years agore PR middle-end/36262 (Extreme memory usage of VRP compared to older versions)
Richard Biener [Wed, 4 Sep 2019 07:27:42 +0000 (07:27 +0000)]
re PR middle-end/36262 (Extreme memory usage of VRP compared to older versions)

2019-09-04  Richard Biener  <rguenther@suse.de>

PR rtl-optimization/36262
* postreload-gcse.c: Include intl.h and gcse.h.
(insert_expr_in_table): Insert at the head of cur_expr->avail_occr
to avoid linear list walk.
(record_last_mem_set_info): Gate off if not computing transparentness.
(get_bb_avail_insn): If transparentness isn't computed give up
early.
(gcse_after_reload_main): Skip compute_transp and extended PRE
if gcse_or_cprop_is_too_expensive says so.

From-SVN: r275365

5 years agogfortran.texi: Update documentation to catch up with BOZ changes.
Steven G. Kargl [Wed, 4 Sep 2019 03:43:40 +0000 (03:43 +0000)]
gfortran.texi: Update documentation to catch up with BOZ changes.

2019-09-03  Steven G. Kargl  <kargl@gcc.gnu.org>

* gfortran.texi: Update documentation to catch up with BOZ changes.
* invoke.texi: Fix English from previous BOZ changes commit.

From-SVN: r275364

5 years agoDaily bump.
GCC Administrator [Wed, 4 Sep 2019 00:16:33 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r275362

5 years agocompiler: only import variable into . if same package
Ian Lance Taylor [Tue, 3 Sep 2019 23:35:13 +0000 (23:35 +0000)]
compiler: only import variable into . if same package

    If we dot-import a package, we should only add an imported variable to
    the package bindings if the variable is in the package being imported.
    A test case for this is the 1.13 os package, in which ErrClosed and
    friends are defined both locally and in the imported internal/oserror package.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/192718

From-SVN: r275358

5 years agoMSP430: Use default_elf_select_section to determine sections for data
Jozef Lawrynowicz [Tue, 3 Sep 2019 20:57:02 +0000 (20:57 +0000)]
MSP430: Use default_elf_select_section to determine sections for data

2019-09-03  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

* config/msp430/msp430.c (msp430_init_sections): Remove handling of the
noinit section.
(msp430_select_section): Handle decls with the "noinit" attribute with
default_elf_select_section.
Handle SECCAT_RODATA_MERGE_* section types with
default_elf_select_section.
Add comments about handling of unsupported section types.
(msp430_section_type_flags): Remove handling of the noinit section.

From-SVN: r275357

5 years agoMSP430: Setup exclusion tables for function and data attributes
Jozef Lawrynowicz [Tue, 3 Sep 2019 20:48:55 +0000 (20:48 +0000)]
MSP430: Setup exclusion tables for function and data attributes

gcc/ChangeLog:

2019-09-03  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

* config/msp430/msp430.c (msp430_attr): Remove warnings about
conflicting msp430-specific attributes.
(msp430_section_attr): Likewise.
Add warnings about conflicts with generic "noinit" and "section"
attributes.
Fix grammar in -mlarge error message.
(msp430_data_attr): Rename to msp430_persist_attr.
Add warnings about conflicts with generic "noinit" and "section"
attributes.
Add warning for when variable is not initialized.
Chain conditionals which prevent the attribute being added.
(ATTR_EXCL): New helper.
(attr_reent_exclusions): New exclusion table.
(attr_naked_exclusions): Likewise.
(attr_crit_exclusions): Likewise.
(attr_lower_exclusions): Likewise.
(attr_upper_exclusions): Likewise.
(attr_either_exclusions): Likewise.
(attr_persist_exclusions): Likewise.
(msp430_attribute_table): Update with exclusion rules.
(msp430_output_aligned_decl_common): Don't output common symbol if decl
has a section.

gcc/testsuite/ChangeLog:

2019-09-03  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

* gcc.target/msp430/data-attributes-2.c: New test.
* gcc.target/msp430/function-attributes-4.c: Update dg-warning
strings.
* gcc.target/msp430/region-attribute-misuse.c: Likewise.

From-SVN: r275356

5 years agoImplement TARGET_HANDLE_GENERIC_ATTRIBUTE
Jozef Lawrynowicz [Tue, 3 Sep 2019 20:36:49 +0000 (20:36 +0000)]
Implement TARGET_HANDLE_GENERIC_ATTRIBUTE

gcc/ChangeLog:

2019-09-03  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

* config/msp430/msp430.c (TARGET_HANDLE_GENERIC_ATTRIBUTE): Define.
(msp430_handle_generic_attribute): New function.
* doc/tm.texi: Regenerate.
* doc/tm.texi.in: Add TARGET_HANDLE_GENERIC_ATTRIBUTE.
* hooks.c (hook_tree_treeptr_tree_tree_int_boolptr_null): New.
* hooks.h (hook_tree_treeptr_tree_tree_int_boolptr_null): New.
* target.def: Define new hook TARGET_HANDLE_GENERIC_ATTRIBUTE.

gcc/c-family/ChangeLog:

2019-09-03  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

* c-attribs.c (handle_section_attribute): Call the
handle_generic_attribute target hook after performing target
independent processing.
(handle_noinit_attribute): Likewise.

From-SVN: r275355

5 years agore PR tree-optimization/91504 (Inlining misses some logical operation folding)
Kamlesh Kumar [Tue, 3 Sep 2019 20:13:22 +0000 (20:13 +0000)]
re PR tree-optimization/91504 (Inlining misses some logical operation folding)

PR tree-optimization/91504
* match.pd: Add ((~a & b) ^a) --> (a | b).

        PR tree-optimization/91504
gcc.dg/tree-ssa/pr91504.c: New test.

From-SVN: r275354

5 years agorust-demangle.c (unescape): Remove.
Eduard-Mihai Burtescu [Tue, 3 Sep 2019 20:04:32 +0000 (22:04 +0200)]
rust-demangle.c (unescape): Remove.

* rust-demangle.c (unescape): Remove.
(parse_lower_hex_nibble): New function.
(parse_legacy_escape): New function.
(is_prefixed_hash): Use parse_lower_hex_nibble.
(looks_like_rust): Use parse_legacy_escape.
(rust_demangle_sym): Use parse_legacy_escape.
* testsuite/rust-demangle-expected: Add 'llv$u6d$' test.

From-SVN: r275353

5 years agoc-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand when using -fgo...
Ian Lance Taylor [Tue, 3 Sep 2019 19:42:38 +0000 (19:42 +0000)]
c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand when using -fgo-dump-spec.

* c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
when using -fgo-dump-spec.

From-SVN: r275352

5 years agore PR target/91604 (ICE in extract_insn at recog.c:2310 since r272323)
Jakub Jelinek [Tue, 3 Sep 2019 16:46:06 +0000 (18:46 +0200)]
re PR target/91604 (ICE in extract_insn at recog.c:2310 since r272323)

PR target/91604
* config/i386/i386-expand.c (split_double_mode): If there is more than
one MEM operand and they are rtx_equal_p, reuse lo_half/hi_half from
already split matching MEM operand instead of calling adjust_address
again.

* gcc.target/i386/pr91604.c: New test.

From-SVN: r275344

5 years agoRemove Cell Broadband Engine SPU targets
Ulrich Weigand [Tue, 3 Sep 2019 15:08:28 +0000 (15:08 +0000)]
Remove Cell Broadband Engine SPU targets

From-SVN: r275343

5 years agore PR middle-end/91603 (Unaligned access in expand_assignment)
Bernd Edlinger [Tue, 3 Sep 2019 14:37:41 +0000 (14:37 +0000)]
re PR middle-end/91603 (Unaligned access in expand_assignment)

2019-09-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR middle-end/91603
        PR middle-end/91612
        PR middle-end/91613
        * expr.c (expand_expr_real_1): Handle unaligned decl_rtl
        and SSA_NAME referring to CONSTANT_P correctly.

testsuite:
2019-09-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR middle-end/91603
        * testsuite/gcc.target/arm/pr91603.c: New test.

From-SVN: r275342

5 years agore PR other/79543 (Inappropriate "ld --version" checking)
Chung-Lin Tang [Tue, 3 Sep 2019 14:10:26 +0000 (14:10 +0000)]
re PR other/79543 (Inappropriate "ld --version" checking)

2019-09-03  Chung-Lin Tang <cltang@codesourcery.com>

libatomic/
PR other/79543
* acinclude.m4 (LIBAT_CHECK_LINKER_FEATURES): Fix GNU ld --version
scanning to conform to the GNU Coding Standards.
* configure: Regenerate.

libffi/
PR other/79543
* acinclude.m4 (LIBAT_CHECK_LINKER_FEATURES): Fix GNU ld --version
scanning to conform to the GNU Coding Standards.
* configure: Regenerate.

libgomp/
PR other/79543
* acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Fix GNU ld --version
scanning to conform to the GNU Coding Standards.
* configure: Regenerate.

libitm/
PR other/79543
* acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Fix GNU ld --version
scanning to conform to the GNU Coding Standards.
* configure: Regenerate.

libstdc++-v3/
PR other/79543
* acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version
scanning to conform to the GNU Coding Standards.
* configure: Regenerate.

From-SVN: r275341

5 years agotree-ssa-sccvn.h (vn_nary_op_lookup): Remove.
Richard Biener [Tue, 3 Sep 2019 11:24:18 +0000 (11:24 +0000)]
tree-ssa-sccvn.h (vn_nary_op_lookup): Remove.

2019-09-03  Richard Biener  <rguenther@suse.de>

* tree-ssa-sccvn.h (vn_nary_op_lookup): Remove.
(vn_nary_op_insert): Likewise.
* tree-ssa-sccvn.c (init_vn_nary_op_from_op): Remove.
(vn_nary_op_lookup): Likewise.
(vn_nary_op_insert): Likewise.

From-SVN: r275338

5 years agoS/390: Commit forgotten test for r275336
Ilya Leoshkevich [Tue, 3 Sep 2019 10:27:04 +0000 (10:27 +0000)]
S/390: Commit forgotten test for r275336

gcc/testsuite/ChangeLog:

2019-09-03  Ilya Leoshkevich  <iii@linux.ibm.com>

* gcc.target/s390/sigfpe-eh.c: Forgotten test.

From-SVN: r275337

5 years agoS/390: Fix failing RTL check in s390_canonicalize_comparison
Ilya Leoshkevich [Tue, 3 Sep 2019 09:29:02 +0000 (09:29 +0000)]
S/390: Fix failing RTL check in s390_canonicalize_comparison

The new sigfpe-eh.c fails with

    internal compiler error: RTL check: expected elt 0 type 'e' or 'u', have 'w' (rtx const_int)

This is most likely due to a typo: XEXP (*op1, 0) was used, when
XEXP (*op0, 1) was intended.  This did not cause any user-visible
problems, because reversed_comparison_code_parts ignores the
respective argument, and the release compiler is built without RTL
checks.

gcc/ChangeLog:

2019-09-03  Ilya Leoshkevich  <iii@linux.ibm.com>

* config/s390/s390.c (s390_canonicalize_comparison): Use XEXP
(*op0, 1) instead of XEXP (*op1, 0).

gcc/testsuite/ChangeLog:

2019-09-03  Ilya Leoshkevich  <iii@linux.ibm.com>

* gcc.target/s390/sigfpe-eh.c: New test.

From-SVN: r275336

5 years ago[AArch64] Add support for __jcvt intrinsic
Kyrylo Tkachov [Tue, 3 Sep 2019 08:40:30 +0000 (08:40 +0000)]
[AArch64] Add support for __jcvt intrinsic

This patch implements the __jcvt ACLE intrinsic [1] that maps down to the FJCVTZS [2] instruction from Armv8.3-a.
No fancy mode iterators or nothing. Just a single builtin, UNSPEC and define_insn and the associate plumbing.
This patch also defines __ARM_FEATURE_JCVT to indicate when the intrinsic is available.

[1] https://developer.arm.com/docs/101028/latest/data-processing-intrinsics
[2] https://developer.arm.com/docs/ddi0596/latest/simd-and-floating-point-instructions-alphabetic-order/fjcvtzs-floating-point-javascript-convert-to-signed-fixed-point-rounding-toward-zero

* config/aarch64/aarch64.md (UNSPEC_FJCVTZS): Define.
(aarch64_fjcvtzs): New define_insn.
* config/aarch64/aarch64.h (TARGET_JSCVT): Define.
* config/aarch64/aarch64-builtins.c (aarch64_builtins):
Add AARCH64_JSCVT.
(aarch64_init_builtins): Initialize __builtin_aarch64_jcvtzs.
(aarch64_expand_builtin): Handle AARCH64_JSCVT.
* config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Define
__ARM_FEATURE_JCVT where appropriate.
* config/aarch64/arm_acle.h (__jcvt): Define.

* gcc.target/aarch64/acle/jcvt_1.c: New test.

From-SVN: r275335

5 years ago[AArch64] Implement ACLE intrinsics for FRINT[32,64][Z,X]
Kyrylo Tkachov [Tue, 3 Sep 2019 08:38:08 +0000 (08:38 +0000)]
[AArch64] Implement ACLE intrinsics for FRINT[32,64][Z,X]

This patch implements the ACLE intrinsics to access the FRINT[32,64][Z,X] scalar[1] and vector[2][3] instructions
from Armv8.5-a. These are enabled when the __ARM_FEATURE_FRINT macro is defined.

They're added in a fairly standard way through builtins and unspecs at the RTL level.

* config/aarch64/aarch64.md ("unspec"): Add UNSPEC_FRINT32Z,
UNSPEC_FRINT32X, UNSPEC_FRINT64Z, UNSPEC_FRINT64X.
(aarch64_<frintnzs_op><mode>): New define_insn.
* config/aarch64/aarch64.h (TARGET_FRINT): Define.
* config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Define
__ARM_FEATURE_FRINT when appropriate.
* config/aarch64/aarch64-simd-builtins.def: Add builtins for frint32z,
frint32x, frint64z, frint64x.
* config/aarch64/arm_acle.h (__rint32zf, __rint32z, __rint64zf,
__rint64z, __rint32xf, __rint32x, __rint64xf, __rint64x): Define.
* config/aarch64/arm_neon.h (vrnd32z_f32, vrnd32zq_f32, vrnd32z_f64,
vrnd32zq_f64, vrnd32x_f32, vrnd32xq_f32, vrnd32x_f64, vrnd32xq_f64,
vrnd64z_f32, vrnd64zq_f32, vrnd64z_f64, vrnd64zq_f64, vrnd64x_f32,
vrnd64xq_f32, vrnd64x_f64, vrnd64xq_f64): Define.
* config/aarch64/iterators.md (VSFDF): Define.
(FRINTNZX): Likewise.
(frintnzs_op): Likewise.

* gcc.target/aarch64/acle/rintnzx_1.c: New test.
* gcc.target/aarch64/simd/vrndnzx_1.c: Likewise.

From-SVN: r275334

5 years ago[AArch64] Add support for missing CPUs
Dennis Zhang [Tue, 3 Sep 2019 08:27:58 +0000 (08:27 +0000)]
[AArch64] Add support for missing CPUs

This patch adds '-mcpu' options for following CPUs:
Cortex-A77, Cortex-A76AE, Cortex-A65, Cortex-A65AE, and Cortex-A34.

Related specifications are as following:
https://developer.arm.com/ip-products/processors/cortex-a

Bootstraped/regtested for aarch64-none-linux-gnu.

2019-09-03  Dennis Zhang  <dennis.zhang@arm.com>

* config/aarch64/aarch64-cores.def (AARCH64_CORE): New entries
for Cortex-A77, Cortex-A76AE, Cortex-A65, Cortex-A65AE, and
Cortex-A34.
* config/aarch64/aarch64-tune.md: Regenerated.
* doc/invoke.texi: Document the new processors.

From-SVN: r275333

5 years agolibphobos.exp (libphobos_init): Add multi-lib libgcc dirs to the ld_library_path...
Bernd Edlinger [Tue, 3 Sep 2019 08:24:03 +0000 (08:24 +0000)]
libphobos.exp (libphobos_init): Add multi-lib libgcc dirs to the ld_library_path var.

2019-09-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * testsuite/lib/libphobos.exp (libphobos_init): Add multi-lib libgcc
        dirs to the ld_library_path var.

From-SVN: r275332

5 years ago[AArch64] Add Linux hwcap strings for some extensions
Kyrylo Tkachov [Tue, 3 Sep 2019 08:06:43 +0000 (08:06 +0000)]
[AArch64] Add Linux hwcap strings for some extensions

This patch adds feature strings for some of the extensions. This string is what is read from /proc/cpuinfo on Linux systems
and used during -march=native detection.

The strings are taken from the kernel source tree at:
https://github.com/torvalds/linux/blob/master/arch/arm64/kernel/cpuinfo.c#L45

* config/aarch64/aarch64-option-extensions.def (sb): Add feature
string.
(ssbs): Likewise.
(sve2): Likewise.
(sve2-sm4): Likewise.
(sveaes): Likewise.
(svesha3): Likewise.
(svebitperm): Likewise.

From-SVN: r275331

5 years agore PR tree-optimization/91597 (GCC miscompiles a branch depending on a pointer tag)
Jakub Jelinek [Tue, 3 Sep 2019 07:50:46 +0000 (09:50 +0200)]
re PR tree-optimization/91597 (GCC miscompiles a branch depending on a pointer tag)

PR tree-optimization/91597
* tree-vrp.c (extract_range_from_binary_expr): Remove unsafe
BIT_AND_EXPR optimization for pointers, even if both operand
ranges don't include NULL, the result can be NULL.

* gcc.c-torture/execute/pr91597.c: New test.

Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r275330

5 years ago[x86 testsuite] preserve full register across main
Alexandre Oliva [Tue, 3 Sep 2019 06:06:02 +0000 (06:06 +0000)]
[x86 testsuite] preserve full register across main

This test uses a call-saved register as a global variable.  It
attempts to preserve its value across main, but only the lower int
part is preserved, which is not good enough for x86_64, when the
runtime that calls main() happens to hold something in the chosen
register that is not a zero-extension from the 32-bit value, and
rightfully expects the full register to remain unchanged when main()
returns.

for  gcc/testsuite/ChangeLog

* gcc.target/i386/20020616-1.c: Preserve full register across
main.

From-SVN: r275329

5 years agoDaily bump.
GCC Administrator [Tue, 3 Sep 2019 00:16:40 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r275328

5 years agore PR fortran/91589 (ICE in gfc_conv_component_ref, at fortran/trans-expr.c:2447)
Paul Thomas [Mon, 2 Sep 2019 19:54:02 +0000 (19:54 +0000)]
re PR fortran/91589 (ICE in gfc_conv_component_ref, at fortran/trans-expr.c:2447)

2019-09-02  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/91589
* primary.c (gfc_match_varspec): Return MATCH_NO on an apparent
component ref, when the primary type is intrinsic.

2019-09-02  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/91589
* gfortran.dg/pr91589.f90 : New test.

From-SVN: r275324

5 years agore PR fortran/91552 (ICE with valid array constructor)
Steven G. Kargl [Mon, 2 Sep 2019 16:46:54 +0000 (16:46 +0000)]
re PR fortran/91552 (ICE with valid array constructor)

2019-09-02  Steven G. Kargl  <kargl@gc.gnu.org>

PR fortran/91552
* array.c (walk_array_constructor): New function.
(gfc_match_array_constructor): Use it.

2019-09-02  Steven G. Kargl  <kargl@gc.gnu.org>

PR fortran/91552
* gfortran.dg/pr91552.f90: New test.

From-SVN: r275322

5 years agore PR middle-end/91605 (ICE in ix86_avx256_split_vector_move_misalign, at config...
Bernd Edlinger [Mon, 2 Sep 2019 14:26:26 +0000 (14:26 +0000)]
re PR middle-end/91605 (ICE in ix86_avx256_split_vector_move_misalign, at config/i386/i386-expand.c:489 since r274986)

2019-09-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR middle-end/91605
        * expr.c (addr_expr_of_non_mem_decl_p_1): Refactor into...
        (non_mem_decl_p): ...this.
        (mem_ref_refers_to_non_mem_p): Handle DECL_P as well ase MEM_REF.
        (expand_assignment): Call mem_ref_referes_to_non_mem_p
        unconditionally as before.

testsuite:
2019-09-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR middle-end/91605
        * g++.target/i386/pr91605.C: New test.

From-SVN: r275320

5 years agore PR tree-optimization/91632 (Probably wrong code since r275026)
Jakub Jelinek [Mon, 2 Sep 2019 13:35:54 +0000 (15:35 +0200)]
re PR tree-optimization/91632 (Probably wrong code since r275026)

PR tree-optimization/91632
* gcc.c-torture/execute/pr91632.c: New test.

From-SVN: r275318

5 years agocontrib/vimrc: override formatting options for more files
Alexander Monakov [Mon, 2 Sep 2019 12:30:02 +0000 (15:30 +0300)]
contrib/vimrc: override formatting options for more files

* vim-gcc-dev/syntax/gcc-match.vim: Do not override 'tabstop' here.
* vimrc: Set preferred values for 'tabstop', 'softtabstop',
'shiftwidth', 'noexpandtab', 'textwidth', 'formatoptions' for all
files, not just C-like files.

From-SVN: r275316

5 years agoUse __constinit keyword in libstdc++ sources
Jonathan Wakely [Mon, 2 Sep 2019 11:31:34 +0000 (12:31 +0100)]
Use __constinit keyword in libstdc++ sources

* src/c++17/memory_resource.cc: Use __constinit keyword.

From-SVN: r275315

5 years agoUpdate libstdc++ docs for library version bumps
Jonathan Wakely [Mon, 2 Sep 2019 11:31:30 +0000 (12:31 +0100)]
Update libstdc++ docs for library version bumps

* doc/xml/manual/abi.xml: Document 9.x library versions.
* doc/html/*: Regenerate.

From-SVN: r275314

5 years agoMinor simplifications for std::to_chars implementation
Jonathan Wakely [Mon, 2 Sep 2019 11:31:25 +0000 (12:31 +0100)]
Minor simplifications for std::to_chars implementation

* include/std/charconv (__detail::__to_chars_2_len): Use std::log2p1.
(__detail::__to_chars_8_len): Remove.
(__detail::__to_chars_8): Inline length calculation here.
(__detail::__from_chars_binary): Use numeric_limits instead of
CHAR_BIT.

From-SVN: r275313

5 years agore PR target/91323 (LTGT rtx produces UCOMISS instead of COMISS)
Eric Botcazou [Mon, 2 Sep 2019 10:10:23 +0000 (10:10 +0000)]
re PR target/91323 (LTGT rtx produces UCOMISS instead of COMISS)

PR target/91323
* doc/generic.texi (LTGT_EXPR): Merge with other comparison operators.
* rtl.def (LTGT): Likewise.  Add note about floating-point exceptions.
* tree.def (LTGT_EXPR): Likewise.
* config/sparc/sparc.c (select_cc_mode): Return CCFPEmode for LTGT.

From-SVN: r275303

5 years agore PR go/91617 (Many go test case failures after r275026)
Jakub Jelinek [Mon, 2 Sep 2019 08:38:13 +0000 (10:38 +0200)]
re PR go/91617 (Many go test case failures after r275026)

PR go/91617
* fold-const.c (range_check_type): For enumeral and boolean
type, pass 1 to type_for_size langhook instead of
TYPE_UNSIGNED (etype).  Return unsigned_type_for result whenever
etype isn't TYPE_UNSIGNED INTEGER_TYPE.
(build_range_check): Don't call unsigned_type_for for pointer types.
* match.pd (X / C1 op C2): Don't call unsigned_type_for on
range_check_type result.

From-SVN: r275299

5 years agoUpdate Solaris baselines for GCC 10.0
Rainer Orth [Mon, 2 Sep 2019 08:31:07 +0000 (08:31 +0000)]
Update Solaris baselines for GCC 10.0

* config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
* config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise.
* config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
* config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
Likewise.

From-SVN: r275298

5 years agogimple-ssa-strength-reduction.c (valid_mem_ref_cand_p): New function.
Eric Botcazou [Mon, 2 Sep 2019 08:14:47 +0000 (08:14 +0000)]
gimple-ssa-strength-reduction.c (valid_mem_ref_cand_p): New function.

* gimple-ssa-strength-reduction.c (valid_mem_ref_cand_p): New function.
(replace_ref): Do not replace a chain of only two candidates which are
valid memory references.

From-SVN: r275297

5 years agoSet tabstop=8 for gcc-match file types.
Martin Liska [Mon, 2 Sep 2019 07:46:18 +0000 (09:46 +0200)]
Set tabstop=8 for gcc-match file types.

2019-09-02  Martin Liska  <mliska@suse.cz>

* vim-gcc-dev/syntax/gcc-match.vim: Set tabstop=8.

From-SVN: r275295

5 years agoFix thinko in early bail out in tree-switch-conversion.
Martin Liska [Mon, 2 Sep 2019 07:09:39 +0000 (09:09 +0200)]
Fix thinko in early bail out in tree-switch-conversion.

2019-09-02  Martin Liska  <mliska@suse.cz>

* tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
Bail out when we'll end up with the same number of clusters as
at the beginning.
(bit_test_cluster::find_bit_tests): Likewise for bit tests.
(jump_table_cluster::can_be_handled): Remove the guard
as it's already handled in ::is_enabled.  Allocate output
after early bail out.

From-SVN: r275293

5 years agoUse cxx_printable_name for __PRETTY_FUNCTION__ in cp_fname_init.
Martin Liska [Mon, 2 Sep 2019 07:07:11 +0000 (09:07 +0200)]
Use cxx_printable_name for __PRETTY_FUNCTION__ in cp_fname_init.

2019-09-02  Martin Liska  <mliska@suse.cz>

PR c++/91155
* c-common.c (fname_as_string): Use cxx_printable_name for
__PRETTY_FUNCTION__ same as was used before r265711.
2019-09-02  Martin Liska  <mliska@suse.cz>

PR c++/91155
* g++.dg/torture/pr91155.C: New test.

From-SVN: r275292

5 years agoConsider also negative edges in cycle detection.
Martin Liska [Mon, 2 Sep 2019 07:06:54 +0000 (09:06 +0200)]
Consider also negative edges in cycle detection.

2019-09-02  Martin Liska  <mliska@suse.cz>

PR gcov-profile/91601
* gcov.c (path_contains_zero_cycle_arc): Rename to ...
(path_contains_zero_or_negative_cycle_arc): ... this and handle
also negative edges.
(circuit): Handle also negative edges as they can happen
in some situations.

From-SVN: r275291

5 years agoDaily bump.
GCC Administrator [Mon, 2 Sep 2019 00:16:37 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r275290

5 years agoPR c++/91129 - wrong error with binary op in template argument.
Marek Polacek [Sun, 1 Sep 2019 22:54:15 +0000 (22:54 +0000)]
PR c++/91129 - wrong error with binary op in template argument.

* typeck.c (warn_for_null_address): Use fold_for_warn instead of
fold_non_dependent_expr.
(cp_build_binary_op): Likewise.

* g++.dg/cpp1y/nontype1.C: New test.

From-SVN: r275285

5 years ago2019-09-01 François Dumont <fdumont@gcc.gnu.org>
François Dumont [Sun, 1 Sep 2019 20:11:42 +0000 (20:11 +0000)]
2019-09-01  François Dumont  <fdumont@gcc.gnu.org>

* testsuite_files/util/testsuite_performance.h
(resource_counter::start): Ignore unused malloc(0) result.

From-SVN: r275284

5 years ago[testsuite] Unsupport 20190827-1.c for targets without alias support.
Iain Sandoe [Sun, 1 Sep 2019 18:38:59 +0000 (18:38 +0000)]
[testsuite] Unsupport 20190827-1.c for targets without alias support.

gcc/testsuite/

2019-09-01  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.c-torture/compile/20190827-1.c: Add dg-requires-alias.

From-SVN: r275274

5 years agotarget-supports.exp (check_effective_target_pthread): Add #include <pthread.h> direct...
Eric Botcazou [Sun, 1 Sep 2019 12:55:58 +0000 (12:55 +0000)]
target-supports.exp (check_effective_target_pthread): Add #include <pthread.h> directive to the test.

* lib/target-supports.exp (check_effective_target_pthread): Add
#include <pthread.h> directive to the test.

From-SVN: r275271

5 years agore PR target/91472 (gmp testsuite segfaults with gcc-8 and gcc-9, works fine with...
Eric Botcazou [Sun, 1 Sep 2019 12:55:22 +0000 (12:55 +0000)]
re PR target/91472 (gmp testsuite segfaults with gcc-8 and gcc-9, works fine with gcc-7)

PR target/91472
* config/sparc/sparc.c (sparc_cannot_force_const_mem): Return true
during LRA/reload in PIC mode if the PIC register hasn't been used yet.
(sparc_pic_register_p): Test reload_in_progress for consistency's sake.

From-SVN: r275270