PR target/70118
* config/i386/mmintrin.h (__m64_u): New type
* config/i386/emmintrin.h (_mm_loadl_epi64, _mm_storel_epi64):
Make the allowed unaligned memory access explicit.
From-SVN: r243527
2016-12-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/78226
* error.c (gfc_warning_internal): New function.
* frontend-passes.c (gfc_run_passes): Call check_locus if
CHECKING_P is defined.
(check_locus_code): New function.
(check_locus_expr): New function.
(check_locus): New function.
* gfortran.h: Add prototype for gfc_warning_internal.
From-SVN: r243520
2016-12-10 Krister Walfridsson <krister.walfridsson@gmail.com>
* config.gcc (i386-*-netbsd*): Make i486 the default arch on NetBSD.
Generally use cpu generic.
From-SVN: r243519
2016-12-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/78350
* resolve.c (resolve_structure_cons): Remove the block that
tried to remove a charlen and rely on namespace cleanup.
From-SVN: r243517
PR tree-optimization/78720
* match.pd (A < 0 ? C : 0): Only optimize for signed A. If shift
is negative, sign extend to @1's type and than AND with C.
* gcc.c-torture/execute/pr78720.c: New test.
Co-Authored-By: Marc Glisse <marc.glisse@inria.fr>
From-SVN: r243516
PR sanitizer/78708
* lto-streamer-in.c (input_function): In addition to debug stmts
without -g, remove IFN_*SAN_* calls if corresponding flag_sanitize
bit is not enabled.
From-SVN: r243514
2016-12-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/77903
* decl.c (get_proc_name): Use the symbol tlink field instead of
the typespec interface field.
(gfc_match_function_decl, gfc_match_submod_proc): Ditto.
* gfortran.h : Since the symbol tlink field is no longer used
by the frontend for change management, change the comment to
reflect its current uses.
* parse.c (get_modproc_result): Same as decl.c changes.
* resolve.c (resolve_fl_procedure): Ditto.
2016-12-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/77903
* gfortran.dg/submodule_20.f08: New test.
From-SVN: r243507
2016-12-09 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* gcc.target/powerpc/fold-vec-add-7.c: Require effective target to
support __int128.
From-SVN: r243503
On CPUs that implement popcnt[wd] but not cnttz[wd] we can do better for
the ctz sequences than we do today.
CL[TZ]_DEFINED_VALUE_AT_ZERO can return 2, since we always return the
same fixed value (only dependent on TARGET_* options).
PR target/78683
* config/rs6000/rs6000.h (CLZ_DEFINED_VALUE_AT_ZERO): Use
GET_MODE_BITSIZE. Return 2.
(CTZ_DEFINED_VALUE_AT_ZERO): Use GET_MODE_BITSIZE. Return 2. Handle
TARGET_POPCNTD the same as TARGET_CTZ.
* config/rs6000/rs6000.md (ctz<mode>2): Reimplement.
(ffs<mode>2): Reimplement.
From-SVN: r243499
gcc/ChangeLog:
2016-12-09 Andre Vieira <andre.simoesdiasvieira@arm.com>
PR rtl-optimization/78255
* gcc/postreload.c (reload_cse_simplify): Do not CSE a function if
NO_FUNCTION_CSE is true.
gcc/testsuite/ChangeLog:
2016-12-09 Andre Vieira <andre.simoesdiasvieira@arm.com>
PR rtl-optimization/78255
* gcc.target/aarch64/pr78255.c: New.
* gcc.target/arm/pr78255-1.c: New.
* gcc.target/arm/pr78255-2.c: New.
From-SVN: r243494
PR ipa/78027
gcc/
* ipa-icf.c (sem_function::parse): Don't process functions with
oacc decl attributes, as they may be OpenACC routines.
gcc/testsuite/
* c-c++-common/goacc/acc-icf.c: New test.
* gfortran.dg/goacc/pr78027.f90: New test.
From-SVN: r243488
2016-12-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/61767
* class.c (has_finalizer_component): Fix this function to detect only
non-pointer non-allocatable components which have a finalizer.
2016-12-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/61767
* gfortran.dg/finalize_31.f90: New test.
From-SVN: r243483
gcc/fortran/ChangeLog:
2016-12-09 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/78505
* trans-stmt.c (gfc_trans_allocate): Add sync all after the execution
of the whole allocate-statement to adhere to the standard.
gcc/testsuite/ChangeLog:
2016-12-09 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/78505
* gfortran.dg/coarray_alloc_with_implicit_sync_1.f90: New test.
From-SVN: r243482
gcc/fortran/ChangeLog:
2016-12-09 Andre Vehreschild <vehre@gcc.gnu.org>
* trans-array.c (gfc_array_deallocate): Remove wrapper.
(gfc_trans_dealloc_allocated): Same.
(structure_alloc_comps): Restructure deallocation of (nested)
allocatable components. Insert dealloc of sub-component into the block
guarded by the if != NULL for the component.
(gfc_trans_deferred_array): Use the almightly deallocate_with_status.
* trans-array.h: Remove prototypes.
* trans-expr.c (gfc_conv_procedure_call): Use the almighty deallocate_
with_status.
* trans-openmp.c (gfc_walk_alloc_comps): Likewise.
(gfc_omp_clause_assign_op): Likewise.
(gfc_omp_clause_dtor): Likewise.
* trans-stmt.c (gfc_trans_deallocate): Likewise.
* trans.c (gfc_deallocate_with_status): Allow deallocation of scalar
and arrays as well as coarrays.
(gfc_deallocate_scalar_with_status): Get the data member for coarrays
only when freeing an array with descriptor. And set correct caf_mode
when freeing components of coarrays.
* trans.h: Change prototype of gfc_deallocate_with_status to allow
adding statements into the block guarded by the if (pointer != 0) and
supply a coarray handle.
gcc/testsuite/ChangeLog:
2016-12-09 Andre Vehreschild <vehre@gcc.gnu.org>
* gfortran.dg/coarray_alloc_comp_3.f08: New test.
* gfortran.dg/coarray_alloc_comp_4.f08: New test.
* gfortran.dg/finalize_18.f90: Add count for additional guard against
accessing null-pointer.
* gfortran.dg/proc_ptr_comp_47.f90: New test.
From-SVN: r243480
PR c++/78550
* convert.c (convert_to_integer_1): Maybe fold conversions to
integral types with fewer bits than its mode.
testsuite/
PR c++/78550
* g++.dg/cpp1y/pr78550.C: New.
From-SVN: r243479
2016-12-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/44265
* gfortran.h : Add fn_result_spec bitfield to gfc_symbol.
* resolve.c (flag_fn_result_spec): New function.
(resolve_fntype): Call it for character result lengths.
* symbol.c (gfc_new_symbol): Set fn_result_spec to zero.
* trans-decl.c (gfc_sym_mangled_identifier): Include the
procedure name in the mangled name for symbols with the
fn_result_spec bit set.
(gfc_finish_var_decl): Mark the decls of these symbols
appropriately for the case where the function is external.
(gfc_get_symbol_decl): Mangle the name of these symbols.
(gfc_create_module_variable): Allow them through the assert.
(gfc_generate_function_code): Remove the assert before the
initialization of sym->tlink because the frontend no longer
uses this field.
* trans-expr.c (gfc_map_intrinsic_function): Add a case to
treat the LEN_TRIM intrinsic.
(gfc_trans_string_copy): Deal with Wstringop-overflow warning
that can occur with constant source lengths at -O3.
2016-12-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/44265
* gfortran.dg/char_result_14.f90: New test.
* gfortran.dg/char_result_15.f90: New test.
From-SVN: r243478
PR tree-optimization/78726
* tree-ssa-reassoc.c (make_new_ssa_for_def): Add OPCODE and OP
argument. For lhs uses in debug stmts, don't replace lhs with
new_lhs, but with a debug temp set to new_lhs opcode op.
(make_new_ssa_for_all_defs): Add OPCODE argument, pass OPCODE and
OP down to make_new_ssa_for_def.
(zero_one_operation): Call make_new_ssa_for_all_defs even when
stmts_to_fix is empty, if *def has not changed yet. Pass
OPCODE to make_new_ssa_for_all_defs.
* gcc.c-torture/execute/pr78726.c: New test.
* gcc.dg/guality/pr78726.c: New test.
From-SVN: r243476
This patch fixes an issue in aarch64_classify_address. TImode and TFmode
can either use a 64-bit LDP/STP or 128-bit LDR/STR. The addressing mode
must be carefully modelled as the intersection of both. This is done for
the immediate offsets, however load_store_pair_p must be set as well to
avoid LDP with a PC-relative address if aarch64_pcrelative_literal_loads
is true.
gcc/
PR target/78733
* config/aarch64/aarch64.c (aarch64_classify_address):
Set load_store_pair_p for TImode and TFmode.
testsuite/
* gcc.target/aarch64/pr78733.c: New test.
From-SVN: r243456
gcc/ChangeLog:
* emit-rtl.c (gen_reg_rtx): Move regno_pointer_align and
regno_reg_rtx resizing logic to...
(emit_status::ensure_regno_capacity): ...this new method,
and ensure that the buffers are large enough.
(init_emit): Allocate regno_reg_rtx using ggc_cleared_vec_alloc
rather than ggc_vec_alloc.
* function.h (emit_status::ensure_regno_capacity): New method.
From-SVN: r243447
Rewrite the AES hashing code from gc assembler to C code using
intrinsics. The resulting code generates the same hash code for the
same input as the gc code--that doesn't matter as such, but testing it
ensures that the C code does something useful.
Also change mips64pe32le to mips64p32le in configure script--noticed
during CL review.
Reviewed-on: https://go-review.googlesource.com/34022
From-SVN: r243445