2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68566
* check.c (gfc_check_reshape): Check for constant expression.
2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68566
* gfortran.dg/pr68566.f90: new test.
From-SVN: r238911
[gcc]
2016-07-30 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000-protos.h (rs6000_adjust_vec_address): New
function that takes a vector memory address, a hard register, an
element number and a temporary base register, and recreates an
address that points to the appropriate element within the vector.
* config/rs6000/rs6000.c (rs6000_adjust_vec_address): Likewise.
(rs6000_split_vec_extract_var): Add support for the target of a
vec_extract with variable element number being a scalar memory
location.
(rtx_is_swappable_p): VLSO insns (UNSPEC_VSX_VSLOW) are not
swappable.
* config/rs6000/vsx.md (vsx_extract_<mode>_load): Replace
vsx_extract_<mode>_load insn with a new insn that optimizes
storing either element to a memory location, using scratch
registers to pick apart the vector and reconstruct the address.
(vsx_extract_<P:mode>_<VSX_D:mode>_load): Likewise.
(vsx_extract_<mode>_store): Rework alternatives to more correctly
support Altivec registers. Add support for ISA 3.0 Altivec d-form
store instruction.
(vsx_extract_<mode>_var): Add support for extracting a variable
element number from memory.
[gcc/testsuite]
2016-07-30 Michael Meissner <meissner@linux.vnet.ibm.com>
* gcc.target/powerpc/vec-extract-2.c: New tests for vec_extract of
vector double or vector long where the vector is in memory.
* gcc.target/powerpc/vec-extract-3.c: Likewise.
* gcc.target/powerpc/vec-extract-4.c: Likewise.
From-SVN: r238908
2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/69867
* decl.c (build_struct): Ensure that pointers point to something.
2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/69867
* gfortran.dg/pr69867.f90: New test.
From-SVN: r238907
2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/69962
* decl.c (gfc_set_constant_character_len): if expr is not
constant issue an error instead of an ICE.
2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/69962
* gfortran.dg/pr69962.f90: New test.
From-SVN: r238906
2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/70006
* io.c (gfc_resolve_dt): Use correct locus.
* resolve.c (resolve_branch): Ditto.
2016-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/70006
* gfortran.dg/pr70006.f90: New test.
From-SVN: r238905
PR c/71926
* c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
parentheses warning.
* semantics.c (maybe_convert_cond): Use the location of COND for the
parentheses warning.
* g++.dg/warn/Wparentheses-30.C: New test.
* gcc.dg/Wparentheses-14.c: New test.
From-SVN: r238886
PR c/71573
* c-decl.c (implicitly_declare): Return decl early not only for
error_mark_nodes, but for anything that is not a FUNCTION_DECL.
* gcc.dg/noncompile/pr71573.c: New test.
From-SVN: r238885
include/
* libiberty.h (MAX_ALLOCA_SIZE): New macro.
libiberty/
* make-relative-prefix.c (make_relative_prefix_1): Fall back to
malloc if alloca argument is greater than MAX_ALLOCA_SIZE.
From-SVN: r238880
PR tree-optimization/57558
* tree-vect-loop-manip.c (vect_create_cond_for_niters_checks): New
function.
(vect_loop_versioning): Support versioning with niter assumptions.
* tree-vect-loop.c (tree-ssa-loop.h): Include header file.
(vect_get_loop_niters): New parameter. Reimplement to support
assumptions in loop niter info.
(vect_analyze_loop_form_1, vect_analyze_loop_form): Ditto.
(new_loop_vec_info): Init LOOP_VINFO_NITERS_ASSUMPTIONS.
(vect_estimate_min_profitable_iters): Use LOOP_REQUIRES_VERSIONING.
Support loop versioning for niters.
* tree-vectorizer.c (tree-ssa-loop-niter.h): Include header file.
(vect_free_loop_info_assumptions): New function.
(vectorize_loops): Free loop niter info for loops with flag
LOOP_F_ASSUMPTIONS set if vectorization failed.
* tree-vectorizer.h (struct _loop_vec_info): New field
num_iters_assumptions.
(LOOP_VINFO_NITERS_ASSUMPTIONS): New macro.
(LOOP_REQUIRES_VERSIONING_FOR_NITERS): New macro.
(LOOP_REQUIRES_VERSIONING): New macro.
(vect_free_loop_info_assumptions): New decl.
gcc/testsuite
PR tree-optimization/57558
* gcc.dg/vect/pr57558-1.c: New test.
* gcc.dg/vect/pr57558-2.c: New test.
From-SVN: r238877
* init.c (expand_aggr_init_1): Only handle value-init of bases.
* constexpr.c (build_data_member_initialization): Handle multiple
initializers for the same field.
From-SVN: r238867
gcc/
PR rtl-optimization/71976
* combine.c (get_last_value): Return 0 if the argument for which
the function is called has a wider mode than the recorded value.
Co-Authored-By: Georg-Johann Lay <avr@gjlay.de>
From-SVN: r238863
PR c/71969
* c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
on GNU extern inline functions.
* gcc.dg/alias-11.c (add_cfi, new_cfi): Change __inline__ to
static __inline__.
* gcc.dg/pr71969-1.c: New test.
* gcc.dg/pr71969-2.c: New test.
* gcc.dg/pr71969-3.c: New test.
From-SVN: r238862
* acinclude.m4 (libtool_VERSION): Bump to 6:23:0.
* config/abi/pre/gnu.ver: Add 3.4.23 version for new basic_string
symbols.
* configure: Regenerate.
* testsuite/util/testsuite_abi.cc: Add new symbol version.
From-SVN: r238853
The attached patch fixes an out of bound write to memory allocated
with alloca() on the stack. This rarely ever happened because on
one hand -fbounds-check needs to be enabled, and on the other hand
alloca() used to allocate a few bytes extra most of the time so
most of the time the excess write did no harm.
gcc/fortran/ChangeLog:
* trans-array.c (gfc_conv_array_ref): Fix allocation of diagnostic
message (was too small).
From-SVN: r238849
2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/71067
* decl.c (match_data_constant): On error, set 'result' to NULL.
2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/71067
* gfortran.dg/pr71067_1.f90: New test.
* gfortran.dg/pr71067_2.f90: Ditto.
From-SVN: r238842
[gcc]
2016-07-28 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000-protos.h (rs6000_split_vec_extract_var):
New declaration.
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
Add support for vec_extract of vector double or vector long having
a variable element number on 64-bit ISA 2.07 systems or newer.
* config/rs6000/rs6000.c (rs6000_expand_vector_extract):
Likewise.
(rs6000_split_vec_extract_var): New function to split a
vec_extract built-in function with variable element number.
(rtx_is_swappable_p): Variable vec_extracts and shifts are not
swappable.
* config/rs6000/vsx.md (UNSPEC_VSX_VSLO): New unspec.
(UNSPEC_VSX_EXTRACT): Likewise.
(vsx_extract_<mode>, VSX_D iterator): Fix constraints to allow
direct move instructions to be generated on 64-bit ISA 2.07
systems and newer, and to take advantage of the ISA 3.0 MFVSRLD
instruction.
(vsx_vslo_<mode>): New insn to do VSLO on V2DFmode and V2DImode
arguments for vec_extract variable element.
(vsx_extract_<mode>_var, VSX_D iterator): New insn to support
vec_extract with variable element on V2DFmode and V2DImode
vectors.
* config/rs6000/rs6000.h (TARGET_VEXTRACTUB): Remove
-mupper-regs-df requirement, since it isn't needed.
(TARGET_DIRECT_MOVE_64BIT): New macro to say whether we can
do direct moves on 64-bit systems, which allows optimization of
vec_extract on 64-bit ISA 2.07 systems and newer.
[gcc/testsuite]
2016-07-28 Michael Meissner <meissner@linux.vnet.ibm.com>
* gcc.target/powerpc/vec-extract-1.c: New test.
From-SVN: r238838
* testsuite/17_intro/headers/c++2011/stdc++.cc: Change target-specific
dg-options to dg-additional-options so that default options are used.
* testsuite/17_intro/headers/c++2011/stdc++_multiple_inclusion.cc:
Likewise.
* testsuite/17_intro/headers/c++2014/stdc++.cc: Likewise.
* testsuite/17_intro/headers/c++2014/stdc++_multiple_inclusion.cc:
Likewise.
* testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc:
Use dg-additional-options instead of repeating the common options.
From-SVN: r238835
2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/71799
* resolve.c(gfc_resolve_iterator): Failure of type conversion need
not ICE.
2016-07-28 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/71799
* gfortran.dg/pr71799.f90: New test.
From-SVN: r238830