2017-11-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/80850
* trans_expr.c (gfc_conv_procedure_call): When passing a class
argument to an unlimited polymorphic dummy, it is wrong to cast
the passed expression as unlimited, unless it is unlimited. The
correct way is to assign to each of the fields and set the _len
field to zero.
2017-11-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/80850
* gfortran.dg/class_64_f90 : New test.
From-SVN: r254293
2017-10-28 Paul Thomas <pault@gcc.gnu.org>
PR fortran/81758
* trans-expr.c (trans_class_vptr_len_assignment): 'vptr_expr'
must only be set if the right hand side expression is of type
class.
2017-10-28 Paul Thomas <pault@gcc.gnu.org>
PR fortran/81758
* gfortran.dg/class_63.f90: New test.
From-SVN: r254196
Backported from mainline
2017-10-04 Jakub Jelinek <jakub@redhat.com>
PR c++/82373
* error.c (dump_function_decl): If show_return, call dump_type_suffix
on the same return type dump_type_prefix has been called on.
* g++.dg/cpp1y/pr82373.C: New test.
From-SVN: r254180
Backported from mainline
2017-09-21 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/81715
* tree-inline.c (expand_call_inline): Emit clobber stmts for
VAR_DECLs to which addressable non-volatile parameters are mapped
and for id->retvar after the return value assignment, though
for -fsanitize=kernel-address only. Clear id->retval and id->retbnd
after inlining.
* g++.dg/asan/pr81715.C: New test.
From-SVN: r254179
Backported from mainline
2017-09-15 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/82192
* combine.c (make_extraction): Don't look through non-paradoxical
SUBREGs or TRUNCATE if pos + len is or might be bigger than
inner's mode.
* gcc.c-torture/execute/pr82192.c: New test.
From-SVN: r254177
2017-10-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Rimvydas (RJ)
Backport from trunk
PR libgfortran/81938
io/format.c (free_format_data): Don't try to free vlist
descriptors past the end of the fnode array.
From-SVN: r254169
* doc/xml/manual/status_cxx1998.xml: Correct statement about
what the doc covers.
* doc/xml/manual/status_cxx2011.xml: Likewise.
* doc/xml/manual/status_cxx2014.xml: Likewise.
* doc/xml/manual/status_cxx2017.xml: Update C++17 status, and
information on feature-test macros.
* doc/xml/manual/status_cxxtr1.xml: Correct statement about what
the doc covers.
* doc/xml/manual/status_cxxtr24733.xml: Likewise.
* doc/html/*: Regenerate.
From-SVN: r254080
2017-10-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82312
* resolve.c (gfc_resolve_code): Simplify condition for class
pointer assignments becoming regular assignments by asserting
that only class valued targets are permitted.
* trans-expr.c (trans_class_pointer_fcn): New function using a
block of code from gfc_trans_pointer_assignment.
(gfc_trans_pointer_assignment): Call the new function. Tidy up
a minor whitespace issue.
2017-10-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82312
* gfortran.dg/typebound_proc_36.f90 : New test.
From-SVN: r253976
* include/std/chrono (__cpp_lib_chrono): Update macro value to
indicate support for P0505R0.
* testsuite/20_util/duration/arithmetic/constexpr_c++17.cc: Check
for updated macro.
From-SVN: r253960
Backport from mainline
2017-09-12 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/79433
* doc/xml/manual/status_cxx2017.xml: Update feature-test macros.
* doc/html/*: Regenerate.
* include/Makefile.am: Remove <bits/c++17_warning.h>.
* include/Makefile.in: Regenerate.
* include/bits/c++17_warning.h: Remove.
* include/bits/string_view.tcc: Do not include <bits/c++17_warning.h>
for pre-C++17 modes.
* include/std/any: Likewise.
(__cpp_lib_any): Define.
* include/std/mutex (__cpp_lib_scoped_lock): Adjust value as per new
SD-6 draft.
* include/std/numeric (__cpp_lib_gcd_lcm): Define as per new SD-6
draft.
* include/std/optional: Do not include <bits/c++17_warning.h>.
(__cpp_lib_optional): Define.
* include/std/shared_mutex: Do not include <bits/c++14_warning.h>.
* include/std/string_view: Do not include <bits/c++17_warning.h>.
(__cpp_lib_string_view): Define.
* include/std/variant: Do not include <bits/c++17_warning.h>.
(__cpp_lib_variant): Define.
* testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error line
numbers.
* testsuite/26_numerics/gcd/1.cc: Test for __cpp_lib_gcd_lcm.
* testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line
numbers.
* testsuite/26_numerics/lcm/1.cc: Test for __cpp_lib_gcd_lcm.
* testsuite/26_numerics/lcm/lcm_neg.cc: Adjust dg-error line
numbers.
* testsuite/30_threads/scoped_lock/requirements/typedefs.cc: Adjust
expected value of __cpp_lib_scoped_lock.
From-SVN: r253943
Backport from mainline
2017-10-19 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/bits/fs_path.h (path::iterator++(int))
(path::iterator--(int)): Fix for paths with only one component.
* testsuite/experimental/filesystem/path/itr/traversal.cc: Test
post-increment and post-decrement.
From-SVN: r253942
2017-10-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/82603
* tree-if-conv.c (predicate_mem_writes): Make sure to only
remove false predicated stores.
* gcc.dg/torture/pr82603.c: New testcase.
From-SVN: r253932
2017-10-20 Richard Biener <rguenther@suse.de>
Backport from mainline
2017-10-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/82436
* tree-vect-slp.c (vect_supported_load_permutation_p): More
conservatively choose the vectorization factor when checking
whether we can perform the required load permutation.
(vect_transform_slp_perm_load): Assert when we may not fail.
* gcc.dg/vect/pr82436.c: New testcase.
From-SVN: r253931
2017-10-19 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR libfortran/82233
* intrinsics/execute_command_line.c (execute_command_line):
No call to runtime_error if cmdstat is present.
2017-10-19 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR libfortran/82233
* gfortran.dg/execute_command_line_3.f90: New test.
From-SVN: r253907
Peephole patterns exist in the arm backend to spot load/store
operations to adjacent memory operations in order to convert them into
ldrd/strd instructions. However, when we have strict alignment
enforced, then we can only do this if the accesses are known to be
64-bit aligned; this is unlikely to be the case for most loads. The
patch adds some alignment checking to the code that validates the
addresses for use in the peephole patterns. This should also fix
incorrect generation of ldrd/strd with unaligned accesses that could
previously have occurred on ARMv5e where all such operations must be
64-bit aligned.
I've added some new tests as well. In doing so I discovered that the
ldrd/strd peephole tests could never fail since they would match the
source file name in the scanned assembly as well as any instructions
of the intended type. I've fixed those by tightening the scan results
slightly.
gcc:
* config/arm/arm.c (align_ok_ldrd_strd): New function.
(mem_ok_for_ldrd_strd): New parameter align. Extract the alignment of the
mem into it.
(gen_operands_ldrd_strd): Validate the alignment of the accesses.
testsuite:
* gcc.target/arm/peep-ldrd-1.c: Tighten test scan pattern.
* gcc.target/arm/peep-strd-1.c: Likewise.
* gcc.target/arm/peep-ldrd-2.c: New test.
* gcc.target/arm/peep-strd-2.c: New test.
From-SVN: r253891
A volatile asm statement can not be moved (relative to other volatile
asm, etc.), but IRA would do it nevertheless. This patch fixes it.
PR rtl-optimization/82602
* ira.c (rtx_moveable_p): Return false for volatile asm.
From-SVN: r253870
2017-10-18 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/82556
* lra-constraints.c (curr_insn_transform): Use non-input operand
instead of output one for matched reload.
2017-10-18 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/82556
* gcc.target/i386/pr82556.c: New.
From-SVN: r253863