Backported from mainline
2017-05-22 Jakub Jelinek <jakub@redhat.com>
PR middle-end/80809
* omp-low.c (finish_taskreg_remap): New function.
(finish_taskreg_scan): If unit size of ctx->record_type
is non-constant, unshare the size expression and replace
decls in it with possible outer var refs.
* testsuite/libgomp.c/pr80809-2.c: New test.
* testsuite/libgomp.c/pr80809-3.c: New test.
From-SVN: r248488
Backported from mainline
2017-05-22 Jakub Jelinek <jakub@redhat.com>
PR middle-end/80809
* gimplify.c (omp_add_variable): For GOVD_DEBUG_PRIVATE use
GOVD_SHARED rather than GOVD_PRIVATE with it.
(gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Expect
GOVD_SHARED rather than GOVD_PRIVATE with GOVD_DEBUG_PRIVATE.
* testsuite/libgomp.c/pr80809-1.c: New test.
From-SVN: r248487
Backported from mainline
2017-05-22 Jakub Jelinek <jakub@redhat.com>
PR middle-end/80853
* omp-low.c (lower_reduction_clauses): Pass OMP_CLAUSE_PRIVATE
as last argument to build_outer_var_ref for pointer bases of array
section reductions.
* testsuite/libgomp.c/pr80853.c: New test.
From-SVN: r248486
[gcc]
2017-05-25 Michael Meissner <meissner@linux.vnet.ibm.com>
Backport from trunk
2017-05-18 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/80510
* config/rs6000/predicates.md (simple_offsettable_mem_operand):
New predicate.
* config/rs6000/rs6000.md (ALTIVEC_DFORM): New iterator.
(define_peephole2 for Altivec d-form load): Add peepholes to catch
cases where the register allocator uses a move and an offsettable
memory operation to/from a FPR register on ISA 2.06/2.07.
(define_peephole2 for Altivec d-form store): Likewise.
Backport from trunk
2017-05-09 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/68163
* config/rs6000/rs6000.md (f32_lr): Delete mode attributes that
are now unused after splitting mov{sf,sd}_hardfloat.
(f32_lr2): Likewise.
(f32_lm): Likewise.
(f32_lm2): Likewise.
(f32_li): Likewise.
(f32_li2): Likewise.
(f32_lv): Likewise.
(f32_sr): Likewise.
(f32_sr2): Likewise.
(f32_sm): Likewise.
(f32_sm2): Likewise.
(f32_si): Likewise.
(f32_si2): Likewise.
(f32_sv): Likewise.
(f32_dm): Likewise.
(f32_vsx): Likewise.
(f32_av): Likewise.
(mov<mode>_hardfloat): Split into separate movsf and movsd pieces.
For movsf, order stores so the VSX stores occur before the GPR
store which encourages the register allocator to use a traditional
FPR instead of a GPR. For movsd, order the stores so that the GPR
store comes before the VSX stores to allow the power6 to work.
This is due to the power6 not having a 32-bit integer store
instruction from a FPR.
(movsf_hardfloat): Likewise.
(movsd_hardfloat): Likewise.
[gcc/testsuite]
2017-05-25 Michael Meissner <meissner@linux.vnet.ibm.com>
Backport from trunk
2017-05-18 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/80510
* gcc.target/powerpc/pr80510-1.c: New test.
* gcc.target/powerpc/pr80510-2.c: Likewise.
Backport from trunk
2017-05-09 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/68163
* gcc.target/powerpc/pr68163.c: New test.
From-SVN: r248480
When lra-remat rematerializes an instruction with a clobber, it checks
that the clobber does not kill live registers. However it fails to check
that the clobber also doesn't overlap with the destination register of the
final rematerialized instruction. As a result it is possible to generate
illegal instructions with the same hard register as the destination and a
clobber. Fix this by also checking for overlaps with the destination
register.
Backport from mainline
PR rtl-optimization/80754
* lra-remat.c (do_remat): Add overlap checks for dst_regno.
From-SVN: r248463
2017-05-23 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/80333
* trans-io.c (nml_get_addr_expr): If we are dealing with class
type data set tmp tree to get that address.
(transfer_namelist_element): Set the array spec to point to the
the class data.
* gfortran.dg/dtio_30.f03: New test.
* list_read.c (nml_read_obj): Compute pointer into class/type
arrays from the nl->dim information. Update it for each iteration
of the loop for the given object.
From-SVN: r248388
Backport from mainline
2017-05-18 Sheldon Lobo <sheldon.lobo@oracle.com>
* config/sparc/sparc.c (sparc_option_override): Set function
alignment for -mcpu=niagara7 to 64 to match the I$ line.
* config/sparc/sparc.h (BRANCH_COST): Set the SPARC M7 branch
latency to 1.
* config/sparc/sparc.h (BRANCH_COST): Set the SPARC T4 branch
latency to 2.
* config/sparc/sol2.h: Fix a ASM_CPU32_DEFAULT_SPEC typo.
Backport from mainline
2017-05-18 Sheldon Lobo <sheldon.lobo@oracle.com>
* gcc.target/sparc/niagara7-align.c: New test.
From-SVN: r248380
2017-05-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-05-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* gcc.target/powerpc/p8-vec-xl-xst.c: Fix target string to
LE-only.
From-SVN: r248349
* gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
for Itypes that are E_Access_Subtype.
<E_Access_Subtype>: Use the DECL of the base type directly.
From-SVN: r248324
2017-05-19 Andreas Tobler <andreast@gcc.gnu.org>
Backport from mainline
2017-05-17 Andreas Tobler <andreast@gcc.gnu.org>
* config/arm/unwind-arm.h: Make _Unwind_GetIP, _Unwind_GetIPInfo and
_Unwind_SetIP available as functions for arm*-*-freebsd*.
* config/arm/unwind-arm.c: Implement the above.
From-SVN: r248299
Glibc 2.17 made __secure_getenv an officially supported function, and
renamed it secure_getenv. The libgfortran configure has checked for
both of these, per
https://sourceware.org/glibc/wiki/Tips_and_Tricks/secure_getenv.
Unfortunately, while the dynamical library (libc.so) retains the
__secure_getenv symbol for backwards compatibility, the static library
(libc.a) does not. This means that a libgfortran.a compiled against an
older glibc will not work if one tries to link against a newer
libc.a. This creates problems for providing gfortran binary
distributions that work on as many target systems as possible.
Thus, retain the support for __secure_getenv but call it only via a
weak reference.
Backported from trunk.
2017-05-19 Janne Blomqvist <jb@gcc.gnu.org>
* libgfortran.h: HAVE_SECURE_GETENV: Don't check
HAVE___SECURE_GETENV.
* environ/runtime.c (secure_getenv): Use __secure_getenv via a
weak reference.
From-SVN: r248273
2017-05-18 Matthias Klose <doko@ubuntu.com>
* gcc_release (build_gzip): Build xz tarball instead of bz2 tarball.
(build_diffs): Handle building diffs from either bz2 or xz tarballs,
compress diffs using xz instead of bz2.
(build_diff): Likewise.
(upload_files): Check for *.xz files instead of *.bz2 files.
(announce_snapshot): Announce xz tarball instead of bz2 tarball.
(XZ): New definition.
(<toplevel>): Look for both bz2 and xz compressed old tarballs.
From-SVN: r248252
Go 1.8 includes a language change (https://golang.org/doc/go1.8#language):
in an explicit conversion from one struct type to another, any field
tags are ignored.
This CL implements this language change in the gofrontend. The tests
for this are in the gc testsuite, which will be copied into the gccgo
repository in due course.
Updates golang/go#16085.
Reviewed-on: https://go-review.googlesource.com/43614
From-SVN: r248249
PR libstdc++/80478
* include/std/functional (_Mem_fn_traits_base): Add specializations
for noexcept member function types.
* testsuite/20_util/function_objects/mem_fn/80478.cc: New test.
From-SVN: r248247
Ensure that the packages vendored into the standard library do not
have the same pkgpath as the actual packages. If we don't, attempts
to build and test the actual packages will get confused. The specific
error I was seeing was import loops, causing some of the packages to
fail to get initialized, causing an obscure run time crash.
Reviewed-on: https://go-review.googlesource.com/43610
From-SVN: r248169
2017-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk
PR libgfortran/80727
* transfer.c (read_sf_internal): Remove bogus code to detect EOR.
(read_block_form): For internal units, generate EOR if no more
bytes left in unit and we are trying to read with ADVANCE='NO'.
* gfortran.dg/read_3.f90: New test.
From-SVN: r248167
2017-05-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk
PR fortran/78659
* io.c (dtio_procs_present): Add new function to check for DTIO
procedures relative to I/O statement READ or WRITE.
(gfc_resolve_dt): Add namelist checks using the new function.
* resolve.c (dtio_procs_present): Remove function and related
namelist checks. (resolve_fl_namelist): Add check specific to
Fortran 95 restriction on namelist objects.
* gfortran.dg/namelist_91.f90: New test.
* gfortran.dg/namelist_92.f90: New test.
* gfortran.dg/namelist_93.f90: New test.
* gfortran.dg/namelist_94.f90: New test.
From-SVN: r248166
PR ada/80784
Backport from mainline
2017-05-02 Ed Schonberg <schonberg@adacore.com>
* exp_ch3.adb (Freeze_Type): Do not generate an invariant
procedure body for a local (sub)type declaration within a
predicate function. Invariant checks do not apply to these, and
the expansion of the procedure will happen in the wrong scope,
leading to misplaced freeze nodes.
From-SVN: r248152
2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/80752
* expr.c (gfc_generate_initializer): If type conversion fails,
check for error and return NULL.
2017-05-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/80752
gfortran.dg/pr80752.f90: New test.
From-SVN: r248076
[gcc]
2017-05-13 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-05-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_vect_nonmem): New static var.
(rs6000_init_cost): Initialize rs6000_vect_nonmem.
(rs6000_add_stmt_cost): Update rs6000_vect_nonmem.
(rs6000_finish_cost): Avoid vectorizing simple copy loops with
VF=2 that require versioning.
[gcc/testsuite]
2017-05-13 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-05-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* gcc.target/powerpc/versioned-copy-loop.c: New file.
From-SVN: r248010
[gcc]
2017-05-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-05-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (altivec_init_builtins): Define POWER8
built-ins for vec_xl and vec_xst with short and char pointer
arguments.
[gcc/testsuite]
2017-05-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-05-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* gcc.target/powerpc/p8-vec-xl-xst.c: New file.
From-SVN: r247999
* system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
instead of Word_Size.
Revert
2017-03-28 Andreas Schwab <schwab@suse.de>
PR ada/80117
* system-linux-aarch64-ilp32.ads: New file.
* gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
from LIBGNAT_TARGET_PAIRS.
(LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
(LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
or -mabi=ilp32, resp.
From-SVN: r247980