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
2017-05-10 Andreas Tobler <andreast@gcc.gnu.org>
Backport from mainline
2017-05-09 Andreas Tobler <andreast@gcc.gnu.org>
* config.host: Use the generic FreeBSD t-slibgcc-elf-ver for
arm*-*-freebsd* instead of the t-slibgcc-libgcc.
From-SVN: r247859
X32 uses 64 as word size instead of 32. This must not affect the
Address type definition which is based on Memory_Size.
Back port from mainline
PR ada/80626
* system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
instead of Word_Size.
From-SVN: r247850
[gcc]
2017-05-09 Michael Meissner <meissner@linux.vnet.ibm.com>
Back port from mainline
2017-05-05 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/79038
PR target/79202
PR target/79203
* config/rs6000/rs6000.md (u code attribute): Add FIX and
UNSIGNED_FIX.
(extendsi<mode>2): Add support for doing sign extension via
VUPKHSW and XXPERMDI if the value is in Altivec registers and we
don't have ISA 3.0 instructions.
(extendsi<mode>2 splitter): Likewise.
(fix_trunc<mode>si2): If we are at ISA 2.07 (VSX small integer),
generate the normal insns since SImode can now go in vector
registers. Disallow the special UNSPECs needed for previous
machines to hide SImode being used. Add new insns
fctiw{,w}_<mode>_smallint if SImode can go in vector registers.
(fix_trunc<mode>si2_stfiwx): Likewise.
(fix_trunc<mode>si2_internal): Likewise.
(fixuns_trunc<mode>si2): Likewise.
(fixuns_trunc<mode>si2_stfiwx): Likewise.
(fctiw<u>z_<mode>_smallint): Likewise.
(fctiw<u>z_<mode>_mem): New combiner pattern to prevent conversion
of floating point to 32-bit integer from doing a direct move to
the GPR registers to do a store.
(fctiwz_<mode>): Break long line.
[gcc/testsuite]
2017-05-09 Michael Meissner <meissner@linux.vnet.ibm.com>
Back port from mainline
2017-05-05 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/79038
PR target/79202
PR target/79203
* gcc.target/powerpc/ppc-round3.c: New test.
* gcc.target/powerpc/ppc-round2.c: Update expected code.
From-SVN: r247820
2017-05-05 Janus Weil <janus@gcc.gnu.org>
Backport from trunk
PR fortran/80121
* trans-expr.c (gfc_conv_procedure_call): Deallocate the components
of allocatable intent(out) arguments.
2017-05-05 Janus Weil <janus@gcc.gnu.org>
Backport from trunk
PR fortran/80121
* gfortran.dg/intent_out_9.f90: New test case.
From-SVN: r247662
2017-05-05 Janus Weil <janus@gcc.gnu.org>
Backport from trunk
PR fortran/80392
* trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
building a derived type that includes a procedure pointer component
with a polymorphic result.
2017-05-05 Janus Weil <janus@gcc.gnu.org>
Backport from trunk
PR fortran/80392
* gfortran.dg/proc_ptr_comp_49.f90: New test case.
From-SVN: r247655