]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
6 years agoFix ConstexprIterator requirements tests - No constexpr algorithms!
Edward Smith-Rowland [Tue, 11 Jun 2019 16:36:21 +0000 (16:36 +0000)] 
Fix ConstexprIterator requirements tests - No constexpr algorithms!

2019-06-11  Edward Smith-Rowland  <3dw4rd@verizon.net>

Fix ConstexprIterator requirements tests - No constexpr algorithms!
* testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
Replace copy with hand-rolled loop.
* testsuite/23_containers/array/requirements/constexpr_iter.cc:
Ditto.

From-SVN: r272160

6 years agore PR c++/90810 (Different intrinsics behavior on G++ 7.4 and G++ 8.3)
Jakub Jelinek [Tue, 11 Jun 2019 13:08:47 +0000 (15:08 +0200)] 
re PR c++/90810 (Different intrinsics behavior on G++ 7.4 and G++ 8.3)

PR c++/90810
* init.c (constant_value_1): Handle VECTOR_CST DECL_INITIAL for
!DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P decls like CONSTRUCTOR.

* g++.dg/ext/vector37.C: New test.

From-SVN: r272154

6 years agotoir.cc (pop_label): Only queue labels in a vector.
Richard Biener [Tue, 11 Jun 2019 08:31:09 +0000 (08:31 +0000)] 
toir.cc (pop_label): Only queue labels in a vector.

2019-06-11  Richard Biener  <rguenthe@suse.de>

d/90778
* toir.cc (pop_label): Only queue labels in a vector.
(cmp_labels): Label decl comparator.
(pop_binding_level): Pop labels in DECL_UID order to avoid
debug info differences.

From-SVN: r272147

6 years agoDaily bump.
GCC Administrator [Tue, 11 Jun 2019 00:16:13 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r272140

6 years agoDaily bump.
GCC Administrator [Mon, 10 Jun 2019 00:16:18 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r272101

6 years agoTest for C++20 p0858 - ConstexprIterator requirements.
Edward Smith-Rowland [Sun, 9 Jun 2019 21:43:55 +0000 (21:43 +0000)] 
Test for C++20 p0858 - ConstexprIterator requirements.

2019-06-09  Edward Smith-Rowland  <3dw4rd@verizon.net>

Test for C++20 p0858 - ConstexprIterator requirements.
* testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
New test.
* testsuite/23_containers/array/requirements/constexpr_iter.cc:
New test.

From-SVN: r272097

6 years agoDaily bump.
GCC Administrator [Sun, 9 Jun 2019 00:16:15 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r272088

6 years agoDaily bump.
GCC Administrator [Sat, 8 Jun 2019 00:16:15 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r272066

6 years agoscanasm.exp (dg-function-on-line): Add pattern for hppa*-*-linux*.
John David Anglin [Fri, 7 Jun 2019 23:22:15 +0000 (23:22 +0000)] 
scanasm.exp (dg-function-on-line): Add pattern for hppa*-*-linux*.

* lib/scanasm.exp (dg-function-on-line): Add pattern for hppa*-*-linux*.

From-SVN: r272062

6 years agore PR target/90751 (-fpatchtable-function-entry broken on hppa-linux-gnu-gcc/hppa64...
John David Anglin [Fri, 7 Jun 2019 23:20:44 +0000 (23:20 +0000)] 
re PR target/90751 (-fpatchtable-function-entry  broken on hppa-linux-gnu-gcc/hppa64-linux-gnu-gcc)

PR target/90751
* config/pa/pa-linux.h (ASM_DECLARE_FUNCTION_NAME): Update comment.
Call pa_output_function_label.
(TARGET_ASM_FUNCTION_PROLOGUE): define.
* config/pa/pa-protos.h (pa_output_function_label): Declare.
* config/pa/pa.c (pa_output_function_prologue): Add ATTRIBUTE_UNUSED
to declaration.
(pa_linux_output_function_prologue): Declare.
(TARGET_ASM_FUNCTION_PROLOGUE): Delete define.
(pa_output_function_label): New.
(pa_output_function_prologue): Revise to use pa_output_function_label.
(pa_linux_output_function_prologue): New.
* config/pa/pa.h (TARGET_ASM_FUNCTION_PROLOGUE): Define.

From-SVN: r272061

6 years agoDaily bump.
GCC Administrator [Fri, 7 Jun 2019 00:16:15 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r272026

6 years ago* sv.po: Update.
Joseph Myers [Thu, 6 Jun 2019 23:15:26 +0000 (00:15 +0100)] 
* sv.po: Update.

From-SVN: r272020

6 years agoBackport PRs 90328, 90402, 90450, 90474
Richard Biener [Thu, 6 Jun 2019 11:06:45 +0000 (11:06 +0000)] 
Backport PRs 90328, 90402, 90450, 90474

2019-06-06  Richard Biener  <rguenther@suse.de>

Backport from mainline
2019-05-22  Richard Biener  <rguenther@suse.de>

PR tree-optimization/90450
* tree-ssa-loop-im.c (struct im_mem_ref): Add ref_decomposed.
(mem_ref_hasher::equal): Check it.
(mem_ref_alloc): Initialize it.
(gather_mem_refs_stmt): Set it.

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

PR c/90474
* c-common.c (c_common_mark_addressable_vec): Also mark
a COMPOUND_LITERAL_EXPR_DECL addressable similar to
c_mark_addressable.

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

PR tree-optimization/90402
* tree-if-conv.c (tree_if_conversion): Value number only
the loop body by making the latch an exit of the region
as well.
* tree-ssa-sccvn.c (process_bb): Add flag whether to skip
processing PHIs.
(do_rpo_vn): Deal with multiple edges into the entry block
that are not backedges inside the region by skipping PHIs
of the entry block.

* gcc.dg/torture/pr90402-1.c: New testcase.

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

PR tree-optimization/90328
* tree-data-ref.h (dr_may_alias_p): Pass in the actual loop nest.
* tree-data-ref.c (dr_may_alias_p): Check whether the clique
is valid in the loop nest before using it.
(initialize_data_dependence_relation): Adjust.
* graphite-scop-detection.c (build_alias_set): Pass the SCOP enclosing
loop as loop-nest to dr_may_alias_p.

* gcc.dg/torture/pr90328.c: New testcase.

From-SVN: r271995

6 years agoDaily bump.
GCC Administrator [Thu, 6 Jun 2019 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271981

6 years agofold-const.c (extract_muldiv_1): Do not distribute a multiplication by a power-of...
Eric Botcazou [Wed, 5 Jun 2019 14:21:37 +0000 (14:21 +0000)] 
fold-const.c (extract_muldiv_1): Do not distribute a multiplication by a power-of-two value.

* fold-const.c (extract_muldiv_1) <PLUS_EXPR>: Do not distribute a
multiplication by a power-of-two value.
(fold_plusminus_mult_expr): Use pow2p_hwi to spot a power-of-two value
and turn the modulo operation into a masking operation.

From-SVN: r271964

6 years agore PR debug/90733 (ICE in simplify_subreg, at simplify-rtx.c:6440)
Jakub Jelinek [Wed, 5 Jun 2019 12:22:22 +0000 (14:22 +0200)] 
re PR debug/90733 (ICE in simplify_subreg, at simplify-rtx.c:6440)

PR debug/90733
* var-tracking.c (vt_expand_loc_callback): Don't create raw subregs
with VOIDmode inner operands.

* gcc.dg/pr90733.c: New test.

From-SVN: r271960

6 years agobackport: re PR c++/90598 (Return type of explicit destructor call wrong)
Jakub Jelinek [Wed, 5 Jun 2019 12:21:27 +0000 (14:21 +0200)] 
backport: re PR c++/90598 (Return type of explicit destructor call wrong)

Backported from mainline
2019-05-29  Jakub Jelinek  <jakub@redhat.com>

PR c++/90598
* tree.c (lvalue_kind): Return clk_none for expressions with
with VOID_TYPE_P.

* g++.dg/cpp0x/pr90598.C: New test.

2019-05-02  Jonathan Wakely  <jwakely@redhat.com>

* testsuite/experimental/propagate_const/requirements2.cc: Adjust
dg-error.

From-SVN: r271959

6 years agobackport: re PR libgomp/90641 (libgomp.c-c++-common/lastprivate-conditional-1.c etc...
Jakub Jelinek [Wed, 5 Jun 2019 12:19:00 +0000 (14:19 +0200)] 
backport: re PR libgomp/90641 (libgomp.c-c++-common/lastprivate-conditional-1.c etc FAIL)

Backported from mainline
2019-05-27  Jakub Jelinek  <jakub@redhat.com>

PR libgomp/90641
* work.c (gomp_init_work_share): Instead of aligning final ordered
value to multiples of long long alignment, align to that the
first part (ordered team ids) and if inline_ordered_team_ids
is not on a long long alignment boundary within the structure,
use __alignof__ (long long) - 1 pad size always.
* loop.c (GOMP_loop_start): Fix *mem computation if
inline_ordered_team_ids is not aligned on long long alignment boundary
within the structure.
* loop-ull.c (GOMP_loop_ull_start): Likewise.
* sections.c (GOMP_sections2_start): Likewise.

From-SVN: r271958

6 years agobackport: re PR libgomp/90585 (libgomp hsa plugin ftbfs in the x32 multilib variant)
Jakub Jelinek [Wed, 5 Jun 2019 12:18:23 +0000 (14:18 +0200)] 
backport: re PR libgomp/90585 (libgomp hsa plugin ftbfs in the x32 multilib variant)

Backported from mainline
2019-05-24  Jakub Jelinek  <jakub@redhat.com>

PR libgomp/90585
* plugin/plugin-hsa.c (print_kernel_dispatch, run_kernel): Use PRIu64
macro instead of "lu".
(release_kernel_dispatch): Likewise.  Cast shadow->debug to uintptr_t
before casting to void *.

From-SVN: r271957

6 years agobackport documentation for target supports (mfentry availability).
Iain Sandoe [Wed, 5 Jun 2019 08:27:37 +0000 (08:27 +0000)] 
backport documentation for target supports (mfentry availability).

This was missed with the backport of the mfentry changes for
Darwin, and documents the target-supports addition only. (NFC).

Corrected ChangeLog

gcc/

2019-06-05  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-23  Iain Sandoe  <iain@sandoe.co.uk>
* doc/sourcebuild.texi: Document mfentry target support.

From-SVN: r271951

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

From-SVN: r271943

6 years agoDaily bump.
GCC Administrator [Tue, 4 Jun 2019 00:16:13 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271898

6 years agoPR libstdc++/90700 Fix constructor constraint for std::tuple
Jonathan Wakely [Mon, 3 Jun 2019 22:31:45 +0000 (23:31 +0100)] 
PR libstdc++/90700 Fix constructor constraint for std::tuple

* include/std/tuple
(tuple(allocator_arg_t, const A&, const tuple<UTypes...>&)): Fix
value category of template argument to _TC::_NonNestedTuple.
* testsuite/20_util/tuple/cons/90700.cc: New test.

From-SVN: r271887

6 years ago* sv.po: Update.
Joseph Myers [Mon, 3 Jun 2019 22:22:06 +0000 (23:22 +0100)] 
* sv.po: Update.

From-SVN: r271886

6 years agoPR libstdc++/90686 update C++2a library status docs
Jonathan Wakely [Mon, 3 Jun 2019 14:05:50 +0000 (15:05 +0100)] 
PR libstdc++/90686 update C++2a library status docs

PR libstdc++/90686
* doc/xml/manual/status_cxx2014.xml: Document what's missing from
<experimental/memory_resource>.
* doc/xml/manual/status_cxx2020.xml: Document status of P0777R1,
P0339R6, P0340R3, P1164R1 and P1357R1.
* doc/html/*: Regenerate.

From-SVN: r271872

6 years agoImplement missing piece of P0777R1 for std::make_from_tuple
Jonathan Wakely [Mon, 3 Jun 2019 14:05:46 +0000 (15:05 +0100)] 
Implement missing piece of P0777R1 for std::make_from_tuple

* include/std/tuple (make_from_tuple): Use remove_reference_t instead
of decay_t (P0777R1).

From-SVN: r271871

6 years agoDaily bump.
GCC Administrator [Mon, 3 Jun 2019 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271851

6 years agoDaily bump.
GCC Administrator [Sun, 2 Jun 2019 00:16:18 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271842

6 years agoDaily bump.
GCC Administrator [Sat, 1 Jun 2019 00:16:13 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271831

6 years ago* fi.po, sv.po: Update.
Joseph Myers [Fri, 31 May 2019 00:32:01 +0000 (01:32 +0100)] 
* fi.po, sv.po: Update.

From-SVN: r271797

6 years agoDaily bump.
GCC Administrator [Fri, 31 May 2019 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271794

6 years ago* lang.opt (ftail-call-workaround): Fix a typo.
Marek Polacek [Thu, 30 May 2019 12:19:40 +0000 (12:19 +0000)] 
* lang.opt (ftail-call-workaround): Fix a typo.

From-SVN: r271778

6 years agoBackport libstdc++ documentation updates from mainline
Jonathan Wakely [Thu, 30 May 2019 10:34:44 +0000 (11:34 +0100)] 
Backport libstdc++ documentation updates from mainline

* doc/xml/manual/status_cxx2017.xml: Fix typo in documentation of
implementation-defined support for [fs.conform.9945].
* doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
P0811R3. Change status of P1353R0.
* doc/html/*: Regenerate.

From-SVN: r271775

6 years agotree-predcom.c (is_inv_store_elimination_chain): Fix a typo - lenght to length.
Jakub Jelinek [Thu, 30 May 2019 09:34:26 +0000 (11:34 +0200)] 
tree-predcom.c (is_inv_store_elimination_chain): Fix a typo - lenght to length.

* tree-predcom.c (is_inv_store_elimination_chain): Fix a typo - lenght
to length.

* lang.opt (ftail-call-workaround=): Fix a typo - lenghts to lengths.

From-SVN: r271771

6 years agoDarwin, x86 - backport fix for mfentry test fails.
Iain Sandoe [Thu, 30 May 2019 08:06:38 +0000 (08:06 +0000)] 
Darwin, x86 - backport fix for mfentry test fails.

This will fix the cases by UNSUPPORTING for any target that cannot
support mfentry (including Linux -fpic -m32).

gcc/

2019-05-30  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-23  Iain Sandoe  <iain@sandoe.co.uk>

* config/i386/darwin.h: Reject -mfentry*.
* doc/sourcebuild.texi: Document mfentry target support.

gcc/testsuite/

2019-05-30  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-23  Iain Sandoe  <iain@sandoe.co.uk>

       * lib/target-supports.exp (check_effective_target_mfentry): New.
       * gcc.target/i386/fentry-override.c: Require effective target mfentry.
       * gcc.target/i386/fentry.c: Likewise
       * gcc.target/i386/fentryname1.c: Likewise
       * gcc.target/i386/fentryname2.c: Likewise
       * gcc.target/i386/fentryname3.c: Likewise
       * gcc.target/i386/nop-mcount.c: Likewise
       * gcc.target/i386/pr82699-2.c: Likewise
       * gcc.target/i386/pr82699-4.c: Likewise
       * gcc.target/i386/pr82699-5.c: Likewise
       * gcc.target/i386/pr82699-6.c: Likewise
       * gcc.target/i386/returninst1.c: Likewise
       * gcc.target/i386/returninst2.c: Likewise
       * gcc.target/i386/returninst3.c : Likewise

From-SVN: r271767

6 years agoDarwin, backport fix for PR82920 part3 (other CET test fixes).
Iain Sandoe [Thu, 30 May 2019 08:00:45 +0000 (08:00 +0000)] 
Darwin, backport fix for PR82920 part3 (other CET test fixes).

gcc/testsuite/

2019-05-30  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-15  Iain Sandoe  <iain@sandoe.co.uk>

PR target/82920
* g++.dg/cet-notrack-1.C: Adjust scan assembler for Darwin.
* gcc.target/i386/cet-notrack-5a.c: Likewise.
* gcc.target/i386/cet-notrack-5b.c: Likewise.
* gcc.target/i386/cet-notrack-6b.c: Likewise.
* gcc.target/i386/cet-notrack-icf-1.c: Likewise.
* gcc.target/i386/cet-notrack-icf-2.c: Likewise.
* gcc.target/i386/cet-notrack-icf-3.c: Likewise.
* gcc.target/i386/cet-notrack-icf-4.c: Likewise.
* gcc.target/i386/cet-sjlj-3.c: Likewise.
* gcc.target/i386/cet-sjlj-5.c: Likewise.

From-SVN: r271766

6 years agoDarwin, backport fix for PR82920 part2 (mx32 is not supported)
Iain Sandoe [Thu, 30 May 2019 07:56:10 +0000 (07:56 +0000)] 
Darwin, backport fix for PR82920 part2 (mx32 is not supported)

gcc/

2019-05-30  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-12  Iain Sandoe  <iain@sandoe.co.uk>

PR target/82920
* config/i386/darwin.h (CC1_SPEC): Report -mx32 as an error for
Darwin.

gcc/testsuite/

2019-05-30  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-14  Iain Sandoe  <iain@sandoe.co.uk>

PR target/82920
* gcc.target/i386/cet-sjlj-6b.c: Require effective target x32.
* gcc.target/i386/pr52146.c: Likewise.
* gcc.target/i386/pr52698.c: Likewise.
* gcc.target/i386/pr52857-1.c: Likewise.
* gcc.target/i386/pr52857-2.c: Likewise.
* gcc.target/i386/pr52876.c: Likewise.
* gcc.target/i386/pr53698.c: Likewise.
* gcc.target/i386/pr54157.c: Likewise.
* gcc.target/i386/pr55049-1.c: Likewise.
* gcc.target/i386/pr55093.c: Likewise.
* gcc.target/i386/pr55116-1.c: Likewise.
* gcc.target/i386/pr55116-2.c: Likewise.
* gcc.target/i386/pr55597.c: Likewise.
* gcc.target/i386/pr59929.c: Likewise.
* gcc.target/i386/pr66470.c: Likewise.

From-SVN: r271765

6 years agoDarwin, backport fix for pr82920 (part1, code)
Iain Sandoe [Thu, 30 May 2019 07:51:32 +0000 (07:51 +0000)] 
Darwin, backport fix for pr82920 (part1, code)

gcc/

2019-05-30  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-12  Iain Sandoe  <iain@sandoe.co.uk>

PR target/82920
* config/i386/i386.c (ix86_output_jmp_thunk_or_indirect): New.
(ix86_output_indirect_branch_via_reg): Use output mechanism
accounting for __USER_LABEL_PREFIX__.
(ix86_output_indirect_branch_via_push): Likewise.
(ix86_output_function_return): Likewise.
(ix86_output_indirect_function_return): Likewise.

gcc/testsuite/

2019-05-30  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-12  Iain Sandoe  <iain@sandoe.co.uk>
    Dominique d'Humieres  <dominiq@gcc.gnu.org>

PR target/82920
* gcc.target/i386/indirect-thunk-1.c: Adjust scan-asms for Darwin,
do not use -fno-pic on Darwin.
* gcc.target/i386/indirect-thunk-2.c: Likewise.
* gcc.target/i386/indirect-thunk-3.c: Likewise.
* gcc.target/i386/indirect-thunk-4.c: Likewise.
* gcc.target/i386/indirect-thunk-7.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
* gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
* gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
* gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
* gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
* gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
* gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
* gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
* gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
* gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
* gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
* gcc.target/i386/indirect-thunk-register-1.c: Likewise.
* gcc.target/i386/indirect-thunk-register-2.c: Likewise.
* gcc.target/i386/indirect-thunk-register-3.c: Likewise.
* gcc.target/i386/indirect-thunk-register-4.c: Likewise.
* gcc.target/i386/ret-thunk-1.c: Likewise.
* gcc.target/i386/ret-thunk-10.c: Likewise.
* gcc.target/i386/ret-thunk-11.c: Likewise.
* gcc.target/i386/ret-thunk-12.c: Likewise.
* gcc.target/i386/ret-thunk-13.c: Likewise.
* gcc.target/i386/ret-thunk-14.c: Likewise.
* gcc.target/i386/ret-thunk-15.c: Likewise.
* gcc.target/i386/ret-thunk-16.c: Likewise.
* gcc.target/i386/ret-thunk-2.c: Likewise.
* gcc.target/i386/ret-thunk-22.c: Likewise.
* gcc.target/i386/ret-thunk-23.c: Likewise.
* gcc.target/i386/ret-thunk-24.c: Likewise.
* gcc.target/i386/ret-thunk-3.c: Likewise.
* gcc.target/i386/ret-thunk-4.c: Likewise.
* gcc.target/i386/ret-thunk-5.c: Likewise.
* gcc.target/i386/ret-thunk-6.c: Likewise.
* gcc.target/i386/ret-thunk-7.c: Likewise.
* gcc.target/i386/ret-thunk-8.c: Likewise.
* gcc.target/i386/ret-thunk-9.c: Likewise.

From-SVN: r271764

6 years agoDaily bump.
GCC Administrator [Thu, 30 May 2019 00:16:13 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271759

6 years agore PR fortran/90329 (Incompatibility between gfortran and C lapack calls)
Jakub Jelinek [Wed, 29 May 2019 15:55:12 +0000 (17:55 +0200)] 
re PR fortran/90329 (Incompatibility between gfortran and C lapack calls)

PR fortran/90329
* lto-streamer.h (LTO_minor_version): Bump to 1.

Backported from mainline
2019-05-29  Jakub Jelinek  <jakub@redhat.com>

PR fortran/90329
* lang.opt (fbroken-callers): Remove.
(ftail-call-workaround, ftail-call-workaround=): New options.
* gfortran.h (struct gfc_namespace): Add implicit_interface_calls.
* interface.c (gfc_procedure_use): Set implicit_interface_calls
for calls to implicit interface procedures.
* trans-decl.c (create_function_arglist): Use flag_tail_call_workaround
instead of flag_broken_callers.  If it is not 2, also require
sym->ns->implicit_interface_calls.
* invoke.texi (fbroken-callers): Remove documentation.
(ftail-call-workaround, ftail-call-workaround=): Document.

2019-05-19  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/90329
* invoke.texi: Document -fbroken-callers.
* lang.opt: Add -fbroken-callers.
* trans-decl.c (create_function_arglist): Only set
DECL_HIDDEN_STRING_LENGTH if flag_broken_callers is set.

2019-05-16  Jakub Jelinek  <jakub@redhat.com>

PR fortran/90329
* tree-core.h (struct tree_decl_common): Document
decl_nonshareable_flag for PARM_DECLs.
* tree.h (DECL_HIDDEN_STRING_LENGTH): Define.
* calls.c (expand_call): Don't try tail call if caller
has any DECL_HIDDEN_STRING_LENGTH PARM_DECLs that are or might be
passed on the stack and callee needs to pass any arguments on the
stack.
* tree-streamer-in.c (unpack_ts_decl_common_value_fields): Use
else if instead of series of mutually exclusive ifs.  Handle
DECL_HIDDEN_STRING_LENGTH for PARM_DECLs.
* tree-streamer-out.c (pack_ts_decl_common_value_fields): Likewise.

* trans-decl.c (create_function_arglist): Set
DECL_HIDDEN_STRING_LENGTH on hidden string length PARM_DECLs if
len is constant.

From-SVN: r271743

6 years agore PR bootstrap/90543 (Build failure on MINGW for gcc-9.1.0)
Jakub Jelinek [Wed, 29 May 2019 09:35:34 +0000 (11:35 +0200)] 
re PR bootstrap/90543 (Build failure on MINGW for gcc-9.1.0)

PR bootstrap/90543
* optc-save-gen.awk: In cl_optimization_print, use correct condition
for var_opt_string printing.  In cl_optimization_print_diff, print
(null) instead of invoking undefined behavior if one of the
var_opt_string pointers is NULL and use && instead of first || in the
guarding condition.  For var_target_other options, handle const char *
target variables similarly to const char * optimize node variables.

From-SVN: r271737

6 years agoDaily bump.
GCC Administrator [Wed, 29 May 2019 00:16:13 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271725

6 years agopa.c (hppa_profile_hook): Remove offset adjustment.
John David Anglin [Tue, 28 May 2019 23:28:02 +0000 (23:28 +0000)] 
pa.c (hppa_profile_hook): Remove offset adjustment.

* config/pa/pa.c (hppa_profile_hook): Remove offset adjustment.

From-SVN: r271721

6 years agoPR libstdc++/90634 reduce allocations in filesystem::path construction
Jonathan Wakely [Tue, 28 May 2019 20:48:31 +0000 (21:48 +0100)] 
PR libstdc++/90634 reduce allocations in filesystem::path construction

Backport from mainline
2019-05-28  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/90634
* include/experimental/bits/fs_path.h (path::path(path&&)): Only call
_M_split_cmpts() for a path with multiple components.
(path::_S_is_dir_sep()): Add missing 'static' keyword to function.
* src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
components and reserve space in vector. Return early when there is
only one component.
* testsuite/27_io/filesystem/path/construct/90634.cc: New test.
* testsuite/experimental/filesystem/path/construct/90634.cc: New test.

From-SVN: r271719

6 years agoFix C++14-only code in testsuite utility
Jonathan Wakely [Tue, 28 May 2019 20:48:23 +0000 (21:48 +0100)] 
Fix C++14-only code in testsuite utility

* testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
form of std::equals for C++11 compatibility.

From-SVN: r271718

6 years agoPR c++/90548 - ICE with generic lambda and empty pack.
Marek Polacek [Tue, 28 May 2019 14:16:38 +0000 (14:16 +0000)] 
PR c++/90548 - ICE with generic lambda and empty pack.

* pt.c (tsubst_copy_and_build): Handle pack expansion properly.

* g++.dg/cpp1y/lambda-generic-90548.C: New test.

From-SVN: r271708

6 years agotrans.c (lvalue_required_for_attribute_p): Return 0 for 'Size too.
Eric Botcazou [Tue, 28 May 2019 08:25:45 +0000 (08:25 +0000)] 
trans.c (lvalue_required_for_attribute_p): Return 0 for 'Size too.

* gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
for 'Size too.
(Identifier_to_gnu): Use the actual subtype for a reference to a
packed array in a return statement.
(Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
the prefix in every case.

From-SVN: r271692

6 years agotrans.c (gnat_to_gnu): Remove superfluous tests on Backend_Overflow_Checks_On_Target...
Eric Botcazou [Tue, 28 May 2019 08:13:50 +0000 (08:13 +0000)] 
trans.c (gnat_to_gnu): Remove superfluous tests on Backend_Overflow_Checks_On_Target and rework comments.

* gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
Backend_Overflow_Checks_On_Target and rework comments.

From-SVN: r271690

6 years agotrans.c (walk_nesting_tree): New static function.
Eric Botcazou [Tue, 28 May 2019 08:03:08 +0000 (08:03 +0000)] 
trans.c (walk_nesting_tree): New static function.

* gcc-interface/trans.c (walk_nesting_tree): New static function.
(finalize_nrv): Use it to walk the entire nesting tree.

From-SVN: r271686

6 years agodecl.c (gnat_to_gnu_entity): Remove obsolete test on Is_For_Access_Subtype.
Eric Botcazou [Tue, 28 May 2019 07:43:17 +0000 (07:43 +0000)] 
decl.c (gnat_to_gnu_entity): Remove obsolete test on Is_For_Access_Subtype.

* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
obsolete test on Is_For_Access_Subtype.

From-SVN: r271684

6 years agodecl.c (components_to_record): Set a name on the type created for the REP part, if...
Eric Botcazou [Tue, 28 May 2019 07:40:07 +0000 (07:40 +0000)] 
decl.c (components_to_record): Set a name on the type created for the REP part, if any.

* gcc-interface/decl.c (components_to_record): Set a name on the type
created for the REP part, if any.
* gcc-interface/utils.c (finish_record_type): Only take the maximum
when merging sizes for a variant part at offset 0.
(merge_sizes): Rename has_rep parameter into max.

From-SVN: r271682

6 years agoDaily bump.
GCC Administrator [Tue, 28 May 2019 00:16:16 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271676

6 years agodwarf2out.c (resolve_args_picking_1): Deal with DW_OP_GNU_addr_index and DW_OP_GNU_co...
Eric Botcazou [Mon, 27 May 2019 16:12:41 +0000 (16:12 +0000)] 
dwarf2out.c (resolve_args_picking_1): Deal with DW_OP_GNU_addr_index and DW_OP_GNU_const_index opcodes.

* dwarf2out.c (resolve_args_picking_1): Deal with DW_OP_GNU_addr_index
and DW_OP_GNU_const_index opcodes.

From-SVN: r271665

6 years agotrans.c (Call_to_gnu): Do not initialize the temporary created out of addressability...
Eric Botcazou [Mon, 27 May 2019 11:44:05 +0000 (11:44 +0000)] 
trans.c (Call_to_gnu): Do not initialize the temporary created out of addressability concerns if...

* gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
created out of addressability concerns if it's for the _Init parameter
of an initialization procedure.

From-SVN: r271660

6 years agoutils.c (maybe_pad_type): Issue the warning for the specific case of component types...
Eric Botcazou [Mon, 27 May 2019 11:12:57 +0000 (11:12 +0000)] 
utils.c (maybe_pad_type): Issue the warning for the specific case of component types preferably.

* gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
specific case of component types preferably.

From-SVN: r271656

6 years agotrans.c (Identifier_to_gnu): Minor tweaks.
Eric Botcazou [Mon, 27 May 2019 11:07:05 +0000 (11:07 +0000)] 
trans.c (Identifier_to_gnu): Minor tweaks.

* gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
(gnat_to_gnu): Do not convert the result if it is a reference to an
unconstrained array used as the prefix of an attribute reference that
requires an lvalue.

From-SVN: r271654

6 years agotrans.c (Gigi_Types_Compatible): New predicate.
Eric Botcazou [Mon, 27 May 2019 10:48:48 +0000 (10:48 +0000)] 
trans.c (Gigi_Types_Compatible): New predicate.

* gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
(Identifier_to_gnu): Use it to assert that the type of the identifier
and that of its entity are compatible for gigi.  Rename a couple of
local variables and separate the processing of the result type.

From-SVN: r271651

6 years agotrans.c (Call_to_gnu): Use the unpadded type when putting back an intermediate conver...
Eric Botcazou [Mon, 27 May 2019 10:25:17 +0000 (10:25 +0000)] 
trans.c (Call_to_gnu): Use the unpadded type when putting back an intermediate conversion the type of...

* gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
putting back an intermediate conversion the type of the actuals.

From-SVN: r271648

6 years agoDaily bump.
GCC Administrator [Mon, 27 May 2019 00:16:15 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271643

6 years agore PR go/90635 (typo in libgo/configure.ac)
Ian Lance Taylor [Mon, 27 May 2019 00:13:52 +0000 (00:13 +0000)] 
re PR go/90635 (typo in libgo/configure.ac)

PR go/90635
    libgo: correct typo in USE_LIBFFI AM_CONDITIONAL

    Only affects the case of passing --without-libffi to configure.

    Fixes https://gcc.gnu.org/PR90635

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

From-SVN: r271639

6 years agore PR go/90614 (gcc-9.1.0/libgo/go/syscall/wait.c:54:22: error: unused parameter...
Ian Lance Taylor [Mon, 27 May 2019 00:10:22 +0000 (00:10 +0000)] 
re PR go/90614 (gcc-9.1.0/libgo/go/syscall/wait.c:54:22: error: unused parameter ‘w’ [-Werror=unused-parameter] Continued (uint32_t *w))

PR go/90614
    syscall: avoid unused parameter error if WIFCONTINUED not defined

    Fixes https://gcc.gnu.org/PR90614

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

From-SVN: r271637

6 years agolinux-unwind.h (pa32_fallback_frame_state): Add cast.
John David Anglin [Sun, 26 May 2019 15:19:12 +0000 (15:19 +0000)] 
linux-unwind.h (pa32_fallback_frame_state): Add cast.

* config/pa/linux-unwind.h (pa32_fallback_frame_state): Add cast.

From-SVN: r271632

6 years agoDaily bump.
GCC Administrator [Sun, 26 May 2019 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271626

6 years agoPR c++/90572 - wrong disambiguation in friend declaration.
Marek Polacek [Sat, 25 May 2019 14:46:15 +0000 (14:46 +0000)] 
PR c++/90572 - wrong disambiguation in friend declaration.

* parser.c (cp_parser_constructor_declarator_p): Don't allow missing
typename for friend declarations.

* g++.dg/cpp2a/typename16.C: New test.
* g++.dg/parse/friend13.C: New test.

From-SVN: r271620

6 years agoDaily bump.
GCC Administrator [Sat, 25 May 2019 00:16:13 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271617

6 years agore PR target/90530 (Invalid SUBREG insn generated by reload)
John David Anglin [Fri, 24 May 2019 23:15:49 +0000 (23:15 +0000)] 
re PR target/90530 (Invalid SUBREG insn generated by reload)

PR target/90530
* config/pa/pa.c (pa_can_change_mode_class): Accept mode changes from
DImode to SImode in floating-point registers on 64-bit target.
* config/pa/pa.md (umulsidi3): Change nonimmediate_operand to
register_operand in xmpyu patterns.

From-SVN: r271612

6 years agoFix std::midpoint(T*, T*) for reversed arguments
Jonathan Wakely [Fri, 24 May 2019 16:09:37 +0000 (17:09 +0100)] 
Fix std::midpoint(T*, T*) for reversed arguments

Backport from mainline
2019-05-24  Jonathan Wakely  <jwakely@redhat.com>

* include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
* testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
to "run".

From-SVN: r271609

6 years agoFix uses of non-reserved names for template parameters
Jonathan Wakely [Fri, 24 May 2019 16:09:33 +0000 (17:09 +0100)] 
Fix uses of non-reserved names for template parameters

Backport from mainline
2019-05-17  Jonathan Wakely  <jwakely@redhat.com>

* include/bits/random.h (seed_seq::param): Fix non-reserved name.
* include/experimental/type_traits (is_detected_exact)
(is_detected_exact_v): Likewise.
* include/pstl/execution_defs.h (is_execution_policy)
(is_execution_policy_v, __enable_if_execution_policy): Likewise.
* include/pstl/execution_impl.h (__policy_traits): Likewise.
* testsuite/17_intro/names.cc: Check for more non-reserved names.
* testsuite/experimental/names.cc: New test.

From-SVN: r271608

6 years agoPR libstdc++/85965 move is_invocable assertions again
Jonathan Wakely [Fri, 24 May 2019 16:09:28 +0000 (17:09 +0100)] 
PR libstdc++/85965 move is_invocable assertions again

This is another attempt to reduce how often the assertions are
evaluated, so that code which doesn't try to use the function objects
doesn't need them to be invocable.

For _Rb_tree we access the _M_key_compare object directly, so can't put
the assertions in an accessor function for it. However, every invocation
of _M_key_compare is accompanied by a use of _S_key, so the assertions
can be put in there.  For _Hashtable there are member functions that are
consistently used to obtain a hash code or test for equality, so the
assertions can go in those members.

Backport from mainline
2019-05-17  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/85965
* include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
assertions from the destructor.
* include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
Move static_assert for hash function to here.
(_Hash_table_base::_M_equals): Move static_assert for equality
predicate to here.
* include/bits/stl_tree.h (_Rb_tree::_S_key(_Const_Link_type)): Move
assertions here. Access the value directly instead of calling _S_value.
(_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
_S_key(_Const_Link_type).
* testsuite/23_containers/set/85965.cc: Check construction,
destruction, assignment and size() do not trigger the assertions.
* testsuite/23_containers/unordered_set/85965.cc: Likewise.
* testsuite/23_containers/map/48101_neg.cc: Call find and adjust
expected errors.
* testsuite/23_containers/multimap/48101_neg.cc: Likewise.
* testsuite/23_containers/multiset/48101_neg.cc: Likewise.
* testsuite/23_containers/set/48101_neg.cc: Likewise.
* testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
* testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
* testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
* testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.

From-SVN: r271607

6 years agoBackport r271548
Martin Liska [Fri, 24 May 2019 07:43:48 +0000 (09:43 +0200)] 
Backport r271548

2019-05-24  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-05-23  Martin Liska  <mliska@suse.cz>

PR sanitizer/90570
* gimplify.c (gimplify_target_expr): Skip TREE_STATIC target
expression similarly to gimplify_decl_expr.
2019-05-24  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-05-23  Martin Liska  <mliska@suse.cz>

PR sanitizer/90570
* g++.dg/asan/pr90570.C: New test.

From-SVN: r271593

6 years agoDaily bump.
GCC Administrator [Fri, 24 May 2019 00:16:21 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271587

6 years agoMake any_cast compare typeinfo as well as function pointers
Jonathan Wakely [Thu, 23 May 2019 14:18:18 +0000 (15:18 +0100)] 
Make any_cast compare typeinfo as well as function pointers

It's possible for the function pointer comparison to fail even though
the type is correct, because the function could be defined multiple
times with different addresses when shared libraries are in use.

Retain the function pointer check for the common case where the check
succeeds, but compare typeinfo (if RTTI is enabled) if the first check
fails.

Backport from mainline
2019-05-23  Jonathan Wakely  <jwakely@redhat.com>

* include/experimental/any (__any_caster): Use RTTI if comparing
addresses fails, to support non-unique addresses in shared libraries.
* include/std/any (__any_caster): Likewise.
* testsuite/experimental/any/misc/any_cast_neg.cc: Use 0 for dg-error
line number.

From-SVN: r271559

6 years agoPR libstdc++/90220 fix experimental::any_cast for non-object types
Jonathan Wakely [Thu, 23 May 2019 14:18:13 +0000 (15:18 +0100)] 
PR libstdc++/90220 fix experimental::any_cast for non-object types

This corresponds to the fixes done for std::any_cast, but has to be done
without if-constexpr. The dummy specialization of _Manager_internal<_Op>
is used to avoid instantiating the real _Manager_internal<T>::_S_manage
function just to compare its address.

Backport from mainline
2019-05-23  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/90220
* include/experimental/any (__any_caster): Constrain to only be
callable for object types. Use remove_cv_t instead of decay_t.
If the type decays or isn't copy constructible, compare the manager
function to a dummy specialization.
(__any_caster): Add overload constrained for non-object types.
(any::_Manager_internal<_Op>): Add dummy specialization.
* testsuite/experimental/any/misc/any_cast.cc: Test function types
and array types.

From-SVN: r271558

6 years ago* c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
Eric Botcazou [Thu, 23 May 2019 10:35:30 +0000 (10:35 +0000)] 
* c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.

From-SVN: r271550

6 years ago* gnat.dg/opt78.ad[sb]: New test.
Eric Botcazou [Thu, 23 May 2019 09:50:21 +0000 (09:50 +0000)] 
* gnat.dg/opt78.ad[sb]: New test.

From-SVN: r271546

6 years agoDaily bump.
GCC Administrator [Thu, 23 May 2019 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271533

6 years agoPR libstdc++/90557 fix path assignment that alters source
Jonathan Wakely [Wed, 22 May 2019 22:36:21 +0000 (23:36 +0100)] 
PR libstdc++/90557 fix path assignment that alters source

Backport from mainline
2019-05-22  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/90557
* src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
reversed arguments to uninitialized_copy_n.
* testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
is unchanged by copy assignment.
* testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
compare path components.

From-SVN: r271528

6 years agobackport: re PR target/90547 (ICE in gen_lowpart_general, at rtlhooks.c:63)
Uros Bizjak [Wed, 22 May 2019 18:49:22 +0000 (20:49 +0200)] 
backport: re PR target/90547 (ICE in gen_lowpart_general, at rtlhooks.c:63)

Backported from mainline
2019-05-21  Uroš Bizjak  <ubizjak@gmail.com>

* config/i386/cpuid.h (__cpuid): For 32bit targets, zero
%ebx and %ecx bafore calling cpuid with leaf 1 or
non-constant leaf argument.

2019-05-21  Uroš Bizjak  <ubizjak@gmail.com>

PR target/90547
* config/i386/i386.md (anddi_1 to andsi_1_zext splitter):
Avoid calling gen_lowpart with CONST operand.

testsuite/ChangeLog:

Backported from mainline
2019-05-21  Uroš Bizjak  <ubizjak@gmail.com>

PR target/90547
* gcc.target/i386/pr90547.c: New test.

From-SVN: r271516

6 years agoDaily bump.
GCC Administrator [Wed, 22 May 2019 00:16:18 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271495

6 years agolibfortran/90038: Document new wait=.false. implementation
Janne Blomqvist [Tue, 21 May 2019 15:24:30 +0000 (18:24 +0300)] 
libfortran/90038: Document new wait=.false. implementation

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

       PR libfortran/90038
       * intrinsic.texi (EXECUTE_COMMAND_LINE): Explain new
       wait=.false. implementation.

From-SVN: r271470

6 years ago[RTEMS] Change multilibs for ARM
Sebastian Huber [Tue, 21 May 2019 04:41:23 +0000 (04:41 +0000)] 
[RTEMS] Change multilibs for ARM

Account for Cortex-M3 Errata 602117.  The -mfix-cortex-m3-ldrd option is
enabled by default, if -mcpu=cortex-m3 is used.

gcc/

* config/arm/t-rtems: Replace ARMv7-M multilibs with Cortex-M
multilibs.

From-SVN: r271452

6 years agoDaily bump.
GCC Administrator [Tue, 21 May 2019 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271448

6 years ago* es.po, sv.po: Update.
Joseph Myers [Mon, 20 May 2019 22:22:58 +0000 (23:22 +0100)] 
* es.po, sv.po: Update.

From-SVN: r271444

6 years agore PR libgomp/90527 (alloc.c:72:7: error: implicit declaration of function ‘posix_mem...
Jakub Jelinek [Mon, 20 May 2019 21:29:49 +0000 (23:29 +0200)] 
re PR libgomp/90527 (alloc.c:72:7: error: implicit declaration of function ‘posix_memalign’)

PR libgomp/90527
* alloc.c (_GNU_SOURCE): Define.

From-SVN: r271439

6 years agomips.c (mips_dwarf_frame_reg_mode): Replace TARGET_FLOAT64 with !TARGET_FLOAT32,...
Jeff Law [Mon, 20 May 2019 19:08:18 +0000 (13:08 -0600)] 
mips.c (mips_dwarf_frame_reg_mode): Replace TARGET_FLOAT64 with !TARGET_FLOAT32, thus handling both fp64 and fpxx modes.

* config/mips/mips.c (mips_dwarf_frame_reg_mode): Replace
TARGET_FLOAT64 with !TARGET_FLOAT32, thus handling both fp64
and fpxx modes.

* g++.dg/eh/o32-fp.C: New.
* gcc.target/mips/dwarfregtable-1.c: New.
* gcc.target/mips/dwarfregtable-2.c: New.
* gcc.target/mips/dwarfregtable-3.c: New.
* gcc.target/mips/dwarfregtable-4.c: New.
* gcc.target/mips/dwarfregtable.h: New.

From-SVN: r271433

6 years agolibfortran/90038 Use posix_spawn, reap dead children when wait=.false.
Janne Blomqvist [Mon, 20 May 2019 17:43:05 +0000 (20:43 +0300)] 
libfortran/90038 Use posix_spawn, reap dead children when wait=.false.

Backport from trunk.

When using posix_spawn or fork to launch a child process, the parent
needs to wait for the child, otherwise the dead child is left as a
zombie process. For this purpose one can install a signal handler for
SIGCHLD.

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

PR libfortran/90038
* intrinsics/execute_command_line (sigchld_handler): New function.
        (execute_command_line): Install handler for SIGCHLD.
        * configure.ac: Check for presence of sigaction and waitpid.
        * config.h.in: Regenerated.
        * configure: Regenerated.

fork() semantics can be problematic.  Most unix style OS'es have
posix_spawn which can be used to replace fork + exec in many cases.
For more information see
e.g. https://www.microsoft.com/en-us/research/uploads/prod/2019/04/fork-hotos19.pdf

This replaces the one use of fork in libgfortran with posix_spawn.

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

        PR libfortran/90038
        * configure.ac (AC_CHECK_FUNCS_ONCE): Check for posix_spawn.
        * intrinsics/execute_command_line (execute_command_line): Use
        posix_spawn.
        * Makefile.in: Regenerated.
        * config.h.in: Regenerated.
        * configure: Regenerated.

Regtested on x86_64-pc-linux-gnu.

From-SVN: r271427

6 years agoPR c++/90532 Ensure __is_constructible(T[]) is false
Jonathan Wakely [Mon, 20 May 2019 13:02:10 +0000 (14:02 +0100)] 
PR c++/90532 Ensure __is_constructible(T[]) is false

An array of an unknown bound is an incomplete type, so no object of such
a type can be constructed. This means __is_constructible should always
be false for an array of unknown bound.

This patch also changes the std::is_default_constructible trait to use
std::is_constructible, which now gives the right answer for arrays of
unknown bound.

gcc/cp:

Backported from mainline
2019-05-20  Jonathan Wakely  <jwakely@redhat.com>

PR c++/90532 Ensure __is_constructible(T[]) is false
* method.c (is_xible_helper): Return error_mark_node for construction
of an array of unknown bound.

gcc/testsuite:

Backported from mainline
2019-05-20  Jonathan Wakely  <jwakely@redhat.com>

PR c++/90532 Ensure __is_constructible(T[]) is false
* g++.dg/ext/90532.C: New test.

libstdc++-v3:

Backported from mainline
2019-05-20  Jonathan Wakely  <jwakely@redhat.com>

PR c++/90532 Ensure __is_constructible(T[]) is false
* include/std/type_traits (__do_is_default_constructible_impl)
(__is_default_constructible_atom, __is_default_constructible_safe):
Remove.
(is_default_constructible): Use is_constructible.
* testsuite/20_util/is_constructible/value.cc: Check int[] case.
* testsuite/20_util/is_default_constructible/value.cc: Likewise.
* testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
* testsuite/20_util/is_trivially_default_constructible/value.cc:
Likewise.

From-SVN: r271417

6 years agoDaily bump.
GCC Administrator [Mon, 20 May 2019 00:16:42 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271393

6 years agore PR fortran/90498 (ICE with select type/associate and derived type argument contain...
Paul Thomas [Sun, 19 May 2019 18:08:28 +0000 (18:08 +0000)] 
re PR fortran/90498 (ICE with select type/associate and derived type argument containing class(*))

2019-05-19  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/90498
* trans-stmt.c (trans_associate_var) Do not use the saved
descriptor if the expression is a COMPONENT_REF.

2019-05-19  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/90498
* gfortran.dg/associate_48.f90 : New test.

From-SVN: r271383

6 years agoDaily bump.
GCC Administrator [Sun, 19 May 2019 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271374

6 years agoDaily bump.
GCC Administrator [Sat, 18 May 2019 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r271367

6 years agore PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=)
Jakub Jelinek [Fri, 17 May 2019 19:56:14 +0000 (21:56 +0200)] 
re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=)

PR fortran/54613
* gfortran.map (GFORTRAN_9.2): Export _gfortran_{,m,s}findloc{0,1}_r10.
* Makefile.am (i_findloc0_c): Add $(srcdir)/generated/findloc0_r10.c.
(i_findloc1_c): Add $(srcdir)/generated/findloc1_r10.c.
* Makefile.in: Regenerated.
* generated/findloc0_r10.c: Generated.
* generated/findloc1_r10.c: Generated.

From-SVN: r271358

6 years agore PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=)
Jakub Jelinek [Fri, 17 May 2019 19:54:46 +0000 (21:54 +0200)] 
re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=)

PR fortran/54613
* gfortran.map (GFORTRAN_9.2): New symbol version, export
_gfortran_{,m,s}findloc0_i2 in it.

From-SVN: r271357

6 years agobackport: re PR c++/90484 (ICE in equal_mem_array_ref_p at gcc/tree-ssa-scopedtables...
Jakub Jelinek [Fri, 17 May 2019 19:54:15 +0000 (21:54 +0200)] 
backport: re PR c++/90484 (ICE in equal_mem_array_ref_p at gcc/tree-ssa-scopedtables.c:550 since r270433 on i586)

Backported from mainline
2019-05-16  Jakub Jelinek  <jakub@redhat.com>

PR c++/90484
* tree-ssa-scopedtables.c (equal_mem_array_ref_p): Don't assert that
sz0 is equal to sz1, instead return false in that case.

From-SVN: r271356

6 years agobackport: omp-low.c (lower_rec_input_clauses): If OMP_CLAUSE_IF has non-constant...
Jakub Jelinek [Fri, 17 May 2019 19:53:48 +0000 (21:53 +0200)] 
backport: omp-low.c (lower_rec_input_clauses): If OMP_CLAUSE_IF has non-constant expression...

Backported from mainline
2019-05-16  Jakub Jelinek  <jakub@redhat.com>

* omp-low.c (lower_rec_input_clauses): If OMP_CLAUSE_IF
has non-constant expression, force sctx.lane and use two
argument IFN_GOMP_SIMD_LANE instead of single argument.
* tree-ssa-dce.c (eliminate_unnecessary_stmts): Don't DCE
two argument IFN_GOMP_SIMD_LANE without lhs.
* tree-vectorizer.h (struct _loop_vec_info): Add simd_if_cond
member.
(LOOP_VINFO_SIMD_IF_COND, LOOP_REQUIRES_VERSIONING_FOR_SIMD_IF_COND):
Define.
(LOOP_REQUIRES_VERSIONING): Or in
LOOP_REQUIRES_VERSIONING_FOR_SIMD_IF_COND.
* tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
simd_if_cond.
(vect_analyze_loop_2): Punt if LOOP_VINFO_SIMD_IF_COND is constant 0.
* tree-vect-loop-manip.c (vect_loop_versioning): Add runtime check
from simd if clause if needed.

* gcc.dg/vect/vect-simd-1.c: New test.
* gcc.dg/vect/vect-simd-2.c: New test.
* gcc.dg/vect/vect-simd-3.c: New test.
* gcc.dg/vect/vect-simd-4.c: New test.

From-SVN: r271355

6 years agobackport: omp-low.c (lower_rec_input_clauses): For if (0) or simdlen (1) set max_vf...
Jakub Jelinek [Fri, 17 May 2019 19:52:55 +0000 (21:52 +0200)] 
backport: omp-low.c (lower_rec_input_clauses): For if (0) or simdlen (1) set max_vf to 1.

Backported from mainline
2019-05-15  Jakub Jelinek  <jakub@redhat.com>

* omp-low.c (lower_rec_input_clauses): For if (0) or simdlen (1) set
max_vf to 1.
* omp-expand.c (expand_omp_simd): For if (0) or simdlen (1) clear
safelen_int and set loop->dont_vectorize.

* c-c++-common/gomp/simd8.c: New test.

From-SVN: r271354

6 years agobackport: re PR debug/90197 (Cannot step through simple loop at -O -g)
Jakub Jelinek [Fri, 17 May 2019 19:52:06 +0000 (21:52 +0200)] 
backport: re PR debug/90197 (Cannot step through simple loop at -O -g)

Backported from mainline
2019-05-15  Jakub Jelinek  <jakub@redhat.com>

PR debug/90197
* cp-gimplify.c (genericize_cp_loop): Emit a DEBUG_BEGIN_STMT
before the condition (or if missing or constant non-zero at the end
of the loop.  Emit a DEBUG_BEGIN_STMT before the increment expression
if any.  Don't call protected_set_expr_location on incr if it already
has a location.

From-SVN: r271353

6 years agobackport: re PR tree-optimization/90385 (ICE: tree check: expected ssa_name, have...
Jakub Jelinek [Fri, 17 May 2019 19:51:32 +0000 (21:51 +0200)] 
backport: re PR tree-optimization/90385 (ICE: tree check: expected ssa_name, have real_cst in transform_to_exit_first_loop_alt, at tree-parloops.c:1772)

Backported from mainline
2019-05-10  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/90385
* tree-parloops.c (try_create_reduction_list): Punt on non-SSA_NAME
arguments of the exit phis.

* gfortran.dg/pr90385.f90: New test.

From-SVN: r271352

6 years agobackport: re PR c++/90383 (GCC generates invalid constexpr copy/move assignment opera...
Jakub Jelinek [Fri, 17 May 2019 19:50:52 +0000 (21:50 +0200)] 
backport: re PR c++/90383 (GCC generates invalid constexpr copy/move assignment operators for types with trailing padding. (Again))

Backported from mainline
2019-05-10  Jakub Jelinek  <jakub@redhat.com>

PR c++/90383
* tree-inline.h (struct copy_body_data): Add do_not_fold member.
* tree-inline.c (remap_gimple_op_r): Avoid folding expressions if
id->do_not_fold.
(copy_tree_body_r): Likewise.
(copy_fn): Set id.do_not_fold to true.

* g++.dg/cpp1y/constexpr-90383-1.C: New test.
* g++.dg/cpp1y/constexpr-90383-2.C: New test.

From-SVN: r271351

6 years agobackport: re PR pch/90326 (Using any precompiled header breaks definition of FLT_MAX)
Jakub Jelinek [Fri, 17 May 2019 19:49:54 +0000 (21:49 +0200)] 
backport: re PR pch/90326 (Using any precompiled header breaks definition of FLT_MAX)

Backported from mainline
2019-05-10  Jakub Jelinek  <jakub@redhat.com>

PR pch/90326
cp/
* config-lang.in (gtfiles): Remove c-family/c-lex.c, add
c-family/c-cppbuiltin.c.
objc/
* config-lang.in (gtfiles): Add c-family/c-format.c.
objcp/
* config-lang.in (gtfiles): Don't add c-family/c-cppbuiltin.c.
testsuite/
* g++.dg/pch/pr90326.C: New test.
* g++.dg/pch/pr90326.Hs: New file.

From-SVN: r271350