]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
6 years agoRISC-V: Fix splitter for 32-bit AND on 64-bit target.
Kito Cheng [Thu, 18 Jul 2019 07:00:32 +0000 (07:00 +0000)] 
RISC-V: Fix splitter for 32-bit AND on 64-bit target.

Fixes github.com/riscv/riscv-gcc issue #161.  We were accidentally using
BITS_PER_WORD to compute shift counts when we should have been using the
bitsize of the operand modes.  This was wrong when we had an SImode shift
and a 64-bit target.

Andrew Waterman  <andrew@sifive.com>
gcc/
* config/riscv/riscv.md (lshrsi3_zero_extend_3+1): Use operands[1]
bitsize instead of BITS_PER_WORD.
gcc/testsuite/
* gcc.target/riscv/shift-shift-2.c: Add one more test.

gcc/ChangeLog:
2019-07-18  Kito Cheng  <kito.cheng@sifive.com>

Backport from mainline
2019-07-08  Andrew Waterman  <andrew@sifive.com>
    Jim Wilson  <jimw@sifive.com>

* config/riscv/riscv.md (lshrsi3_zero_extend_3+1): Use operands[1]
bitsize instead of BITS_PER_WORD.
gcc/testsuite/

gcc/testsuite/ChangeLog:
2019-07-18  Kito Cheng  <kito.cheng@sifive.com>

Backport from mainline
2019-07-08  Jim Wilson  <jimw@sifive.com>

* gcc.target/riscv/shift-shift-2.c: Add one more test.

From-SVN: r273566

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

From-SVN: r273561

6 years agopa.c (pa_som_asm_init_sections): Don't force all constant data into data section...
John David Anglin [Thu, 18 Jul 2019 00:10:27 +0000 (00:10 +0000)] 
pa.c (pa_som_asm_init_sections): Don't force all constant data into data section when generating PIC code.

* config/pa/pa.c (pa_som_asm_init_sections): Don't force all constant
data into data section when generating PIC code.
(pa_select_section): Use pa_reloc_rw_mask() to qualify relocs.
(pa_reloc_rw_mask): Return 3 when generating PIC code and when
generating code for SOM targets earlier than HP-UX 11.  Otherwise,
return 2 for SOM and 0 for other targets.

From-SVN: r273558

6 years agoS/390: Fix vector shift count operand
Andreas Krebbel [Wed, 17 Jul 2019 07:32:30 +0000 (07:32 +0000)] 
S/390: Fix vector shift count operand

We currently use subst definitions to handle the different variants of shift
count operands. Unfortunately, in the vector shift pattern the shift count
operand is used directly. Without it being adjusted for the 'subst' variants the
displacement value is omitted resulting in a wrong shift count being applied.

This patch needs to be applied to older branches as well.

gcc/ChangeLog:

2019-07-17  Andreas Krebbel  <krebbel@linux.ibm.com>

Backport from mainline
2019-07-01  Andreas Krebbel  <krebbel@linux.ibm.com>

* config/s390/vector.md: Fix shift count operand printing.

gcc/testsuite/ChangeLog:

2019-07-17  Andreas Krebbel  <krebbel@linux.ibm.com>

Backport from mainline
2019-07-01  Andreas Krebbel  <krebbel@linux.ibm.com>

* gcc.target/s390/vector/vec-shift-2.c: New test.

From-SVN: r273546

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

From-SVN: r273540

6 years agoFix alignment option parser (PR90684)
Wilco Dijkstra [Tue, 16 Jul 2019 16:17:39 +0000 (16:17 +0000)] 
Fix alignment option parser (PR90684)

Fix the alignment option parser to always allow up to 4 alignments.
Now -falign-functions=16:8:8:8 no longer reports an error.

    gcc/
PR driver/90684
* gcc/opts.c (parse_and_check_align_values): Allow 4 alignment values.

From-SVN: r273533

6 years agoAdd missing testcase for PR89190
Wilco Dijkstra [Tue, 16 Jul 2019 12:12:01 +0000 (12:12 +0000)] 
Add missing testcase for PR89190

    testsuite/
PR target/89190
* gcc.target/arm/pr89190.c: New test.

From-SVN: r273525

6 years agoDo not use -Werror in a test that has -frepo warning (PR testsuite/91175).
Martin Liska [Tue, 16 Jul 2019 10:21:57 +0000 (12:21 +0200)] 
Do not use -Werror in a test that has -frepo warning (PR testsuite/91175).

2019-07-16  Martin Liska  <mliska@suse.cz>

PR testsuite/91175
* g++.old-deja/g++.pt/instantiate4.C: Do not use -Werror.

From-SVN: r273521

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

From-SVN: r273504

6 years agoDeprecate -frepo on gcc-9 branch (PR c++/91125).
Martin Liska [Mon, 15 Jul 2019 04:11:43 +0000 (06:11 +0200)] 
Deprecate -frepo on gcc-9 branch (PR c++/91125).

2019-07-15  Martin Liska  <mliska@suse.cz>

PR c++/91125
* c-opts.c (c_common_handle_option): Warn the -frepo
will be removed in the future.
2019-07-15  Martin Liska  <mliska@suse.cz>

PR c++/91125
* g++.dg/parse/repo1.C: Add scan for the new warning.
* g++.dg/rtti/repo1.C: Likewise.
* g++.dg/template/repo1.C: Likewise.
* g++.dg/template/repo10.C: Likewise.
* g++.dg/template/repo11.C: Likewise.
* g++.dg/template/repo2.C: Likewise.
* g++.dg/template/repo3.C: Likewise.
* g++.dg/template/repo4.C: Likewise.
* g++.dg/template/repo5.C: Likewise.
* g++.dg/template/repo6.C: Likewise.
* g++.dg/template/repo7.C: Likewise.
* g++.dg/template/repo8.C: Likewise.
* g++.dg/template/repo9.C: Likewise.
* g++.old-deja/g++.pt/instantiate4.C: Likewise.
* g++.old-deja/g++.pt/instantiate6.C: Likewise.
* g++.old-deja/g++.pt/repo1.C: Likewise.
* g++.old-deja/g++.pt/repo2.C: Likewise.
* g++.old-deja/g++.pt/repo3.C: Likewise.
* g++.old-deja/g++.pt/repo4.C: Likewise.

From-SVN: r273489

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

From-SVN: r273487

6 years agobackport: re PR c/91149 (GCC 9 and later incorrectly rejects OpenMP task reduction...
Jakub Jelinek [Sun, 14 Jul 2019 08:29:38 +0000 (10:29 +0200)] 
backport: re PR c/91149 (GCC 9 and later incorrectly rejects OpenMP task reduction-modifier on target parallel combined construct)

Backported from mainline
2019-07-13  Jakub Jelinek  <jakub@redhat.com>

PR c/91149
* c-omp.c (c_omp_split_clauses): Fix a pasto in
OMP_CLAUSE_REDUCTION_TASK handling.

* c-c++-common/gomp/reduction-task-3.c: New test.

From-SVN: r273478

6 years agobackport: re PR middle-end/78884 ([7/8] ICE when gimplifying VLA in OpenMP SIMD region)
Jakub Jelinek [Sun, 14 Jul 2019 08:28:06 +0000 (10:28 +0200)] 
backport: re PR middle-end/78884 ([7/8] ICE when gimplifying VLA in OpenMP SIMD region)

Backported from mainline
2019-07-04  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/78884
* gimplify.c (struct gimplify_omp_ctx): Add add_safelen1 member.
(gimplify_bind_expr): If seeing TREE_ADDRESSABLE VLA inside of simd
loop body, set ctx->add_safelen1 instead of making it GOVD_PRIVATE.
(gimplify_adjust_omp_clauses): Add safelen (1) clause if
ctx->add_safelen1 is set.

* gcc.dg/gomp/pr78884.c: New test.

From-SVN: r273477

6 years agobackport: re PR rtl-optimization/90756 (g++ ICE in convert_move, at expr.c:218 on...
Jakub Jelinek [Sun, 14 Jul 2019 08:27:12 +0000 (10:27 +0200)] 
backport: re PR rtl-optimization/90756 (g++ ICE in convert_move, at expr.c:218 on i686 and s390x)

Backported from mainline
2019-07-04  Jakub Jelinek  <jakub@redhat.com>

PR rtl-optimization/90756
* explow.c (promote_ssa_mode): Always use TYPE_MODE, don't bypass it
for VECTOR_TYPE_P.

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

From-SVN: r273476

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

From-SVN: r273473

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

From-SVN: r273462

6 years agoTurn off ipa-ra in builtins test (PR91059)
Wilco Dijkstra [Fri, 12 Jul 2019 17:00:40 +0000 (17:00 +0000)] 
Turn off ipa-ra in builtins test (PR91059)

The gcc.c-torture/execute/builtins/lib directory contains a reimplementation
of many C library string functions, which causes non-trivial register allocation
bugs with LTO and static linked libraries.  To fix this long-standing test issue,
turn off ipa-ra which avoids the register corruption across calls.  All builtin
torture tests now pass on aarch64-none-elf.  Committed as obvious.
See PR78529 for more details.

    testsuite/
PR testsuite/78529
* gcc.c-torture/execute/builtins/builtins.exp: Add -fno-ipa-ra.

From-SVN: r273452

6 years agoBackport PRs 90369, 90900, 90914, 90972, 90982, 91004, 91062, 91063
Richard Biener [Fri, 12 Jul 2019 14:42:14 +0000 (14:42 +0000)] 
Backport PRs 90369, 90900, 90914, 90972, 90982, 91004, 91062, 91063

2019-07-12  Richard Biener  <rguenther@suse.de>

Backport from mainline
2019-07-04  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/91063
* tree-vect-stmts.c (vect_init_vector): Call gsi_remove to remove
stmt from stmts sequence before calling vect_init_vector_1.
Formatting fix.

* gcc.dg/gomp/pr91063.c: New test.

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

PR ipa/91062
* tree-pass.h (execute_all_ipa_transforms): Add a flag
parameter whether to disable GC collection.
* passes.c (execute_one_ipa_transform_pass): Likewise, and
honor it.
(execute_all_ipa_transforms): Likewise and pass it down.
* cgraph.c (cgraph_node::get_body): Do not invoke garbage
collection from applying IPA transforms.
* cgraphunit.c (cgraph_node::expand): Allow garbage collection
from applying IPA transforms.

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

PR testsuite/91004
* g++.dg/torture/pr34850.C: Fix overly reduced testcase.

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

PR ipa/90982
* tree-inline.c (remap_ssa_name): Copy SSA range info.

* g++.dg/torture/pr90982.C: New testcase.

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

PR tree-optimization/90972
* tree-vect-stmts.c (vect_init_vector): Handle CONSTANT_CLASS_P
in common code, dealing with STRING_CST properly.

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

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

PR debug/90914
* dwarf2out.c (prune_unused_types_walk): Always consider
function-local extern declarations as used.

* g++.dg/debug/pr90914.C: New testcase.

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

PR debug/90900
* cfgexpand.c (expand_debug_expr): Treat NOTE_P DECL_RTL
as if optimized away.

* gcc.dg/gomp/pr90900.c: New testcase.

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

PR lto/90369
* lto-wrapper.c (debug_objcopy): Use the original filename
including archive offset for the filename used for -save-temps.

From-SVN: r273446

6 years agore PR rtl-optimization/91136 (incorrect move of instruction to delay slot causes...
Eric Botcazou [Fri, 12 Jul 2019 10:16:11 +0000 (10:16 +0000)] 
re PR rtl-optimization/91136 (incorrect move of instruction to delay slot causes application crash in exception handling)

PR rtl-optimization/91136
* df-core.c (ACCESSING REFS): Fix typos in comment.
* resource.c (mark_target_live_reg): Add artificial defs that occur at
the beginning of the block to the initial set of live registers.

From-SVN: r273437

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

From-SVN: r273428

6 years agobackport: pr81563.c (dg-final): Check that no registers are restored from %esp.
Uros Bizjak [Thu, 11 Jul 2019 20:52:25 +0000 (22:52 +0200)] 
backport: pr81563.c (dg-final): Check that no registers are restored from %esp.

Backported from mainline
2019-06-18  Uroš Bizjak  <ubizjak@gmail.com>

* gcc.target/i386/pr81563.c (dg-final): Check that no
registers are restored from %esp.

From-SVN: r273423

6 years agobackport: sse.md (*andnot<mode>3_bcst): Fix VI/VI48_AVX512VL typo.
Uros Bizjak [Thu, 11 Jul 2019 20:49:13 +0000 (22:49 +0200)] 
backport: sse.md (*andnot<mode>3_bcst): Fix VI/VI48_AVX512VL typo.

Backported from mainline
2019-07-06  Richard Sandiford  <richard.sandiford@arm.com>

* config/i386/sse.md (*andnot<mode>3_bcst): Fix VI/VI48_AVX512VL typo.

From-SVN: r273422

6 years agors6000: Handle Modula-2 in the traceback table
Segher Boessenkool [Thu, 11 Jul 2019 18:42:20 +0000 (20:42 +0200)] 
rs6000: Handle Modula-2 in the traceback table

This patch recognises Modula-2 as language for the traceback table,
fixing the problem shown in
https://gcc.gnu.org/ml/gcc-patches/2019-07/msg00848.html .

* config/rs6000/rs6000.c (rs6000_output_function_epilogue): Handle
Modula-2.

From-SVN: r273412

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

From-SVN: r273374

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

From-SVN: r273320

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

From-SVN: r273259

6 years agore PR tree-optimization/91108 (Fails to pun through unions)
Richard Biener [Mon, 8 Jul 2019 11:48:48 +0000 (11:48 +0000)] 
re PR tree-optimization/91108 (Fails to pun through unions)

2019-07-08  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91108
* tree-ssa-sccvn.c: Include builtins.h.
(vn_reference_lookup_3): Use only alignment constraints to
verify same-valued store disambiguation.

* gcc.dg/tree-ssa/pr91091-1.c: New testcase.
* gcc.dg/tree-ssa/ssa-fre-78.c: Likewise.

From-SVN: r273233

6 years agoDaily bump.
GCC Administrator [Mon, 8 Jul 2019 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273189

6 years agore PR fortran/91077 (Wrong indexing when using a pointer)
Paul Thomas [Sun, 7 Jul 2019 14:32:53 +0000 (14:32 +0000)] 
re PR fortran/91077 (Wrong indexing when using a pointer)

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

PR fortran/91077
* trans-array.c (gfc_conv_scalarized_array_ref) Delete code
that gave symbol backend decl for subref arrays and deferred
length variables.

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

PR fortran/91077
* gfortran.dg/pointer_array_11.f90 : New test.

From-SVN: r273177

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

From-SVN: r273172

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

From-SVN: r273153

6 years agoaarch64: emit .variant_pcs for aarch64_vector_pcs symbol references
Szabolcs Nagy [Fri, 5 Jul 2019 15:06:11 +0000 (15:06 +0000)] 
aarch64: emit .variant_pcs for aarch64_vector_pcs symbol references

Backport r271869
Backport r271913
Backport r272414

A dynamic linker with lazy binding support may need to handle vector PCS
function symbols specially, so an ELF symbol table marking was
introduced for such symbols.

Function symbol references and definitions that follow the vector PCS
are marked in the generated assembly with .variant_pcs and then the
STO_AARCH64_VARIANT_PCS st_other flag is set on the symbol in the object
file.  The marking is propagated to the dynamic symbol table by the
static linker so a dynamic linker can handle such symbols specially.

For this to work, the assembler, the static linker and the dynamic
linker has to be updated on a system.  Old assembler does not support
the new .variant_pcs directive, so a toolchain with old binutils won't
be able to compile code that references vector PCS symbols.

gcc/ChangeLog:

* config/aarch64/aarch64-protos.h (aarch64_asm_output_alias): Declare.
(aarch64_asm_output_external): Declare.
* config/aarch64/aarch64.c (aarch64_asm_output_variant_pcs): New.
(aarch64_declare_function_name): Call aarch64_asm_output_variant_pcs.
(aarch64_asm_output_alias): New.
(aarch64_asm_output_external): New.
* config/aarch64/aarch64.h (ASM_OUTPUT_DEF_FROM_DECLS): Define.
(ASM_OUTPUT_EXTERNAL): Define.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/pcs_attribute-2.c: New test.
* gcc.target/aarch64/torture/simd-abi-4.c: Check .variant_pcs support.
* lib/target-supports.exp (check_effective_target_aarch64_variant_pcs):
New.

gcc/ChangeLog:

* config/aarch64/aarch64-protos.h (aarch64_asm_output_external): Remove
const.
* config/aarch64/aarch64.c (aarch64_asm_output_external): Call
default_elf_asm_output_external.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/pcs_attribute-2.c: Remove ifunc usage.
* gcc.target/aarch64/pcs_attribute-3.c: New test.

From-SVN: r273140

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

From-SVN: r273099

6 years agos-osinte__kfreebsd-gnu.ads (clockid_t): Make type definition public.
James Clarke [Thu, 4 Jul 2019 13:36:08 +0000 (13:36 +0000)] 
s-osinte__kfreebsd-gnu.ads (clockid_t): Make type definition public.

2019-07-04  James Clarke <jrtc27@debian.org>

        * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
        definition public.
        (CLOCK_REALTIME): Make value public.

From-SVN: r273081

6 years agoBackport r272993
Martin Liska [Thu, 4 Jul 2019 09:03:56 +0000 (11:03 +0200)] 
Backport r272993

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

Backport from mainline
2019-07-03  Martin Liska  <mliska@suse.cz>

PR tree-optimization/90892
* builtins.c (inline_expand_builtin_string_cmp): Handle '\0'
in string constants.
2019-07-04  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-07-03  Martin Liska  <mliska@suse.cz>

PR tree-optimization/90892
* gcc.dg/pr90892.c: New test.

From-SVN: r273074

6 years agoBackport r272992
Martin Liska [Thu, 4 Jul 2019 09:03:40 +0000 (11:03 +0200)] 
Backport r272992

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

Backport from mainline
2019-07-03  Martin Liska  <mliska@suse.cz>

PR middle-end/90899
* multiple_target.c (create_dispatcher_calls): Add to comdat
group only if set for ifunc.
2019-07-04  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-07-03  Martin Liska  <mliska@suse.cz>

PR middle-end/90899
* gcc.target/i386/pr90899.c: New test.

From-SVN: r273073

6 years ago[MIPS][Testsuite] Specify msa-fmadd.c abis.
Chenghua Xu [Thu, 4 Jul 2019 02:39:58 +0000 (02:39 +0000)] 
[MIPS][Testsuite] Specify msa-fmadd.c abis.

Backport from mainline for fix msa-fmadd.c.
gcc/testsuite/

        * gcc.target/mips/mips-fmadd.c: Rename to ...
        * gcc.target/mips/mips-fmadd-o32.c: ... Here; add abi=32.
        * gcc.target/mips/mips-fmadd-n64.c: New.

From-SVN: r273035

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

From-SVN: r273030

6 years agoPR libstdc++/91067 fix missing exports for filesystem iterators
Jonathan Wakely [Wed, 3 Jul 2019 21:09:13 +0000 (22:09 +0100)] 
PR libstdc++/91067 fix missing exports for filesystem iterators

The copy assignment operator for recursive_directory_iterator was not
exported despite being needed. The __shared_ptr default constructors are
not needed when compiling with GCC but Clang requires them for -O1.

PR libstdc++/91067
* acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
* configure: Regenerate.
* config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
missing symbols.
* testsuite/27_io/filesystem/iterators/91067.cc: New test.
* testsuite/util/testsuite_abi.cc: Add new symbol version.

From-SVN: r273025

6 years agoFix preprocessor checks for Clang builtins
Jonathan Wakely [Wed, 3 Jul 2019 21:09:08 +0000 (22:09 +0100)] 
Fix preprocessor checks for Clang builtins

Clang seems to define built-ins that start with "__builtin_" as
non-keywords, which means that we need to use __has_builtin to detect
them, not __is_identifier. The built-ins that don't start with
"__builtin_" are keywords, and can only be detected using
__is_identifier and not by __has_builtin.

Backport from mainline
2019-07-02  Jonathan Wakely  <jwakely@redhat.com>

* include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
(_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
instead of __is_identifier to detect Clang support.

From-SVN: r273024

6 years agodwarf2out.c (add_scalar_info): Add back refererence to existing DIE if it has the...
Eric Botcazou [Wed, 3 Jul 2019 12:01:30 +0000 (12:01 +0000)] 
dwarf2out.c (add_scalar_info): Add back refererence to existing DIE if it has the DW_AT_data_member_location...

* dwarf2out.c (add_scalar_info): Add back refererence to existing DIE
if it has the DW_AT_data_member_location attribute.

From-SVN: r273003

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

From-SVN: r272952

6 years agoFix regrename ICE.
Andrew Stubbs [Tue, 2 Jul 2019 13:57:56 +0000 (13:57 +0000)] 
Fix regrename ICE.

2019-07-02  Andrew Stubbs  <ams@codesourcery.com>

Backport from mainline:
gcc/
2019-07-02  Andrew Stubbs  <ams@codesourcery.com>

* config/gcn/gcn.md (movdi_symbol_save_scc): Convert to define_insn
with inlined save and restore.

From-SVN: r272938

6 years agoPR c++/90490 - fix decltype issues in noexcept-specifier.
Marek Polacek [Tue, 2 Jul 2019 00:23:41 +0000 (00:23 +0000)] 
PR c++/90490 - fix decltype issues in noexcept-specifier.

* except.c (build_noexcept_spec): Call
instantiate_non_dependent_expr_sfinae before
build_converted_constant_expr instead of calling
instantiate_non_dependent_expr after it.  Add
processing_template_decl_sentinel.

* g++.dg/cpp0x/noexcept43.C: New test.
* g++.dg/cpp0x/noexcept44.C: New test.

From-SVN: r272918

6 years agoPR c++/60223 - ICE with T{} in non-deduced context.
Marek Polacek [Tue, 2 Jul 2019 00:22:37 +0000 (00:22 +0000)] 
PR c++/60223 - ICE with T{} in non-deduced context.

* pt.c (unify): Allow COMPOUND_LITERAL_P in a non-deduced context.

* g++.dg/cpp0x/nondeduced1.C: New test.
* g++.dg/cpp0x/nondeduced2.C: New test.
* g++.dg/cpp0x/nondeduced3.C: New test.
* g++.dg/cpp0x/nondeduced4.C: New test.

From-SVN: r272917

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

From-SVN: r272915

6 years agore PR middle-end/64242 (Longjmp expansion incorrect)
Eric Botcazou [Mon, 1 Jul 2019 16:27:06 +0000 (16:27 +0000)] 
re PR middle-end/64242 (Longjmp expansion incorrect)

PR middle-end/64242
* config/sparc/sparc.md (nonlocal_goto): Restore frame pointer last.
Add frame clobber and schedule blockage.

From-SVN: r272890

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

From-SVN: r272838

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

From-SVN: r272830

6 years agodecl.c (gnat_to_gnu_entity): Beep up comment on SAVED...
Eric Botcazou [Sat, 29 Jun 2019 09:05:43 +0000 (09:05 +0000)] 
decl.c (gnat_to_gnu_entity): Beep up comment on SAVED...

* gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
and tweak comment on the assertion about the scopes of Itypes.  Do not
skip the regular processing for Itypes that are E_Record_Subtype with
a Cloned_Subtype.  Get the Cloned_Subtype for every E_Record_Subtype
if the type is dummy and hasn't got its own freeze node.
<E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
<E_Access_Subtype>: Save again the DECL of the equivalent type.
(Gigi_Equivalent_Type) <E_Access_Subtype>: New case.

From-SVN: r272823

6 years agotrans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on the main variant of a type...
Eric Botcazou [Sat, 29 Jun 2019 07:38:08 +0000 (07:38 +0000)] 
trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on the main variant of a type, if any.

* gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
the main variant of a type, if any.

From-SVN: r272816

6 years agodecl.c (set_nonaliased_component_on_array_type): Add missing guard for the presence...
Eric Botcazou [Sat, 29 Jun 2019 07:30:57 +0000 (07:30 +0000)] 
decl.c (set_nonaliased_component_on_array_type): Add missing guard for the presence of TYPE_CANONICAL.

* gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
missing guard for the presence of TYPE_CANONICAL.
(set_reverse_storage_order_on_array_type): Likewise.

From-SVN: r272812

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

From-SVN: r272807

6 years agobackport: re PR c++/91024 (-Wimplicit-fallthrough is confused by likely/unlikely...
Jakub Jelinek [Fri, 28 Jun 2019 22:57:16 +0000 (00:57 +0200)] 
backport: re PR c++/91024 (-Wimplicit-fallthrough is confused by likely/unlikely attributes)

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

PR c++/91024
* gimplify.c (collect_fallthrough_labels): Ignore GIMPLE_PREDICT
statements.

* g++.dg/warn/Wimplicit-fallthrough-4.C: New test.

From-SVN: r272804

6 years agobackport: re PR target/90991 (_mm_loadu_ps instrinsic translates to vmovaps in combin...
Jakub Jelinek [Fri, 28 Jun 2019 22:56:27 +0000 (00:56 +0200)] 
backport: re PR target/90991 (_mm_loadu_ps instrinsic translates to vmovaps in combination with _mm512_insertf32x4)

Backported from mainline
2019-06-26  Jakub Jelinek  <jakub@redhat.com>

PR target/90991
* config/i386/sse.md
(*<extract_type>_vinsert<shuffletype><extract_suf>_0): Use vmovupd,
vmovups, vmovdqu, vmovdqu32 or vmovdqu64 instead of the aligned
insns if operands[2] is misaligned_operand.

* gcc.target/i386/avx512dq-pr90991-1.c: New test.

From-SVN: r272803

6 years agobackport: re PR sanitizer/90954 (ICE: combining undefined behavior sanitizer with...
Jakub Jelinek [Fri, 28 Jun 2019 22:55:29 +0000 (00:55 +0200)] 
backport: re PR sanitizer/90954 (ICE: combining undefined behavior sanitizer with openmp)

Backported from mainline
2019-06-25  Jakub Jelinek  <jakub@redhat.com>

PR sanitizer/90954
* c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
to SAVE_EXPR in first operand of a COMPOUND_EXPR.

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

From-SVN: r272802

6 years agobackport: re PR c++/90950 (OpenMP clause handling rejecting references to incomplete...
Jakub Jelinek [Fri, 28 Jun 2019 22:11:03 +0000 (00:11 +0200)] 
backport: re PR c++/90950 (OpenMP clause handling rejecting references to incomplete types in templates)

Backported from mainline
2019-06-21  Jakub Jelinek  <jakub@redhat.com>

PR c++/90950
* semantics.c (finish_omp_clauses): Don't reject references to
incomplete types if processing_template_decl.

* g++.dg/gomp/lastprivate-1.C: New test.

From-SVN: r272801

6 years agobackport: re PR c/90760 (ICE on attributes section and alias in set_section, at symta...
Jakub Jelinek [Fri, 28 Jun 2019 22:10:04 +0000 (00:10 +0200)] 
backport: re PR c/90760 (ICE on attributes section and alias in set_section, at symtab.c:1573)

Backported from mainline
2019-06-12  Jakub Jelinek  <jakub@redhat.com>

PR c/90760
* symtab.c (symtab_node::set_section): Allow being called on aliases
as long as they aren't analyzed yet.

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

From-SVN: r272800

6 years agore PR tree-optimization/90949 (null pointer check removed)
Jeff Law [Fri, 28 Jun 2019 20:21:05 +0000 (14:21 -0600)] 
re PR tree-optimization/90949 (null pointer check removed)

PR tree-optimization/90949
* tree-ssa-copy.c (fini_copy_prop): Use reset_flow_sensitive_info.
* tree-ssanames.c (reset_flow_sensitive_info): Reset non-null state.

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

From-SVN: r272793

6 years agoFix trampoline execution failures on GCN5.
Andrew Stubbs [Fri, 28 Jun 2019 16:37:14 +0000 (16:37 +0000)] 
Fix trampoline execution failures on GCN5.

2019-06-28  Andrew Stubbs  <ams@codesourcery.com>

Backport from mainline:
2019-05-22  Andrew Stubbs  <ams@codesourcery.com>

* config/gcn/gcn.c (gcn_trampoline_init): Call "sorry" on GCN5.

From-SVN: r272788

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

From-SVN: r272773

6 years agoPR libstdc++/85494 use rand_s in std::random_device
Jonathan Wakely [Thu, 27 Jun 2019 11:31:02 +0000 (12:31 +0100)] 
PR libstdc++/85494 use rand_s in std::random_device

This is a minimal fix for the use of a deterministic RNG on mingw-w64,
simply using rand_s unconditionally. The rest of the r271740 changes on
trunk are not included. That means that RDSEED and RDRAND are not
available for mingw-w64 and the token passed to the constructor is
ignored completely.

PR libstdc++/85494 use rand_s in std::random_device
* config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
* src/c++11/cow-string-inst.cc (random_device::_M_init_pretr1)
[_GLIBCXX_USE_CRT_RAND_S]: Do nothing if rand_s will be used.
* src/c++11/random.cc [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s):
Define new function.
(random_device::_M_init_pretr1) [_GLIBCXX_USE_CRT_RAND_S]: Do nothing
if rand_s will be used.
(random_device::_M_getval_pretr1) [_GLIBCXX_USE_CRT_RAND_S]: Use
__winxp_rand_s().
* testsuite/26_numerics/random/random_device/85494.cc: New test.

From-SVN: r272748

6 years agoPR libstdc++/91012 fixfilesystem_error::what() string
Jonathan Wakely [Thu, 27 Jun 2019 10:06:09 +0000 (11:06 +0100)] 
PR libstdc++/91012 fixfilesystem_error::what() string

When I refactored the filesystem_error code I changed it to only use the
constructor parameter in the what() string, instead of the string
returned by system_error::what(). That meant it no longer included the
description of the error_code that system_error adds. This restores the
previous behaivour, as encouraged by the standard ("Implementations
should include the system_error::what() string and the pathnames of
path1 and path2 in the native format in the returned string").

PR libstdc++/91012
* src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
for the what_arg parameters.
(filesystem_error::filesystem_error): Pass system_error::what() to
the _Impl constructor.
* testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
filesystem_error::what() contains system_error::what().

From-SVN: r272741

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

From-SVN: r272722

6 years ago[PR 90939] Remove outdated assert in ipcp_bits_lattice::meet_with
Martin Jambor [Wed, 26 Jun 2019 12:04:08 +0000 (14:04 +0200)] 
[PR 90939] Remove outdated assert in ipcp_bits_lattice::meet_with

2019-06-26  Martin Jambor  <mjambor@suse.cz>

PR ipa/90939
* ipa-cp.c (ipcp_bits_lattice::meet_with): Remove assert.

testsuite/
* g++.dg/lto/pr90939_[01].C: New test.

From-SVN: r272689

6 years agoFix sanitizer_common/sanitizer_posix_libcdep.cc compilation on Solaris 11.5
Rainer Orth [Wed, 26 Jun 2019 10:49:15 +0000 (10:49 +0000)] 
Fix sanitizer_common/sanitizer_posix_libcdep.cc compilation on Solaris 11.5

* sanitizer_common/sanitizer_posix_libcdep.cc: Cherry-pick
compiler-rt revision 363778.

From-SVN: r272686

6 years agoRemove support for alternative Solaris 11.4 ld -V output
Rainer Orth [Wed, 26 Jun 2019 09:15:46 +0000 (09:15 +0000)] 
Remove support for alternative Solaris 11.4 ld -V output

Backport from mainline
2019-06-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

* configure.ac (ld_vers) <*-*-solaris2*>: Remove support for
alternative Solaris 11.4 format.
* configure: Regenerate.

From-SVN: r272676

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

From-SVN: r272664

6 years ago[ARC] Backport fix PR89838
Claudiu Zissulescu [Tue, 25 Jun 2019 11:02:21 +0000 (13:02 +0200)] 
[ARC] Backport fix PR89838

gcc/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

        * config/arc/arc.c (arc_symbol_binds_local_p): New function.
        (arc_legitimize_pic_address): Simplify and cleanup the function.
        (SYMBOLIC_CONST): Remove.
        (prepare_pic_move): Likewise.
        (prepare_move_operands): Handle complex mov cases here.
        (arc_legitimize_address_0): Remove call to
        arc_legitimize_pic_address.
        (arc_legitimize_address): Remove call to
        arc_legitimize_tls_address.
        * config/arc/arc.md (movqi_insn): Allow Cm3 match.
        (movhi_insn): Likewise.

/gcc/testsuite
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com

From-SVN: r272645

6 years agoGCN: Wait for exit value to write before exiting.
Andrew Stubbs [Tue, 25 Jun 2019 09:47:15 +0000 (09:47 +0000)] 
GCN: Wait for exit value to write before exiting.

2019-06-25  Andrew Stubbs  <ams@codesourcery.com>

Backport from mainline
2019-05-24  Andrew Stubbs  <ams@codesourcery.com>

gcc/
* config/gcn/gcn-run.c (main): Set a non-zero return value if the
kernel does not exit cleanly.
* config/gcn/gcn.md (gcn_return): Insert s_waitcnt before s_dcache_wb.

From-SVN: r272642

6 years agoFix 64-bit addition in prologue.
Andrew Stubbs [Tue, 25 Jun 2019 09:47:09 +0000 (09:47 +0000)] 
Fix 64-bit addition in prologue.

2019-06-25  Andrew Stubbs  <ams@codesourcery.com>

Backport from mainline
2019-05-24  Andrew Stubbs  <ams@codesourcery.com>

gcc/
* config/gcn/gcn.c (gcn_expand_prologue): Use gen_addsi3_scalar_carry
for lo-part.

From-SVN: r272641

6 years agore PR tree-optimization/90930 (Excessive memory consumption)
Richard Biener [Tue, 25 Jun 2019 07:30:44 +0000 (07:30 +0000)] 
re PR tree-optimization/90930 (Excessive memory consumption)

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

PR tree-optimization/90930
* tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Set visited
flag on new stmts to avoid re-processing them.

From-SVN: r272636

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

From-SVN: r272631

6 years agore PR tree-optimization/90930 (Excessive memory consumption)
Richard Biener [Mon, 24 Jun 2019 17:19:36 +0000 (17:19 +0000)] 
re PR tree-optimization/90930 (Excessive memory consumption)

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

PR tree-optimization/90930
PR tree-optimization/90316
* tree-ssa-alias.c (walk_non_aliased_vuses): Add missing
decrement of limit.

From-SVN: r272622

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

From-SVN: r272612

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

From-SVN: r272598

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

From-SVN: r272582

6 years agobackport: re PR fortran/90937 (ICE: in gfc_get_symbol_decl, at fortran/trans-decl...
Thomas Koenig [Fri, 21 Jun 2019 19:28:54 +0000 (19:28 +0000)] 
backport: re PR fortran/90937 (ICE: in gfc_get_symbol_decl, at fortran/trans-decl.c:1538)

2019-06-21  Thomas Koenig  <tkoenig@gcc.gnu.org>

Backport from trunk
PR fortran/90937
* trans-types.c (get_formal_from_actual_arglist): Get symbol from
current namespace so it will be freed later.  If symbol is of type
character, get an empty character length.

2019-06-21  Thomas Koenig  <tkoenig@gcc.gnu.org>

Backport from trunk
PR fortran/90937
* gfortran.dg/external_procedure_4.f90: New test.

From-SVN: r272564

6 years agoPR libstdc++/90920 restore previous checks for empty ranges
Jonathan Wakely [Fri, 21 Jun 2019 17:37:07 +0000 (18:37 +0100)] 
PR libstdc++/90920 restore previous checks for empty ranges

The change in r263433 broke the contract of the __rotate functions, by no
longer accepting empty ranges. That means that callers which inlined the
old version of std::rotate (without checks) that end up linking to a new
definition of std::__rotate (also without checks) could perform a divide
by zero and crash.

This restores the old contract of the __rotate overloads.

Backport from mainline
2019-06-19  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/90920 partially revert r263433
* include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
(rotate): Remove checks.
* testsuite/25_algorithms/rotate/90920.cc: New test.

From-SVN: r272558

6 years agobackport: re PR fortran/90290 (-std=f2008 should reject non-constant stop and error...
Steven G. Kargl [Fri, 21 Jun 2019 00:54:28 +0000 (00:54 +0000)] 
backport: re PR fortran/90290 (-std=f2008 should reject non-constant stop and error stop codes)

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
PR fortran/90290
* match.c (gfc_match_stopcode): Check F2008 condition on stop code.

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
PR fortran/90290
* gfortran.dg/pr90290.f90: New test.

From-SVN: r272541

6 years agobackport: re PR fortran/90002 (ICE: free_expr0(): Bad expr type)
Steven G. Kargl [Fri, 21 Jun 2019 00:38:13 +0000 (00:38 +0000)] 
backport: re PR fortran/90002 (ICE: free_expr0(): Bad expr type)

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
PR fortran/90002
* array.c (gfc_free_array_spec): When freeing an array-spec, avoid
an ICE for assumed-shape coarrays

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
PR fortran/90002
* gfortran.dg/pr90002.f90: New test.

From-SVN: r272540

6 years agobackport: re PR fortran/89344 (uncaught programmer error: polymorphic variable is...
Steven G. Kargl [Fri, 21 Jun 2019 00:24:53 +0000 (00:24 +0000)] 
backport: re PR fortran/89344 (uncaught programmer error:  polymorphic variable is INTENT(IN) but assigned to without error)

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
PR fortran/89344
* expr.c (gfc_check_vardef_context): Check for INTENT(IN) variable
in SELECT TYPE construct.

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
PR fortran/89344
* gfortran.dg/pr89344.f90: New test.

From-SVN: r272539

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

From-SVN: r272537

6 years agobackport: re PR fortran/87907 (ICE in resolve_contained_fntype, at fortran/resolve...
Steven G. Kargl [Fri, 21 Jun 2019 00:12:37 +0000 (00:12 +0000)] 
backport: re PR fortran/87907 (ICE in resolve_contained_fntype, at fortran/resolve.c:587)

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
PR fortran/87907
* resolve.c (resolve_contained_fntype): Do not dereference a NULL
pointer.

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
PR fortran/87907
* gfortran.dg/pr87907.f90: New testcase.

From-SVN: r272534

6 years agobackport: re PR fortran/86587 (Derived-type with attributes BIND(C) and PRIVATE raise...
Steven G. Kargl [Fri, 21 Jun 2019 00:01:23 +0000 (00:01 +0000)] 
backport: re PR fortran/86587 (Derived-type with attributes BIND(C) and PRIVATE raises an error but standard accepts it)

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
PR fortran/86587
* symbol.c (verify_bind_c_derived_type): Remove erroneous error
checking for BIND(C) and PRIVATE attributes.

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
PR fortran/86587
* gfortran.dg/pr86587.f90: New test.

From-SVN: r272533

6 years agobackport: re PR fortran/77632 ([F08] Pointer initialisation does not quite work with...
Steven G. Kargl [Thu, 20 Jun 2019 23:50:54 +0000 (23:50 +0000)] 
backport: re PR fortran/77632 ([F08] Pointer initialisation does not quite work with arrays)

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
PR fortran/77632
* /decl.c (variable_decl): Mark a variable that is a target in pointer
initialization when in PROGRAM, MODULE, or SUBMODULE scope with an
implicit save.

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
PR fortran/77632
* gfortran.dg/pr77632_1.f90: New test.

From-SVN: r272532

6 years agobackport: re PR fortran/69499 ([F03] ICE-on-invalid on combining select type with...
Steven G. Kargl [Thu, 20 Jun 2019 23:39:29 +0000 (23:39 +0000)] 
backport: re PR fortran/69499 ([F03] ICE-on-invalid on combining select type with wrong statement)

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
PR fortran/69499
* match.c (gfc_match_select_type):  SELECT TYPE is an executable
statement, and cannot appear in MODULE or SUBMODULE scope.

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
PR fortran/69499
* gfortran.dg/pr69499.f90: New test.
* gfortran.dg/module_error_1.f90: Update dg-error string.

From-SVN: r272531

6 years agobackport: re PR fortran/69398 ([OOP] ICE on class with duplicate dimension attribute...
Steven G. Kargl [Thu, 20 Jun 2019 23:27:13 +0000 (23:27 +0000)] 
backport: re PR fortran/69398 ([OOP] ICE on class with duplicate dimension attribute specified)

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
PR fortran/69398
* decl.c (attr_decl): Check for duplicate DIMENSION attribute for a
CLASS entity.

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
PR fortran/69398
* gfortran.dg/pr69398.f90: New test.

From-SVN: r272530

6 years agobackport: re PR fortran/68544 (ICE trying to pass derived type constructor as a function)
Steven G. Kargl [Thu, 20 Jun 2019 23:15:32 +0000 (23:15 +0000)] 
backport: re PR fortran/68544 (ICE trying to pass derived type constructor as a function)

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
PR fortran/68544
* resolve.c (is_dt_name): New function to compare symbol name against
list of derived types.
(resolve_actual_arglist): Use it to find wrong code.

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
PR fortran/68544
* gfortran.dg/pr68544.f90: New test.
* gfortran.dg/pr85687.f90: Modify test for new error message.

From-SVN: r272529

6 years agobackport: arith.c (arith_power): Rework overflow of an integer to an integer exponent.
Steven G. Kargl [Thu, 20 Jun 2019 22:58:56 +0000 (22:58 +0000)] 
backport: arith.c (arith_power): Rework overflow of an integer to an integer exponent.

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
* arith.c (arith_power): Rework overflow of an integer to an integer
exponent.

2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>

Backport from mainline
* gfortran.dg/integer_exponentiation_4.f90: Update test.
* gfortran.dg/integer_exponentiation_5.F90: Ditto.
* gfortran.dg/no_range_check_1.f90: Ditto.

From-SVN: r272528

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

From-SVN: r272494

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

From-SVN: r272463

6 years agobackport: re PR fortran/90577 (FAIL: gfortran.dg/lrshift_1.f90 with -O(2|3) and ...
Harald Anlauf [Tue, 18 Jun 2019 20:21:47 +0000 (20:21 +0000)] 
backport: re PR fortran/90577 (FAIL: gfortran.dg/lrshift_1.f90 with -O(2|3) and -flto)

2019-06-18  Harald Anlauf  <anlauf@gmx.de>

Backport from mainline
2019-06-14  Harald Anlauf  <anlauf@gmx.de>

PR fortran/90577
PR fortran/90578
* trans-intrinsic.c (gfc_conv_intrinsic_shift): Properly
distinguish logical/arithmetic shifts.
* intrinsic.texi: Update documentation for SHIFTR/SHIFTL/SHIFTA
(Fortran 2008) and LSHIFT/RSHIFT (GNU extensions).

PR fortran/90577
PR fortran/90578
* gfortran.dg/lrshift_1.f90: Adjust testcase.
* gfortran.dg/shiftalr_3.f90: New testcase.

From-SVN: r272437

6 years agore PR ada/80590 (non-bootstrap build failure of Ada runtime)
Arnaud Charlet [Tue, 18 Jun 2019 11:44:58 +0000 (11:44 +0000)] 
re PR ada/80590 (non-bootstrap build failure of Ada runtime)

PR ada/80590

* sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
during normal processing.

From-SVN: r272416

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

From-SVN: r272403

6 years agomips.c (mips_expand_builtin_insn): Swap the 1st and 3rd operands of the fmadd/fmsub...
Jeff Law [Mon, 17 Jun 2019 17:27:30 +0000 (11:27 -0600)] 
mips.c (mips_expand_builtin_insn): Swap the 1st and 3rd operands of the fmadd/fmsub/maddv builtin.

* config/mips/mips.c (mips_expand_builtin_insn): Swap the 1st
and 3rd operands of the fmadd/fmsub/maddv builtin.

* gcc.target/mips/msa-fmadd.c: New.

From-SVN: r272392

6 years agoPR libstdc++/90281 Fix string conversions for filesystem::path
Jonathan Wakely [Mon, 17 Jun 2019 15:03:46 +0000 (16:03 +0100)] 
PR libstdc++/90281 Fix string conversions for filesystem::path

Fix several bugs in the encoding conversions for filesystem::path that
prevent conversion of Unicode characters outside the Basic Multilingual
Plane, and prevent returning basic_string specializations with
alternative allocator types.

The std::codecvt_utf8 class template is not suitable for UTF-16
conversions because it uses UCS-2 instead. For conversions between UTF-8
and UTF-16 either std::codecvt<C, char, mbstate> or
codecvt_utf8_utf16<C> must be used.

The __str_codecvt_in and __str_codecvt_out utilities do not
return false on a partial conversion (e.g. for invalid or incomplete
Unicode input). Add new helpers that treat partial conversions as
errors, and use them for all filesystem::path conversions.

PR libstdc++/90281 Fix string conversions for filesystem::path
* include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
__str_codecvt_in_all to fail for partial conversions and throw on
error.
[!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
(path::_Cvt<char8_t>): Add explicit specialization.
[_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
overloads.
[_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
if-constexpr instead of dispatching to _S_wconvert. Use codecvt
instead of codecvt_utf8. Use __str_codecvt_in_all and
__str_codecvt_out_all.
[!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
(path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
after converting to UTF-8.
(path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
__str_codecvt_in_all.
(path::string): Fix initialization of string types with different
allocators.
(path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
* include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
runtime conditions.
(__str_codecvt_out_all, __str_codecvt_in_all): New functions that
return false for partial conversions.
* include/experimental/bits/fs_path.h (u8path):
[_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
[_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
instead of codecvt_utf8. Use __str_codecvt_in_all and
__str_codecvt_out_all.
[!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
(path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
(path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
__str_codecvt_in_all.
(path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
* src/c++17/fs_path.cc (path::_S_convert_loc): Use
__str_codecvt_in_all.
* src/filesystem/path.cc (path::_S_convert_loc): Likewise.
* testsuite/27_io/filesystem/path/construct/90281.cc: New test.
* testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
* testsuite/27_io/filesystem/path/native/string.cc: Test with empty
strings and with Unicode characters outside the basic multilingual
plane.
* testsuite/27_io/filesystem/path/native/alloc.cc: New test.
* testsuite/experimental/filesystem/path/construct/90281.cc: New test.
* testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
* testsuite/experimental/filesystem/path/native/alloc.cc: New test.
* testsuite/experimental/filesystem/path/native/string.cc: Test with
empty strings and with Unicode characters outside the basic
multilingual plane.

From-SVN: r272389

6 years agore PR ada/80590 (non-bootstrap build failure of Ada runtime)
Arnaud Charlet [Mon, 17 Jun 2019 07:35:02 +0000 (07:35 +0000)] 
re PR ada/80590 (non-bootstrap build failure of Ada runtime)

PR ada/80590

* exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
conditions to avoid a unnecessary exception propagation in the default
case.

From-SVN: r272374

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

From-SVN: r272369

6 years agore PR middle-end/64242 (Longjmp expansion incorrect)
John David Anglin [Sun, 16 Jun 2019 21:44:08 +0000 (21:44 +0000)] 
re PR middle-end/64242 (Longjmp expansion incorrect)

PR middle-end/64242
* config/pa/pa.md (nonlocal_goto): Restore frame pointer last.  Add
frame clobbers and schedule block.
(builtin_longjmp): Likewise.

From-SVN: r272362