]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
5 years agoFortran] PR 92208 don't use function-result dummy variable as actual argument
Tobias Burnus [Mon, 4 Nov 2019 15:07:19 +0000 (15:07 +0000)] 
Fortran] PR 92208 don't use function-result dummy variable as actual argument

        gcc/fortran/
        Backported from mainline
        2019-10-30  Tobias Burnus  <tobias@codesourcery.com>

        PR fortran/92208
        * trans-array.c (gfc_conv_array_parameter): Only copy
        string-length backend_decl if expression is not a function.

        gcc/testsuite/
        Backported from mainline
        2019-10-30  Tobias Burnus  <tobias@codesourcery.com>

        PR fortran/92208
        * gfortran.dg/pr92208.f90: New.

From-SVN: r277783

5 years agoBackport Fortran BIND(C) fixes
Tobias Burnus [Mon, 4 Nov 2019 14:14:43 +0000 (14:14 +0000)] 
Backport Fortran BIND(C) fixes

        gcc/fortran/
        Backport from mainline
        2019-10-31  Tobias Burnus  <tobias@codesourcery.com>

        PR fortran/92284.
        * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Free CFI descriptor
        at the end; partial revised revert of Rev. 277502.

        gcc/testsuite/
        Backport from mainline
        2019-10-31  Jakub Jelinek  <jakub@redhat.com>

        PR fortran/92284
        * gfortran.dg/bind_c_array_params_3_aux.c: Include
        ../../../libgfortran/ISO_Fortran_binding.h rather than
        ISO_Fortran_binding.h.

        2019-10-31  Tobias Burnus  <tobias@codesourcery.com>

        PR fortran/92284
        * gfortran.dg/bind-c-intent-out.f90: Update expected dump;
        extend comment.
        * gfortran.dg/bind_c_array_params_3.f90: New.
        * gfortran.dg/bind_c_array_params_3_aux.c: New.

        2019-10-31  Tobias Burnus  <tobias@codesourcery.com>

        PR fortran/92277
        * fortran.dg/pr92277.f90: New.

From-SVN: r277781

5 years agoDaily bump.
GCC Administrator [Mon, 4 Nov 2019 00:16:13 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r277763

5 years agoDaily bump.
GCC Administrator [Sun, 3 Nov 2019 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r277748

5 years agoDaily bump.
GCC Administrator [Sat, 2 Nov 2019 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r277739

5 years agobackport: pa.c (pa_output_call): Remove 64-bit sibcall sequence.
John David Anglin [Fri, 1 Nov 2019 23:35:06 +0000 (23:35 +0000)] 
backport: pa.c (pa_output_call): Remove 64-bit sibcall sequence.

Backport from mainline
2019-10-03  John David Anglin  <danglin@gcc.gnu.org>

* config/pa/pa.c (pa_output_call): Remove 64-bit sibcall sequence.
(pa_attr_length_call): Adjust length for 64-bit plabel sequence.

From-SVN: r277736

5 years agobackport: pa.h (MAX_PCREL17F_OFFSET): Adjust.
John David Anglin [Fri, 1 Nov 2019 23:24:54 +0000 (23:24 +0000)] 
backport: pa.h (MAX_PCREL17F_OFFSET): Adjust.

Backport from mainline
2019-10-03  John David Anglin  <danglin@gcc.gnu.org>

* config/pa/pa.h (MAX_PCREL17F_OFFSET): Adjust.

From-SVN: r277731

5 years agoDaily bump.
GCC Administrator [Fri, 1 Nov 2019 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r277702

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

From-SVN: r277652

5 years ago[testsuite] Make the Wnonnull test independent of system headers.
Iain Sandoe [Wed, 30 Oct 2019 20:54:16 +0000 (20:54 +0000)] 
[testsuite] Make the Wnonnull test independent of system headers.

This backports two patches that fix failure of Wnonnull test on some targets.

277280 To avoid the result of this test depending on the implementation of
the system 'string.h', provide prototypes for the two functions used
in the test.  This generalises the fix from 277202.

277202 was the initial fix for Wnonnull on Darwin.

gcc/testsuite/

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

Backport from mainline.
2019-10-22  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.dg/Wnonnull.c: Provide prototypes for strlen and memcpy.
Use __SIZE_TYPE__ instead of size_t.

Backport from mainline.
2019-10-19  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.dg/Wnonnull.c: Add attributed function declarations for
memcpy and strlen for Darwin.

From-SVN: r277647

5 years ago[Darwin, machopic] Back out part of PR71767 fix.
Iain Sandoe [Wed, 30 Oct 2019 20:48:44 +0000 (20:48 +0000)] 
[Darwin, machopic] Back out part of PR71767 fix.

This is part of making our codegen match what the system tools produce.

We applied a conservative, but fairly large, hammer to fix 71767.
However, ideally, we want minimise the number of symbols visible to
ld64 and to match the cases emitted by clang (since that's what ld64
is expecting). Now we've improved the handling of indirections, we
can make the indirection symbols local when they are in the regular
non-lazy symbol pointers section. We will continue to make any
indirections in the data section visible (since right now we have no
way to track if a given symbol follows a weak global).
This change makes no difference to handling of labels for constants
(to be revised in a future patch).

There's a mechanical change to a number of tests (allowing 'l' or 'L'
as the indirection symbol prefix).

gcc/

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

Backport from mainline
2019-10-13  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.c (machopic_indirection_name): Rework the
function to emit linker-visible symbols only for indirections
in the data section.  Clean up the code and update comments.

gcc/testsuite/

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

Backport from mainline.
2019-10-13  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/i386/indirect-thunk-1.c: Allow 'l' or 'L' in
indirection label prefix, for 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-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-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-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/pr32219-2.c: Likewise.
* gcc.target/i386/pr32219-3.c: Likewise.
* gcc.target/i386/pr32219-4.c: Likewise.
* gcc.target/i386/pr32219-7.c: Likewise.
* gcc.target/i386/pr32219-8.c: Likewise.
* gcc.target/i386/ret-thunk-14.c: Likewise.
* gcc.target/i386/ret-thunk-15.c: Likewise.
* gcc.target/i386/ret-thunk-9.c: Likewise.

From-SVN: r277646

5 years ago[Darwin] Fix Objective-C NeXT ABI version check diagnostics.
Iain Sandoe [Wed, 30 Oct 2019 20:42:56 +0000 (20:42 +0000)] 
[Darwin] Fix Objective-C NeXT ABI version check diagnostics.

This fixes build errors when used with newer GCC and corrects a mistake
in the checking of ABI versions.

276768 We were missing a check for the case that user's ABI was > 2 and the
codegen was for 64 bit.

276635 Fix some format-related build warnings.

This fixes two error messages to avoid punctuation and contracted
negations.

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

Backport from mainline
2019-10-09  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.c (darwin_override_options): Make the check for
Objective-C ABI version more specific for 64bit code.

Backport from mainline
2019-10-06  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.c (darwin_override_options): Adjust objective-c
ABI version error messages to avoid punctuation and contracted
negations.

From-SVN: r277645

5 years ago[Darwin] Some TLC for older Darwin versions.
Iain Sandoe [Wed, 30 Oct 2019 20:38:47 +0000 (20:38 +0000)] 
[Darwin] Some TLC for older Darwin versions.

This is part 3 of build fixes for older Darwin versions (and will also
fix testsuite complaints about linkage with objects that are built for
an newer OS version than is being built, when used with a modern linker).

The library handling and some of the options for creating the crts for
the older PPC Darwin versions had bit-rotted somewhat. This adjusts the
build criteria for the crts to avoid newer ld64 versions warnings about
mismatches in build and object versions.

Added to some of the comments that it is documented why the specs are as
they are.

gcc/

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

Backport from mainline
2019-07-03  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.h (REAL_LIBGCC_SPEC): Adjust for earlier Darwin.
(STARTFILE_SPEC): Split crt3 into a separate spec.
(DARWIN_EXTRA_SPECS): Add crt2 and crt3 spec.
(DARWIN_CRT2_SPEC): New.
(DARWIN_CRT3_SPEC): New.
(MIN_LD64_OMIT_STUBS): Revise to 62.1.
* config/rs6000/darwin.h (DARWIN_CRT2_SPEC): Revise conditions.
(DARWIN_CRT3_SPEC): New.

libgcc/

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

Backport from mainline.
2019-07-03  Iain Sandoe  <iain@sandoe.co.uk>

* config.host (powerpc-*-darwin*,powerpc64-*-darwin*): Revise crt
list.
* config/rs6000/t-darwin: Build crt3_2 for older systems.  Revise
mmacosx-version-min for crts to run across all system versions.
* config/rs6000/t-darwin64 (LIB2ADD): Remove.
* config/t-darwin: Revise mmacosx-version-min for crts to run across
system versions >= 10.4.

From-SVN: r277644

5 years ago[Darwin, PPC] Move the out of line register save/restore to an endfile.
Iain Sandoe [Wed, 30 Oct 2019 20:25:33 +0000 (20:25 +0000)] 
[Darwin, PPC] Move the out of line register save/restore to an endfile.

Part 2 of fixes to build and link conditions for older Darwin versions.

We have been including these endfiles in libgcc, which means that we have to
append -lgcc even when using shared libgcc.  In preparation for revision of
libgcc split this into an endfile.  Build the new version.

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

Backport from mainline.
2019-06-25  Iain Sandoe  <iain@sandoe.co.uk>

* config.host: Add libef_ppc.a to the extra files for powerpc-darwin.
* config/rs6000/t-darwin: (PPC_ENDFILE_SRC, PPC_ENDFILE_OBJS): New.
Build objects for the out of line save/restore register functions
so that they can be used for any supported Darwin version.
* config/t-darwin: Default the build Darwin version to Darwin8
(MacOS 10.4).

From-SVN: r277642

5 years ago[Darwin, PPC] Move the out of line register save/restore to an endfile.
Iain Sandoe [Wed, 30 Oct 2019 20:12:17 +0000 (20:12 +0000)] 
[Darwin, PPC] Move the out of line register save/restore to an endfile.

Part 1 of fixes to build and link conditions for older Darwin versions.

We have been including these endfiles in libgcc, which means that we have to
append -lgcc even when using shared libgcc.  In preparation for revision of
libgcc split this into an endfile.

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

Backport from mainline
2019-06-27  Iain Sandoe  <iain@sandoe.co.uk>

* config/rs6000/darwin.h (ENDFILE_SPEC): Correct whitespace in the
spec.

Backport from mainline
2019-06-25  Iain Sandoe  <iain@sandoe.co.uk>

* config/rs6000/darwin.h (ENDFILE_SPEC): New.

From-SVN: r277641

5 years ago[Darwin] The need for FDE symbols is dependent on linker used, not OS rev.
Iain Sandoe [Wed, 30 Oct 2019 20:05:32 +0000 (20:05 +0000)] 
[Darwin] The need for FDE symbols is dependent on linker used, not OS rev.

For very old toolchains, the compiler generated extra symbols that mark the
start of each FDE.  We no longer need this (since xcode 3 era) - so, for
compatibility with newer linkers, omit this when it is not required.

Since we have detection of the linker version, we can use that directly to
determine if support is needed.

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

Backport from mainline
2019-06-18  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.c (darwin_emit_unwind_label): New default to false.
(darwin_override_options): Set darwin_emit_unwind_label as needed.

From-SVN: r277640

5 years ago[Darwin] Use of symbol stubs should depend on the linker in use.
Iain Sandoe [Wed, 30 Oct 2019 19:56:41 +0000 (19:56 +0000)] 
[Darwin] Use of symbol stubs should depend on the linker in use.

This is a combination of two patches that prevents a bootstrap fail when
a modern assembler/linker pair are used that don't support the JBSR reloc
(but don't require it for long calls).

272356 The need for picsym stubs is dependent on linker used, not OS rev.

For very old toolchains, the compiler generated pic symbol stubs that
provide the necessary indirections. We no longer need this (since xcode
3 era) and it's more efficient for the linker to make one stub when it
knows a symbol is needed that for us to emit them speculatively in every
object.

Our current codegen is making the assumption that a specific OS version
uses a specific linker version - and therefore the presence of support
could be based on the target OS rev. Of course, that's way too simplistic
(most likely bogus for cross-toolchains) and we want to make things explict.

Since we have detection of the linker version, we can use that directly
(A config test for support for stub-less linking might also be feasible
but much more involved).

Finally, should the user wish to generate code that caters for export to
use in an environment with an older toolchain, the generation of stubs
can be forced from the command line.

In addition to the points above, branch islanding and a long branch opt
for PowerPC Darwin has become conflated with the emission of these stubs
(which is confusing, and will be rectified in a following patch).

274397 There is no need to distinguish PIC/non-PIC symbol stubs.

So we can use a single flag for both.

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

Backport from mainline
2019-08-13 Iain Sandoe <iain@sandoe.co.uk>

* config/darwin.c (machopic_indirect_call_target): Rename symbol stub
flag.
(darwin_override_options): Likewise.
* config/darwin.h: Likewise.
* config/darwin.opt: Likewise.
* config/i386/i386.c (output_pic_addr_const): Likewise.
* config/rs6000/darwin.h: Likewise.
* config/rs6000/rs6000.c (rs6000_call_darwin_1): Likewise.
* config/i386/darwin.h (TARGET_MACHO_PICSYM_STUBS): Rename to ...
... this TARGET_MACHO_SYMBOL_STUBS.
(FUNCTION_PROFILER):Likewise.
* config/i386/i386.h: Likewise.

Backport from mainline
2019-06-16  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.c (machopic_indirect_call_target): Use renamed
darwin_picsymbol_stubs to decide on output.
(darwin_override_options): Handle darwin_picsymbol_stubs.
* config/darwin.h (MIN_LD64_OMIT_STUBS): New.
(LD64_VERSION): Revise default.
* config/darwin.opt: (mpic-symbol-stubs): New option.
(darwin_picsymbol_stubs): New variable.
* config/i386/darwin.h (TARGET_MACHO_BRANCH_ISLANDS):
rename to TARGET_MACHO_PICSYM_STUBS.
* config/i386/i386.c (output_pic_addr_const): Likewise.
* config/i386/i386.h Likewise.
* config/rs6000/darwin.h: Likewise.
* config/rs6000/rs6000.c (rs6000_call_darwin_1): Use renamed
darwin_picsymbol_stubs.

From-SVN: r277638

5 years agoBackport fix for PR89245
Dragan Mladjenovic [Wed, 30 Oct 2019 15:12:05 +0000 (15:12 +0000)] 
Backport fix for PR89245

gcc/ChangeLog:

2019-10-30  Dragan Mladjenovic  <dmladjenovic@wavecomp.com>

Backport from mainline
2019-07-09  Dragan Mladjenovic  <dmladjenovic@wavecomp.com>

* cfgcleanup.c (old_insns_match_p): Check if used hard regs set is equal
for both call instructions.

gcc/testsuite/ChangeLog:

2019-10-30  Dragan Mladjenovic  <dmladjenovic@wavecomp.com>

Backport from mainline
2019-07-09  Dragan Mladjenovic  <dmladjenovic@wavecomp.com>

* gcc.target/mips/cfgcleanup-jalr1.c: New test.
* gcc.target/mips/cfgcleanup-jalr2.c: New test.
* gcc.target/mips/cfgcleanup-jalr3.c: New test.

From-SVN: r277625

5 years ago[LIBPHOBOS] Fix multi-lib RUNTESTFLAGS handling
Thomas Schwinge [Wed, 30 Oct 2019 11:51:15 +0000 (12:51 +0100)] 
[LIBPHOBOS] Fix multi-lib RUNTESTFLAGS handling

Testing libphobos fails for multi-lib configs:

$ make check-target-libphobos RUNTESTFLAGS="--target_board=unix\{-m32,\}"

fails for every 32bit execution, because the host libgcc_s.so is used which
is not the correct version:

spawn [open ...]
./test_aa.exe: /lib/i386-linux-gnu/libgcc_s.so.1: version `GCC_7.0.0' not found (required by ./test_aa.exe)
FAIL: libphobos.aa/test_aa.d execution test

This can be fixed by adding a few lines from libstdc++/testsuite/lib/libstdc++.exp
to libphobos/testsuite/lib/libphobos.exp

Backport trunk r275332:

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

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

From-SVN: r277611

5 years agoAvoid '-Wmaybe-uninitialized' diagnostic in 'gcc/dwarf2out.c'
Thomas Schwinge [Wed, 30 Oct 2019 10:50:58 +0000 (11:50 +0100)] 
Avoid '-Wmaybe-uninitialized' diagnostic in 'gcc/dwarf2out.c'

With '--enable-checking=yes,extra,rtl':

    In file included from [...]/source-gcc/gcc/coretypes.h:433,
                     from [...]/source-gcc/gcc/dwarf2out.c:60:
    [...]/source-gcc/gcc/machmode.h: In function 'dw_loc_descr_node* mem_loc_descriptor(rtx, machine_mode, machine_mode, var_init_status)':
    [...]/source-gcc/gcc/machmode.h:520:42: error: 'int_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      520 |    ? mode_size_inline (mode) : mode_size[mode]);
          |                                          ^~~~
    [...]/source-gcc/gcc/dwarf2out.c:15464:19: note: 'int_mode' was declared here
    15464 |   scalar_int_mode int_mode, inner_mode, op1_mode;
          |                   ^~~~~~~~
    cc1plus: all warnings being treated as errors
    make[3]: *** [dwarf2out.o] Error 1

Backport trunk r270903.

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

* dwarf2out.c (mem_loc_descriptor): Initialize int_mode.

From-SVN: r277608

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

From-SVN: r277598

5 years agore PR c++/92201 (ICE: ‘verify_gimple’ failed with -std=c++2a)
Jakub Jelinek [Tue, 29 Oct 2019 21:09:21 +0000 (22:09 +0100)] 
re PR c++/92201 (ICE: ‘verify_gimple’ failed with -std=c++2a)

PR c++/92201
* cp-gimplify.c (cp_gimplify_expr): If gimplify_to_rvalue changes the
function pointer type, re-add cast to the original one.

* g++.dg/other/pr92201.C: New test.

From-SVN: r277594

5 years agoDaily bump.
GCC Administrator [Tue, 29 Oct 2019 00:16:47 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r277549

5 years agore PR fortran/91926 (assumed rank optional)
Paul Thomas [Mon, 28 Oct 2019 18:28:48 +0000 (18:28 +0000)] 
re PR fortran/91926 (assumed rank optional)

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

Backport from trunk
PR fortran/91926
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Correct the
assignment of the attribute field to account correctly for an
assumed shape dummy. Assign separately to the gfc and cfi
descriptors since the atribute can be different. Add branch to
correctly handle missing optional dummies.

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

Backport from trunk
PR fortran/91926
* gfortran.dg/ISO_Fortran_binding_13.f90 : New test.
* gfortran.dg/ISO_Fortran_binding_13.c : Additional source.
* gfortran.dg/ISO_Fortran_binding_14.f90 : New test.

From-SVN: r277531

5 years agobackport: re PR target/70010 (powerpc: -flto forgets 'no-vsx' function attributes)
Jiufu Guo [Mon, 28 Oct 2019 14:23:26 +0000 (14:23 +0000)] 
backport: re PR target/70010 (powerpc: -flto forgets 'no-vsx' function attributes)

Backport from mainline

PR target/70010
* gcc.target/powerpc/pr70010.c: Add -Wno-psabi.
* gcc.target/powerpc/pr70010-1.c: Require LTO.
* gcc.target/powerpc/pr70010-2.c: Require LTO.

From-SVN: r277521

5 years agore PR target/92225 (ice in gen_smaxv2di3, at config/i386/sse.md:12225)
Uros Bizjak [Mon, 28 Oct 2019 14:16:50 +0000 (15:16 +0100)] 
re PR target/92225 (ice in gen_smaxv2di3, at config/i386/sse.md:12225)

PR target/92225
* config/i386/sse.md (REDUC_SSE_SMINMAX_MODE): Use TARGET_SSE4_2
condition for V2DImode.

testsuite/ChangeLog:

PR target/92225
* gcc.target/i386/pr92225.c: New test.

From-SVN: r277520

5 years agoMove jump threading before reload
Ilya Leoshkevich [Mon, 28 Oct 2019 13:09:54 +0000 (13:09 +0000)] 
Move jump threading before reload

r266734 has introduced a new instance of jump threading pass in order to
take advantage of opportunities that combine opens up.  It was perceived
back then that it was beneficial to delay it after reload, since that
might produce even more such opportunities.

Unfortunately jump threading interferes with hot/cold partitioning.  In
the code from PR92007, it converts the following

  +-------------------------- 2/HOT ------------------------+
  |                                                         |
  v                                                         v
3/HOT --> 5/HOT --> 8/HOT --> 11/COLD --> 6/HOT --EH--> 16/HOT
            |                               ^
            |                               |
            +-------------------------------+

into the following:

  +---------------------- 2/HOT ------------------+
  |                                               |
  v                                               v
3/HOT --> 8/HOT --> 11/COLD --> 6/COLD --EH--> 16/HOT

This makes hot bb 6 dominated by cold bb 11, and because of this
fixup_partitions makes bb 6 cold as well, which in turn makes EH edge
6->16 a crossing one.  Not only can't we have crossing EH edges, we are
also not allowed to introduce new crossing edges after reload in
general, since it might require extra registers on some targets.

Therefore, move the jump threading pass between combine and hot/cold
partitioning.  Building SPEC 2006 and SPEC 2017 with the old and the new
code indicates that:

* When doing jump threading right after reload, 3889 edges are threaded.
* When doing jump threading right after combine, 3918 edges are
  threaded.

This means this change will not introduce performance regressions.

gcc/ChangeLog:

2019-10-28  Ilya Leoshkevich  <iii@linux.ibm.com>

Backport from mainline
PR rtl-optimization/92007
* cfgcleanup.c (thread_jump): Add an assertion that we don't
call it after reload if hot/cold partitioning has been done.
(class pass_postreload_jump): Rename to
pass_jump_after_combine.
(make_pass_postreload_jump): Rename to
make_pass_jump_after_combine.
* passes.def(pass_postreload_jump): Move before reload, rename
to pass_jump_after_combine.
* tree-pass.h (make_pass_postreload_jump): Rename to
make_pass_jump_after_combine.

gcc/testsuite/ChangeLog:

2019-10-28  Ilya Leoshkevich  <iii@linux.ibm.com>

Backport from mainline
PR rtl-optimization/92007
* g++.dg/opt/pr92007.C: New test (from Arseny Solokha).

From-SVN: r277515

5 years agobaseline_symbols.txt: Update.
John David Anglin [Mon, 28 Oct 2019 11:40:08 +0000 (11:40 +0000)] 
baseline_symbols.txt: Update.

* config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r277511

5 years ago[rs6000] PR70010, avoid no-vsx function to be inlined to vsx function
Peter Bergner [Mon, 28 Oct 2019 09:46:15 +0000 (09:46 +0000)] 
[rs6000] PR70010, avoid no-vsx function to be inlined to vsx function

In PR70010, a function is marked with target(no-vsx) to disable VSX code
generation.  To avoid VSX code generation, this function should not be
inlined into VSX function.  To fix the bug, in the current logic when
checking whether the caller's ISA flags supports the callee's ISA flags, we
just need to add a test that enforces that the caller's ISA flags match
exactly the callee's flags, for those flags that were explicitly set in the
callee.  If caller without target attribute then using options from command
line.

Jiufu
BR

gcc/
2019-10-16  Peter Bergner <bergner@linux.ibm.com>
    Jiufu Guo  <guojiufu@linux.ibm.com>

PR target/70010
* config/rs6000/rs6000.c (rs6000_can_inline_p): Prohibit inlining if
the callee explicitly disables some isa_flags the caller is using.

gcc.testsuite/
2019-10-16  Peter Bergner <bergner@linux.ibm.com>
    Jiufu Guo  <guojiufu@linux.ibm.com>

PR target/70010
* gcc.target/powerpc/pr70010.c: New test.
* gcc.target/powerpc/pr70010-1.c: New test.
* gcc.target/powerpc/pr70010-2.c: New test.
* gcc.target/powerpc/pr70010-3.c: New test.
* gcc.target/powerpc/pr70010-4.c: New test.

Co-Authored-By: Jiufu Guo <guojiufu@linux.ibm.com>
From-SVN: r277506

5 years agoFortran] PR91863 - fix call to bind(C) with array descriptor
Tobias Burnus [Mon, 28 Oct 2019 09:36:27 +0000 (09:36 +0000)] 
Fortran] PR91863 - fix call to bind(C) with array descriptor

        Backport from mainline
        2019-10-28  Tobias Burnus  <tobias@codesourcery.com>

        PR fortran/91863
        * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Don't free data
        memory as that's done on the Fortran side.
        (gfc_conv_procedure_call): Handle void* pointers from
        gfc_conv_gfc_desc_to_cfi_desc.

        Backport from mainline
        2019-10-28  Tobias Burnus  <tobias@codesourcery.com>

        PR fortran/91863
        * gfortran.dg/bind-c-intent-out.f90: New.

From-SVN: r277505

5 years agoDaily bump.
GCC Administrator [Mon, 28 Oct 2019 00:16:57 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r277498

5 years ago[Darwin, PPC] Fix PR 65342.
Iain Sandoe [Sun, 27 Oct 2019 21:25:57 +0000 (21:25 +0000)] 
[Darwin, PPC] Fix PR 65342.

The current Darwin load/store lo_sum patterns have neither predicate nor
constraint. This means that most parts of the backend, which rely on
recog() to validate the rtx, can produce invalid combinations/selections.

For 32bit cases this isn't a problem since we can load/store to unaligned
addresses using D-mode insns.

Conversely, for 64bit instructions that use DS mode, this can manifest as
assemble errors (for an assembler that checks the LO14 relocations), or as
crashes caused by wrong offsets (or worse, wrong content for the two LSBs).

What we want to check for Y on Darwin is:
- that the alignment of the Symbols' target is sufficient for DS mode
- that the offset is suitable for DS mode.
(while looking through the Mach-O PIC unspecs).

So, the patch removes the Darwin-specific lo_sum patterns (we begin using
the movdi_internal64 patterns). We also we need to extend the handling of the
mem_operand_gpr constraint to allow looking through Mach-O PIC UNSPECs in
the lo_sum cases.

2019-10-27  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-10-17  Iain Sandoe  <iain@sandoe.co.uk>

PR target/65342
* config/rs6000/darwin.md (movdi_low, movsi_low_st): Delete.
(movdi_low_st): Delete.
* config/rs6000/rs6000.c
(darwin_rs6000_legitimate_lo_sum_const_p): New.
(mem_operand_gpr): Validate Mach-O LO_SUM cases separately.
* config/rs6000/rs6000.md (movsi_low): Delete.

From-SVN: r277495

5 years ago[Darwin, machopic] Fix for 67183
Iain Sandoe [Sun, 27 Oct 2019 21:21:49 +0000 (21:21 +0000)] 
[Darwin, machopic] Fix for 67183

When we're using the LLVM-based assembler (the default on modern Darwin)
the ordering of stubs and non-lazy symbol pointers is important.

Interleaving the output (current GCC behaviour) leads to crashes which
prevents us from building code with symbol stubs.

To resolve this, we order the output of stubs and symbol indirections:

1. Any indirections in the data section
2. Symbol stubs.
3. Non-lazy symbol pointers.

At present, we still emit LTO sections after these.

2019-10-27  Iain Sandoe  <iain@sandoe.co.uk>

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

PR target/67183
* config/darwin.c (machopic_indirection): New field to flag
non-lazy-symbol-pointers in the data section.
(machopic_indirection_name): Compute if an indirection should
appear in the data section.
(machopic_output_data_section_indirection): New callback split
from machopic_output_indirection.
(machopic_output_stub_indirection): Likewise.
(machopic_output_indirection): Retain the code for non-lazy
symbol pointers in their regular section.
(machopic_finish): Use the new callbacks to order the indirection
output.

From-SVN: r277494

5 years ago[Darwin, machopic] Preparatory patches.
Iain Sandoe [Sun, 27 Oct 2019 21:17:33 +0000 (21:17 +0000)] 
[Darwin, machopic] Preparatory patches.

This is a combined set of 5 patches that allows us to fix
PR 65342 and 67183.

276924 Make machopic_finish() static.

276767 Set a SYMBOL flag for indirections.

We are able to treat these specially where needed in legitimate address
tests (specifically, they are guaranteed to be pointer-aligned).

276708 Compute and cache indirection rules.

This caches a check for the requirement to indirect a symbol in the Darwin
ABI, and uses it where needed.  We also ensure that we place the indirection
pointers into the non-lazy symbol pointers section.  Other placements have
occurred with various platform toolchains - but these seem to have been
unintentional so we match current platform toolchains.

276675 Consider visibility in indirections.

For weak, hidden vars the indirection should just be as normal, that
is that the indirections for such symbols should appear in the non-lazy
symbol pointers table, not in the .data section.

276674 Initial tidy of Mach-O symbol handling.

We want to improve the detection and caching of symbol-properties
so that (a) we can make the compiler's output match the platform
norms (b) we can improve efficiency by checking flags instead of
inspecting strings. (c) The fix for PR71767 was a largish hammer
and we want to reduce the number of symbols that are made linker-
visible.

This first patch is largely typographical changes with no functional
difference intended:

- Tries to ensure that there's no overlap between the symbols used in
the Mach-O case and those declared in the i386 or rs6000 port trees.

 - Some improvement to comments.

- Makes the naming of the symbol flags consistent with other uses.

 - Provides a predicate macro for each use.

2019-10-27  Iain Sandoe  <iain@sandoe.co.uk>

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

* config/darwin-protos.h (machopic_finish): Delete.
* config/darwin.c (machopic_finish): Make static.

Backport from mainline
2019-10-09  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.c (machopic_indirect_data_reference): Set flag to
indicate that the new symbol is an indirection.
(machopic_indirect_call_target): Likewise.
* config/darwin.h (MACHO_SYMBOL_FLAG_INDIRECTION): New.
(MACHO_SYMBOL_INDIRECTION_P): New.
(MACHO_SYMBOL_FLAG_STATIC): Adjust bit number.

Backport from mainline
2019-10-08  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.c (machopic_indirect_data_reference): Check for
required indirections before making direct access to defined
values.
(machopic_output_indirection): Place the indirected pointes for
required indirections into the non-lazy symbol pointers section.
(darwin_encode_section_info):
* config/darwin.h (MACHO_SYMBOL_FLAG_MUST_INDIRECT): New.
(MACHO_SYMBOL_MUST_INDIRECT_P): New.

Backport from mainline
2019-10-07  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.c (machopic_output_indirection): Don't put
hidden symbol indirections into the .data section, use the
non-lazy symbol pointers section as normal.
(darwin_encode_section_info): Record if a symbol is hidden.
* config/darwin.h (MACHO_SYMBOL_FLAG_HIDDEN_VIS): New.
(MACHO_SYMBOL_HIDDEN_VIS_P): New.

Backport from mainline
2019-10-07  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.c (machopic_symbol_defined_p): Use symbol flag
predicates instead of accessing bits directly.
(machopic_indirect_call_target): Likewise.
(machopic_output_indirection): Likewise.
(darwin_encode_section_info): Improve description.  Use renamed
symbol flags.  Use predicate macros for variables and functions.
* config/darwin.h:
Rename MACHO_SYMBOL_VARIABLE to MACHO_SYMBOL_FLAG_VARIABLE.
Rename MACHO_SYMBOL_DEFINED to MACHO_SYMBOL_FLAG_DEFINED.
Rename MACHO_SYMBOL_STATIC to MACHO_SYMBOL_FLAG_STATIC.
(MACHO_SYMBOL_VARIABLE_P): New.
(MACHO_SYMBOL_DEFINED_P):New.
(MACHO_SYMBOL_STATIC_P): New.
* config/i386/darwin.h (MACHO_SYMBOL_FLAG_VARIABLE): Delete.
(SYMBOL_FLAG_SUBT_DEP): New.
* config/rs6000/darwin.h (SYMBOL_FLAG_SUBT_DEP): New.

From-SVN: r277493

5 years agobackport: re PR fortran/86248 (LEN_TRIM in specification expression causes link failure)
Paul Thomas [Sun, 27 Oct 2019 18:28:52 +0000 (18:28 +0000)] 
backport: re PR fortran/86248 (LEN_TRIM in specification expression causes link failure)

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

Backport from mainline
PR fortran/86248
* resolve.c (flag_fn_result_spec): Correct a typo before the
function declaration.
* trans-decl.c (gfc_sym_identifier): Boost the length of 'name'
to allow for all variants. Simplify the code by using a pointer
to the symbol's proc_name and taking the return out of each of
the conditional branches. Allow symbols with fn_result_spec set
that do not come from a procedure namespace and have a module
name to go through the non-fn_result_spec branch.

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

Backport from mainline
PR fortran/86248
* gfortran.dg/char_result_19.f90 : New test.
* gfortran.dg/char_result_mod_19.f90 : Module for the new test.

From-SVN: r277490

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

From-SVN: r277479

5 years agore PR c++/85254 (boost::is_final does not work for template types)
Ville Voutilainen [Sat, 26 Oct 2019 17:32:24 +0000 (20:32 +0300)] 
re PR c++/85254 (boost::is_final does not work for template types)

PR c++/85254

Backport from mainline
2019-06-01  Ville Voutilainen  <ville.voutilainen@gmail.com>

PR c++/85254
* class.c (fixup_type_variants): Handle CLASSTYPE_FINAL.

From-SVN: r277474

5 years agoAvoid gimple body modifications while streaming.
Jan Hubicka [Sat, 26 Oct 2019 16:57:16 +0000 (18:57 +0200)] 
Avoid gimple body modifications while streaming.

Backport from mainline
2019-10-11  Jan Hubicka  <hubicka@ucw.cz>
* gimple-streamer-out.c (output_gimple_stmt): Add explicit function
parameter.
* lto-streamer-out.c: Include tree-dfa.h.
(output_cfg): Do not use cfun.
(lto_prepare_function_for_streaming): New.
(output_function): Do not push cfun; do not initialize loop optimizer.
* lto-streamer.h (lto_prepare_function_for_streaming): Declare.
* passes.c (ipa_write_summaries): Use it.
(ipa_write_optimization_summaries): Do not modify bodies.
* tree-dfa.c (renumber_gimple_stmt_uids): Add function parameter.
* tree.dfa.h (renumber_gimple_stmt_uids): Update prototype.
* tree-ssa-dse.c (pass_dse::execute): Update use of
renumber_gimple_stmt_uids.
* tree-ssa-math-opts.c (pass_optimize_widening_mul::execute): Likewise.

2019-10-12  Jan Hubicka  <hubicka@ucw.cz>
* lto-streamer-out.c (collect_block_tree_leafs): Renumber statements
so non-virutal are before virutals.
(output_function): Avoid body modifications.

From-SVN: r277473

5 years agoDaily bump.
GCC Administrator [Sat, 26 Oct 2019 00:16:59 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r277467

5 years agocompiler: don't inline integer expressions with named types
Ian Lance Taylor [Fri, 25 Oct 2019 19:10:34 +0000 (19:10 +0000)] 
compiler: don't inline integer expressions with named types

This works around the problem on GCC 9 branch.  The problem is fixed
in a better way on trunk; see https://golang.org/issue/34577.

Fixes https://golang.org/issue/35154

From-SVN: r277461

5 years ago[arm][PR88167] Fix __builtin_return_address returns invalid address
Richard Earnshaw [Fri, 25 Oct 2019 14:34:44 +0000 (14:34 +0000)] 
[arm][PR88167] Fix __builtin_return_address returns invalid address

This patch fixes a problem with the thumb1 prologue code where the link
register could be unconditionally used as a scratch register even if the
return value was still live at the end of the prologue.

Additionally, the patch improves the code generated when we are not
using many low call-saved registers to make use of any unused call
clobbered registers to help with the saving of high registers that
cannot be pushed directly (quite rare in normal code as the register
allocator correctly prefers low registers).

2019-05-08  Mihail Ionescu  <mihail.ionescu@arm.com>
    Richard Earnshaw  <rearnsha@arm.com>

gcc:

PR target/88167
* config/arm/arm.c (thumb1_prologue_unused_call_clobbered_lo_regs): New
function.
(thumb1_epilogue_unused_call_clobbered_lo_regs): New function.
(thumb1_compute_save_core_reg_mask): Don't force a spare work
register if both the epilogue and prologue can use call-clobbered
regs.
(thumb1_unexpanded_epilogue): Use
thumb1_epilogue_unused_call_clobbered_lo_regs.  Reverse the logic for
picking temporaries for restoring high regs to match that of the
prologue where possible.
(thumb1_expand_prologue): Add any usable call-clobbered low registers to
the list of work registers.  Detect if the return address is still live
at the end of the prologue and avoid using it for a work register if so.
If the return address is not live, add LR to the list of pushable regs
after the first pass.

gcc/testsuite:

PR target/88167
* gcc.target/arm/pr88167-1.c: New test.
* gcc.target/arm/pr88167-2.c: New test.

From-SVN: r277452

5 years agofree summary vectors.
Jan Hubicka [Fri, 25 Oct 2019 12:02:39 +0000 (14:02 +0200)] 
free summary vectors.

Backport from mainline
2019-10-24  Jan Hubicka  <hubicka@ucw.cz>
* symbols-summary.h (fast_function_summary<T *, V>::release,
fast_call_summary<T *, V>::release): Free m_vector.

From-SVN: r277445

5 years agoBackport ggc_trim
Jan Hubicka [Fri, 25 Oct 2019 11:17:38 +0000 (13:17 +0200)] 
Backport ggc_trim
Backport from mainline

2019-10-18  Jakub Jelinek  <jakub@redhat.com>
PR middle-end/92153
* ggc-page.c (release_pages): Read g->alloc_size before free rather
than after it.

2019-10-11  Jan Hubicka  <hubicka@ucw.cz>

* ggc-page.c (release_pages): Output statistics when !quiet_flag.
(ggc_collect): Dump later to not interfere with release_page dump.
(ggc_trim): New function.
* ggc-none.c (ggc_trim): New.
* ggc.h (ggc_trim): Declare.

* lto-partition.c (add_symbol_to_partition_1): Update.
(undo_parittion): Update.

From-SVN: r277443

5 years agoDaily bump.
GCC Administrator [Fri, 25 Oct 2019 00:16:58 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r277432

5 years ago* decl.c (reshape_init_r): Add missing space.
Marek Polacek [Thu, 24 Oct 2019 17:23:27 +0000 (17:23 +0000)] 
* decl.c (reshape_init_r): Add missing space.

From-SVN: r277420

5 years ago[arm] Backport -- Fix multilibs for Armv7-R
Mihail Ionescu [Thu, 24 Oct 2019 16:55:18 +0000 (16:55 +0000)] 
[arm] Backport -- Fix multilibs for Armv7-R

gcc/ChangeLog:
2019-10-24  Mihail Ionescu  <mihail.ionescu@arm.com>

Backport from mainline
2019-10-18  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* config/arm/t-multilib: Add new multilib variants and new
mappings.

gcc/testsuite/ChangeLog:
2019-10-24  Mihail Ionescu  <mihail.ionescu@arm.com>

Backport from mainline
2019-10-18  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* gcc.target/arm/multilib.exp: Add extra tests.

From-SVN: r277417

5 years ago[Darwin, PPC] Check for out of range asm values.
Iain Sandoe [Thu, 24 Oct 2019 14:53:28 +0000 (14:53 +0000)] 
[Darwin, PPC] Check for out of range asm values.

There are some cases in which the value for the max skip to a p2align
directive can be negative. The older assembler (and GAS) just ignores
these cases but newer tools produce an error. To preserve behaviour,
we avoid emitting out of range values.

gcc/ChangeLog:

2019-10-24  Iain Sandoe  <iain@sandoe.co.uk>

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

* config/rs6000/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Guard
against out of range max skip or log values.

From-SVN: r277405

5 years agoPR libstdc++/90682 allow set_terminate(0) and set_unexpected(0)
Jonathan Wakely [Thu, 24 Oct 2019 12:55:27 +0000 (13:55 +0100)] 
PR libstdc++/90682 allow set_terminate(0) and set_unexpected(0)

Make these functions restore the default handlers when passed a null
pointer. This is consistent with std::pmr::set_default_resource(0), and
also matches the current behaviour of libc++.

In order to avoid duplicating the preprocessor condition from
eh_term_handler.cc more that into a new eh_term_handler.h header and
define a macro that can be used in both eh_term_handler.cc and
eh_terminate.cc.

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

PR libstdc++/90682
* libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
* libsupc++/eh_term_handler.h: New header defining
_GLIBCXX_DEFAULT_TERM_HANDLER.
* libsupc++/eh_terminate.cc: Include eh_term_handler.h.
(set_terminate): Restore default handler when argument is null.
(set_unexpected): Likewise.
* testsuite/18_support/set_terminate.cc: New test.
* testsuite/18_support/set_unexpected.cc: New test.

From-SVN: r277393

5 years agoPR libstdc++/61761 fix std::proj for targets without C99 cproj
Jonathan Wakely [Thu, 24 Oct 2019 12:55:21 +0000 (13:55 +0100)] 
PR libstdc++/61761 fix std::proj for targets without C99 cproj

The current generic implementation of __complex_proj used when cproj is
not available calculates the wrong projection, giving a different result
than given by C99's cproj.

When C99 cproj is not available but isinf and copysign are, use those to
give correct results for float, double and long double. Otherwise, and
for other specializations of std::complex, just use a generic version
that returns its argument, and so doesn't support infinities.

We might want to consider adding additional overloads of __complex_proj
to support extended types such as _Float64x, _Float128 etc.

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

PR libstdc++/61761
* include/std/complex (__complex_proj): Return parameter unchanged.
[_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
floating-point types to take std::complex arguments.
[_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
floating-point types.
* testsuite/26_numerics/complex/proj.cc: New test.

From-SVN: r277392

5 years agoFix more failing tests for C++98 mode
Jonathan Wakely [Thu, 24 Oct 2019 12:55:14 +0000 (13:55 +0100)] 
Fix more failing tests for C++98 mode

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

* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
dg-prune-output for different C++98 diagnostic.
* testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
Likewise.
* testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
Likewise.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
Likewise.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
Likewise.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
Likewise.
* testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.

From-SVN: r277391

5 years agoFix tests that fail with -std=gnu++98 or -std=gnu++11
Jonathan Wakely [Thu, 24 Oct 2019 12:55:08 +0000 (13:55 +0100)] 
Fix tests that fail with -std=gnu++98 or -std=gnu++11

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

* testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
void.
* testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
include Library Fundamentals or Networking headers in C++11 mode.
* testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.

From-SVN: r277390

5 years agoFix indentation in testsuite utility header
Jonathan Wakely [Thu, 24 Oct 2019 12:55:03 +0000 (13:55 +0100)] 
Fix indentation in testsuite utility header

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

* testsuite/util/testsuite_allocator.h (memory_resource)
(default_resource_mgr): Fix indentation.

From-SVN: r277389

5 years agoPR libstdc++/89164 enforce constraints for uninitialized algos
Jonathan Wakely [Thu, 24 Oct 2019 12:54:58 +0000 (13:54 +0100)] 
PR libstdc++/89164 enforce constraints for uninitialized algos

The memmove optimizations for std::uninitialized_copy/fill/_n will
compile even if the type is not copy constructible, because std::copy
doesn't require copy construction to work. But the uninitialized
algorithms do require it.

This adds explicit static assertions to ensure we don't allow ill-formed
initializations.

Backport from mainline
2019-08-30  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/89164
* include/bits/stl_algobase.h (__copy_move): Give descriptive names
to template parameters.
* include/bits/stl_uninitialized.h (uninitialized_copy)
(uninitialized_fill, uninitialized_fill_n): Add static assertions to
diagnose invalid uses.
* testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
Adjust expected error.
* testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
New test.
* testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
89164.cc: New test.
* testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
New test.
* testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
89164.cc: New test.
* testsuite/23_containers/vector/cons/89164.cc: New test.
* testsuite/23_containers/vector/cons/89164_c++17.cc: New test.

From-SVN: r277388

5 years agoDo not declare std::uses_allocator before C++11
Jonathan Wakely [Thu, 24 Oct 2019 12:54:50 +0000 (13:54 +0100)] 
Do not declare std::uses_allocator before C++11

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

* include/bits/memoryfwd.h (uses_allocator): Do not declare for C++98.
* testsuite/17_intro/names.cc: Check uses_allocator in C++98.

From-SVN: r277387

5 years agoPR libstdc++/92143 adjust for OS X aligned_alloc behaviour
Jonathan Wakely [Thu, 24 Oct 2019 12:54:44 +0000 (13:54 +0100)] 
PR libstdc++/92143 adjust for OS X aligned_alloc behaviour

OS X 10.15 adds aligned_alloc but it has the same restriction as the AIX
version, namely that alignments smaller than sizeof(void*) are not
supported.

Backport from mainline
2019-10-18  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/92143
* libsupc++/new_opa.cc (operator new) [__APPLE__]: Increase alignment
to at least sizeof(void*).

From-SVN: r277386

5 years agoFix more tests that fail in C++2a mode
Jonathan Wakely [Thu, 24 Oct 2019 12:54:40 +0000 (13:54 +0100)] 
Fix more tests that fail in C++2a mode

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

* testsuite/23_containers/unordered_map/requirements/debug_container.cc:
Do not test allocator rebinding extension for C++2a.
* testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
dg-do directive for C++17 and C++2a.

From-SVN: r277385

5 years agoFix testsuite bugs
Jonathan Wakely [Thu, 24 Oct 2019 12:54:35 +0000 (13:54 +0100)] 
Fix testsuite bugs

One of the static assertions in 20_util/function_objects/invoke/1.cc was
wrong, but didn't fail because by default it was compiled with
-std=gnu++14 which didn't use that static assertion. Split out the C++17
parts to a new file that always runs with -std=gnu++17, so those checks
are always done. Also backport some extra tests from an earlier commit
on trunk (r271173).

The 23_containers/unordered_set/allocator/ext_ptr.cc test is supposed to
be a run-time test but was unintentionally compile-only.

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

* testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
Move C++17-specific tests to ...
* testsuite/20_util/function_objects/invoke/3.cc: New test.
* testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
"compile" test to "run".

From-SVN: r277384

5 years agoAdd makefile target to update HTML files in source tree
Jonathan Wakely [Thu, 24 Oct 2019 12:54:30 +0000 (13:54 +0100)] 
Add makefile target to update HTML files in source tree

Also remove the creation of the html/ext sub-directory, which has been
unused since revision r245258.

Backport from mainline
2019-10-08  Jonathan Wakely  <jwakely@redhat.com>

* doc/Makefile.am (doc-html-docbook-regenerate): New target.
(${docbook_outdir}/html): Do not create unused 'html/ext' directory.
* doc/Makefile.in: Regenerate.
* doc/xml/manual/documentation_hacking.xml: Document new target.
* doc/html/*: Regenerate.

From-SVN: r277383

5 years agoUpdate URL for CUJ article in libstdc++ docs
Jonathan Wakely [Thu, 24 Oct 2019 12:54:23 +0000 (13:54 +0100)] 
Update URL for CUJ article in libstdc++ docs

* doc/xml/manual/allocator.xml: Use archived copy of CUJ article.

From-SVN: r277382

5 years agoUpdate URL for Hoard in libstdc++ docs
Jonathan Wakely [Thu, 24 Oct 2019 12:54:18 +0000 (13:54 +0100)] 
Update URL for Hoard in libstdc++ docs

Backport from mainline
2019-05-31  Gerald Pfeifer  <gerald@pfeifer.com>

* doc/xml/manual/allocator.xml: Move hoard.org back to http.

From-SVN: r277381

5 years agoPR libstdc++/91456 make INVOKE<R> work with uncopyable prvalues
Jonathan Wakely [Thu, 24 Oct 2019 12:54:13 +0000 (13:54 +0100)] 
PR libstdc++/91456 make INVOKE<R> work with uncopyable prvalues

In C++17 a function can return a prvalue of a type that cannot be moved
or copied. The current implementation of std::is_invocable_r uses
std::is_convertible to test the conversion to R required by INVOKE<R>.
That fails for non-copyable prvalues, because std::is_convertible is
defined in terms of std::declval which uses std::add_rvalue_reference.
In C++17 conversion from R to R involves no copies and so is not the
same as conversion from R&& to R.

This commit changes std::is_invocable_r to check the conversion without
using std::is_convertible.

std::function also contains a similar check using std::is_convertible,
which can be fixed by simply reusing std::is_invocable_r (but because
std::is_invocable_r is not defined for C++11 it uses the underlying
std::__is_invocable_impl trait directly).

Backport from mainline
2019-08-15  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/91456
* include/bits/std_function.h (__check_func_return_type): Remove.
(function::_Callable): Use std::__is_invocable_impl instead of
__check_func_return_type.
* include/std/type_traits (__is_invocable_impl): Add another defaulted
template parameter. Define a separate partial specialization for
INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
with a check that models delayed temporary materialization.
* testsuite/20_util/function/91456.cc: New test.
* testsuite/20_util/is_invocable/91456.cc: New test.

From-SVN: r277380

5 years agoInclude netinet/in.h in include/experimental/internet
Jonathan Wakely [Thu, 24 Oct 2019 12:54:09 +0000 (13:54 +0100)] 
Include netinet/in.h in include/experimental/internet

Backport from mainline
2019-09-30  Andreas Tobler  <andreast@gcc.gnu.org>

* include/experimental/internet: Include netinet/in.h if we have
_GLIBCXX_HAVE_NETINET_IN_H defined.

From-SVN: r277379

5 years agoFix array index error in address_v6 comparisons
Jonathan Wakely [Thu, 24 Oct 2019 12:54:05 +0000 (13:54 +0100)] 
Fix array index error in address_v6 comparisons

Backport from mainline
2019-09-26  Jonathan Wakely  <jwakely@redhat.com>

* include/experimental/internet (operator==, operator<): Fix loop
condition to avoid reading past the end of the array.

From-SVN: r277378

5 years agoP1651R0 bind_front should not unwrap reference_wrapper
Jonathan Wakely [Thu, 24 Oct 2019 12:54:00 +0000 (13:54 +0100)] 
P1651R0 bind_front should not unwrap reference_wrapper

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

P1651R0 bind_front should not unwrap reference_wrapper
* include/std/functional (bind_front): Don't unwrap reference_wrapper.
* include/std/version (__cpp_lib_bind_front): Update value.
* testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
feature test macro.
* testsuite/20_util/function_objects/bind_front/2.cc: New test.

From-SVN: r277377

5 years agoPR libstdc++/92059 fix several bugs in tr2::dynamic_bitset
Jonathan Wakely [Thu, 24 Oct 2019 12:53:55 +0000 (13:53 +0100)] 
PR libstdc++/92059 fix several bugs in tr2::dynamic_bitset

Backport from mainline
2019-10-11  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/92059
* include/tr2/dynamic_bitset (__dynamic_bitset_base): Define all
special member functions as defaulted. Add noexcept to most members.
(__dynamic_bitset_base(size_t, unsigned long long, const _Alloc&)):
Mask off unwanted bits in the __val parameter. Avoid undefined left
shifts.
(__dynamic_bitset_base::_M_assign): Remove.
(__dynamic_bitset_base::_M_do_reset): Use std::fill.
(__dynamic_bitset_base::_M_are_all_aux): Avoid integer promotion when
block_type has lower rank than int.
(dynamic_bitset): Add noexcept to most members. Use injected-class-name
in return types and parameter types.
(dynamic_bitset::_M_Nb): Add default member initializer.
(dynamic_bitset(), dynamic_bitset(const dynamic_bitset&)): Define as
defaulted.
(dynamic_bitset(dynamic_bitset&&)): Clear source object after move.
(dynamic_bitset::operator=(const dynamic_bitset&)): Define as
defaulted.
(dynamic_bitset::operator=(dynamic_bitset&&)): Add noexcept-specifier.
Define without using swap, to propagate allocator correctly.
(dynamic_bitset(const char*, const _Alloc&)): Use strlen.
(dynamic_bitset::_M_do_sanitize, dynamic_bitset::_M_do_fill): Use
casts to avoid unwanted integer promotions.
(dynamic_bitset::_M_copy_from_ptr): Rearrange template parameters and
add default template arguments and default argument to simplify usage.
(dynamic_bitset::_M_copy_from_string): Adjust call to _M_copy_from_ptr.
(operator==(const dynamic_bitset&, const dynamic_bitset&))
(operator<(const dynamic_bitset&, const dynamic_bitset&)): Use _M_Nb.
* include/tr2/dynamic_bitset.tcc (dynamic_bitset::_M_copy_from_ptr):
Adjust template parameters to match declaration.
* testsuite/tr2/dynamic_bitset/cmp.cc: New test.
* testsuite/tr2/dynamic_bitset/cons.cc: New test.
* testsuite/tr2/dynamic_bitset/copy.cc: New test.
* testsuite/tr2/dynamic_bitset/move.cc: New test.
* testsuite/tr2/dynamic_bitset/pr92059.cc: New test.

From-SVN: r277376

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

From-SVN: r277361

5 years agobackport: config.gcc: Move -L usage from LINK_OS_EXTRA_SPEC32 and LINK_OS_EXTRA_SPEC6...
Peter Bergner [Wed, 23 Oct 2019 21:34:42 +0000 (21:34 +0000)] 
backport: config.gcc: Move -L usage from LINK_OS_EXTRA_SPEC32 and LINK_OS_EXTRA_SPEC64 to...

Backport from mainline
2019-10-08  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>

* config.gcc: Move -L usage from LINK_OS_EXTRA_SPEC32 and
LINK_OS_EXTRA_SPEC64 to MD_STARTFILE_PREFIX and
MD_STARTFILE_PREFIX_1 when using --with-advance-toolchain.

From-SVN: r277353

5 years agoBackport r276178
Martin Liska [Wed, 23 Oct 2019 12:16:28 +0000 (14:16 +0200)] 
Backport r276178

2019-10-23  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-09-27  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/91885
* gcc.dg/pr91885.c (__int64_t): Change from long to long long.
(__uint64_t): Change from unsigned long to unsigned long long.

From-SVN: r277318

5 years agoBackport r276141
Martin Liska [Wed, 23 Oct 2019 12:12:57 +0000 (14:12 +0200)] 
Backport r276141

2019-10-23  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-09-26  Martin Liska  <mliska@suse.cz>

PR tree-optimization/91885
* tree-vectorizer.c (try_vectorize_loop_1):
Add TODO_update_ssa_only_virtuals similarly to what slp
pass does.
2019-10-23  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-09-26  Martin Liska  <mliska@suse.cz>

PR tree-optimization/91885
* gcc.dg/pr91885.c: New test.

From-SVN: r277317

5 years agore PR tree-optimization/92131 (incorrect assumption that (ao >= 0) is always false)
Eric Botcazou [Wed, 23 Oct 2019 11:37:28 +0000 (11:37 +0000)] 
re PR tree-optimization/92131 (incorrect assumption that (ao >= 0) is always false)

PR tree-optimization/92131
* tree-vrp.c (extract_range_from_plus_minus_expr): If the resulting
range would be symbolic, drop to varying for any explicit overflow
in the constant part or if neither range is a singleton.

From-SVN: r277315

5 years agobackport: re PR debug/91887 (-fdebug-types-section ICE building chromium)
Richard Biener [Wed, 23 Oct 2019 10:32:06 +0000 (10:32 +0000)] 
backport: re PR debug/91887 (-fdebug-types-section ICE building chromium)

2019-10-23  Richard Biener  <rguenther@suse.de>

Backport from mainline
2019-10-17  Richard Biener  <rguenther@suse.de>

PR debug/91887
* dwarf2out.c (gen_formal_parameter_die): Also try to match
context_die against a DW_TAG_GNU_formal_parameter_pack parent.

* g++.dg/debug/dwarf2/pr91887.C: New testcase.

From-SVN: r277312

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

From-SVN: r277305

5 years agore PR fortran/92174 (runtime error: index 15 out of bounds for type 'gfc_expr *[15])
Steven G. Kargl [Tue, 22 Oct 2019 18:38:30 +0000 (18:38 +0000)] 
re PR fortran/92174 (runtime error: index 15 out of bounds for type 'gfc_expr *[15])

2019-10-22  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/92174
* decl.c (attr_decl1): Move check for F2018:C822 from here ...
* array.c (gfc_set_array_spec): ... to here.

From-SVN: r277298

5 years agoPR c++/92062 - ODR-use ignored for static member of class template.
Marek Polacek [Tue, 22 Oct 2019 15:46:47 +0000 (15:46 +0000)] 
PR c++/92062 - ODR-use ignored for static member of class template.

* pt.c (has_value_dependent_address): Strip location wrappers.

* g++.dg/cpp0x/constexpr-odr1.C: New test.
* g++.dg/cpp0x/constexpr-odr2.C: New test.

From-SVN: r277295

5 years agoPR c++/92106 - ICE with structured bindings and -Wreturn-local-addr.
Marek Polacek [Tue, 22 Oct 2019 15:21:34 +0000 (15:21 +0000)] 
PR c++/92106 - ICE with structured bindings and -Wreturn-local-addr.

* typeck.c (maybe_warn_about_returning_address_of_local): Avoid
recursing on null initializer and return false instead.

From-SVN: r277294

5 years agoDaily bump.
GCC Administrator [Tue, 22 Oct 2019 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r277275

5 years agobackport: re PR tree-optimization/92056 (ice in expr_object_size, at tree-object...
Jakub Jelinek [Mon, 21 Oct 2019 11:49:18 +0000 (13:49 +0200)] 
backport: re PR tree-optimization/92056 (ice in expr_object_size, at tree-object-si ze.c:675 with -O3)

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

PR tree-optimization/92056
* tree-object-size.c (cond_expr_object_size): Return early if then_
processing resulted in unknown size.

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

From-SVN: r277259

5 years agobackport: re PR fortran/87752 (ICE in omp_add_variable, at gimplify.c:6776)
Jakub Jelinek [Mon, 21 Oct 2019 11:48:34 +0000 (13:48 +0200)] 
backport: re PR fortran/87752 (ICE in omp_add_variable, at gimplify.c:6776)

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

PR fortran/87752
* gfortran.dg/gomp/pr87752.f90: New test.

From-SVN: r277258

5 years agobackport: re PR tree-optimization/91734 (gcc skip an if statement with "-O1 -ffast...
Jakub Jelinek [Mon, 21 Oct 2019 11:48:00 +0000 (13:48 +0200)] 
backport: re PR tree-optimization/91734 (gcc skip an if statement  with "-O1 -ffast-math")

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

PR tree-optimization/91734
* generic-match-head.c: Include fold-const-call.h.
* match.pd (sqrt(x) cmp c): Check the boundary value and
in case inexact computation of c*c affects comparison of the boundary,
turn LT_EXPR into LE_EXPR, GE_EXPR into GT_EXPR, LE_EXPR into LT_EXPR
or GT_EXPR into GE_EXPR.  Punt for sqrt comparisons against NaN and
for -frounding-math.  For c2, try the next smaller or larger floating
point constant depending on comparison code and if it has the same
sqrt as c2, use it instead of c2.

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

From-SVN: r277257

5 years agobackport: re PR c++/91974 (function not sequenced before function argument)
Jakub Jelinek [Mon, 21 Oct 2019 11:47:09 +0000 (13:47 +0200)] 
backport: re PR c++/91974 (function not sequenced before function argument)

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

PR c++/91974
* cp-gimplify.c (cp_gimplify_expr) <case CALL_EXPR>: For
-fstrong-eval-order ensure CALL_EXPR_FN side-effects are evaluated
before any arguments.  Additionally, ensure CALL_EXPR_FN that isn't
invariant nor OBJ_TYPE_REF nor SSA_NAME is forced into a temporary.

* g++.dg/cpp1z/eval-order5.C: New test.

From-SVN: r277256

5 years agobackport: re PR c++/91925 (-fpack-struct causes a decltype with template to ICE)
Jakub Jelinek [Mon, 21 Oct 2019 11:46:21 +0000 (13:46 +0200)] 
backport: re PR c++/91925 (-fpack-struct causes a decltype with template to ICE)

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

PR c++/91925
* c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
with NULL DECL_FIELD_OFFSET.

* g++.dg/conversion/packed2.C: New test.

From-SVN: r277255

5 years agobackport: re PR bootstrap/90543 (Build failure on MINGW for gcc-9.1.0)
Jakub Jelinek [Mon, 21 Oct 2019 11:45:27 +0000 (13:45 +0200)] 
backport: re PR bootstrap/90543 (Build failure on MINGW for gcc-9.1.0)

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

PR bootstrap/90543
* optc-save-gen.awk: Fix up printing string option differences.

From-SVN: r277254

5 years agobackport: re PR c++/88203 (assert does not compile with OpenMP's pragma omp parallel...
Jakub Jelinek [Mon, 21 Oct 2019 11:44:53 +0000 (13:44 +0200)] 
backport: re PR c++/88203 (assert does not compile with OpenMP's pragma omp parallel for default(none))

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

PR c++/88203
* c-common.h (c_omp_predefined_variable): Declare.
* c-omp.c (c_omp_predefined_variable): New function.
(c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
for predefined variables.

* c-parser.c (c_parser_predefined_identifier): New function.
(c_parser_postfix_expression): Use it.
(c_parser_omp_variable_list): Parse predefined identifiers.
* c-typeck.c (c_finish_omp_clauses): Allow predefined variables
in shared and firstprivate clauses, even when they are predetermined
shared.

* parser.c (cp_parser_omp_var_list_no_open): Parse predefined
variables.
* semantics.c (finish_omp_clauses): Allow predefined variables in
shared and firstprivate clauses, even when they are predetermined
shared.
* cp-gimplify.c (cxx_omp_predetermined_sharing_1): Return
OMP_CLAUSE_DEFAULT_SHARED for predefined variables.

* c-c++-common/gomp/pr88203-1.c: New test.
* c-c++-common/gomp/pr88203-2.c: New test.
* c-c++-common/gomp/pr88203-3.c: New test.

From-SVN: r277253

5 years agobackport: re PR middle-end/91920 (ggc 9.2.0 failing openmp compile on ppc64le)
Jakub Jelinek [Mon, 21 Oct 2019 11:43:16 +0000 (13:43 +0200)] 
backport: re PR middle-end/91920 (ggc 9.2.0 failing openmp compile on ppc64le)

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

PR middle-end/91920
* gimplify.c (omp_default_clause): Predetermine DECL_IN_CONSTANT_POOL
variables as shared.

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

From-SVN: r277252

5 years agobackport: re PR rtl-optimization/89435 (wrong code with -O1 -march=armv4 -fno-forward...
Jakub Jelinek [Mon, 21 Oct 2019 11:42:37 +0000 (13:42 +0200)] 
backport: re PR rtl-optimization/89435 (wrong code with -O1 -march=armv4 -fno-forward-propagate with __builtin_sub_overflow())

Backported from mainline
2019-09-11  Jakub Jelinek  <jakub@redhat.com>

PR rtl-optimization/89435
PR rtl-optimization/89795
PR rtl-optimization/91720
* gcc.dg/pr89435.c: New test.
* gcc.dg/pr89795.c: New test.
* gcc.dg/pr91720.c: New test.

From-SVN: r277251

5 years agobackport: re PR tree-optimization/91723 (builtin fma is not optimized or vectorized...
Jakub Jelinek [Mon, 21 Oct 2019 11:41:40 +0000 (13:41 +0200)] 
backport: re PR tree-optimization/91723 (builtin fma is not optimized or vectorized as *+)

Backported from mainline
2019-09-11  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/91723
* tree-vect-stmts.c (vectorizable_call): Use types_compatible_p check
instead of pointer equality when checking if argument vectypes are
the same.

* gcc.dg/vect/vect-fma-3.c: New test.

From-SVN: r277250

5 years agobackport: re PR tree-optimization/91665 (ICE in build_vector_from_val, at tree.c...
Jakub Jelinek [Mon, 21 Oct 2019 11:40:48 +0000 (13:40 +0200)] 
backport: re PR tree-optimization/91665 (ICE in build_vector_from_val, at tree.c:1904)

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

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

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

From-SVN: r277249

5 years agobackport: re PR middle-end/91001 (internal compiler error: in extract_insn, at recog...
Jakub Jelinek [Mon, 21 Oct 2019 11:39:53 +0000 (13:39 +0200)] 
backport: re PR middle-end/91001 (internal compiler error: in extract_insn, at recog.c:2310)

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

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

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

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

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

From-SVN: r277248

5 years agobackport: re PR tree-optimization/91632 (Probably wrong code since r275026)
Jakub Jelinek [Mon, 21 Oct 2019 11:39:04 +0000 (13:39 +0200)] 
backport: re PR tree-optimization/91632 (Probably wrong code since r275026)

Backported from mainline
2019-09-02  Jakub Jelinek  <jakub@redhat.com>

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

From-SVN: r277247

5 years agobackport: re PR middle-end/91623 (-msse4.1 -O3 segfault in /usr/lib/gcc/x86_64-pc...
Jakub Jelinek [Mon, 21 Oct 2019 11:38:37 +0000 (13:38 +0200)] 
backport: re PR middle-end/91623 (-msse4.1 -O3 segfault in /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/smmintrin.h:270:10)

Backported from mainline
2019-09-01  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/91623
* optabs.c (expand_vec_cond_expr): If op0 is a VECTOR_CST and only
EQ_EXPR/NE_EXPR is supported, verify that op0 only contains
zeros or negative elements and use NE_EXPR instead of LT_EXPR against
zero vector.

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

From-SVN: r277246

5 years agobackport: re PR lto/91572 (lto1: error: type variant has different ‘TREE_TYPE’ since...
Jakub Jelinek [Mon, 21 Oct 2019 11:37:41 +0000 (13:37 +0200)] 
backport: re PR lto/91572 (lto1: error: type variant has different ‘TREE_TYPE’ since r269862)

Backported from mainline
2019-09-01  Jakub Jelinek  <jakub@redhat.com>

PR lto/91572
* tree.c (find_decls_types_in_node): Also walk TREE_PURPOSE of
GIMPLE_ASM TREE_LIST operands.

* g++.dg/lto/pr91572_0.C: New test.

From-SVN: r277245

5 years agobackport: re PR go/91617 (Many go test case failures after r275026)
Jakub Jelinek [Mon, 21 Oct 2019 11:36:36 +0000 (13:36 +0200)] 
backport: re PR go/91617 (Many go test case failures after r275026)

Backported from mainline
2019-09-02  Jakub Jelinek  <jakub@redhat.com>

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

2019-08-29  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/91351
* tree-cfg.c (generate_range_test): Use range_check_type instead of
unsigned_type_for.
* tree-cfgcleanup.c (convert_single_case_switch): Punt if
range_check_type returns NULL.
* tree-switch-conversion.c (switch_conversion::build_one_array):
Use range_check_type instead of unsigned_type_for, don't perform
linear opt if it returns NULL.
(bit_test_cluster::find_bit_tests): Formatting fix.
(bit_test_cluster::emit): Use range_check_type instead of
unsigned_type_for.
(switch_decision_tree::try_switch_expansion): Punt if range_check_type
returns NULL.

* g++.dg/opt/pr91351.C: New test.

From-SVN: r277244

5 years agobackport: re PR c/91401 (schedule + dist_schedule clauses rejected on distribute...
Jakub Jelinek [Mon, 21 Oct 2019 11:35:09 +0000 (13:35 +0200)] 
backport: re PR c/91401 (schedule + dist_schedule clauses rejected on distribute parallel for)

Backported from mainline
2019-08-09  Jakub Jelinek  <jakub@redhat.com>

PR c/91401
* c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
check_no_duplicate_clause call.  Comment it out, instead emit a
warning for duplicate dist_schedule clauses.

* parser.c (cp_parser_omp_clause_dist_schedule): Comment out the
check_no_duplicate_clause call, instead emit a warning for duplicate
dist_schedule clauses.

* c-c++-common/gomp/pr91401-1.c: New test.
* c-c++-common/gomp/pr91401-2.c: New test.

From-SVN: r277243

5 years agobackport: quadmath.h (M_Eq, [...]): Use two more decimal places.
Jakub Jelinek [Mon, 21 Oct 2019 11:34:04 +0000 (13:34 +0200)] 
backport: quadmath.h (M_Eq, [...]): Use two more decimal places.

Backported from mainline
2019-08-02  Jakub Jelinek  <jakub@redhat.com>

* quadmath.h (M_Eq, M_LOG2Eq, M_LOG10Eq, M_LN2q, M_LN10q, M_PIq,
M_PI_2q, M_PI_4q, M_1_PIq, M_2_PIq, M_2_SQRTPIq, M_SQRT2q,
M_SQRT1_2q): Use two more decimal places.

From-SVN: r277242

5 years agoDaily bump.
GCC Administrator [Mon, 21 Oct 2019 00:16:13 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r277220

5 years agoDaily bump.
GCC Administrator [Sun, 20 Oct 2019 00:16:24 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r277208

5 years agoDaily bump.
GCC Administrator [Sat, 19 Oct 2019 00:18:12 +0000 (00:18 +0000)] 
Daily bump.

From-SVN: r277198

5 years agore PR fortran/69455 ([F08] Assembler error(s) when using intrinsic modules in two...
Steven G. Kargl [Fri, 18 Oct 2019 17:59:32 +0000 (17:59 +0000)] 
re PR fortran/69455 ([F08] Assembler error(s) when using intrinsic modules in two BLOCK)

2019-10-18  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/69455
* trans-decl.c (generate_local_decl): Avoid misconstructed
intrinsic modules in a BLOCK construct.

2019-10-18  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/69455
* gfortran.dg/pr69455_1.f90: New test.
* gfortran.dg/pr69455_2.f90: Ditto.

From-SVN: r277160

5 years agoFortran] PR91586 Fix ICE on invalid code with CLASS
Tobias Burnus [Fri, 18 Oct 2019 12:38:26 +0000 (12:38 +0000)] 
Fortran] PR91586 Fix ICE on invalid code with CLASS

        gcc/fortran/
        Backport from mainline
        2019-10-18  Tobias Burnus  <tobias@codesourcery.com>

        PR fortran/91586
        * class.c (gfc_find_derived_vtab): Return NULL
        instead of deref'ing NULL pointer.

        gcc/testsuite/
        Backport from mainline
        2019-10-18  Tobias Burnus  <tobias@codesourcery.com>

        PR fortran/91586
        * gfortran.dg/class_71.f90: New.

From-SVN: r277154

5 years agobackport: re PR target/86040 ([avr]: RAMPZ is not always cleared after loading __flas...
Georg-Johann Lay [Fri, 18 Oct 2019 09:10:20 +0000 (09:10 +0000)] 
backport: re PR target/86040 ([avr]: RAMPZ is not always cleared after loading __flashN data)

Backport from 2019-10-18 trunk r277143.
PR target/86040
* config/avr/avr.c (avr_out_lpm): Do not shortcut-return.

From-SVN: r277147