[...]/source-gcc/gcc/testsuite/g++.dg/gomp/tpl-target-update.C: In instantiation of 'void f(T, T) [with T = int]':
[...]/source-gcc/gcc/testsuite/g++.dg/gomp/tpl-target-update.C:19:9: required from here
[...]/source-gcc/gcc/testsuite/g++.dg/gomp/tpl-target-update.C:10:9: internal compiler error: tree check: expected oacc_parallel or oacc_kernels or oacc_data or oacc_host_data or omp_parallel or omp_task or omp_for or omp_simd or cilk_simd or cilk_for or omp_distribute or oacc_loop or omp_teams or omp_target_data or omp_target or omp_sections or omp_single, have omp_target_update in tsubst_expr, at cp/pt.c:14209
0xf5aae1 tree_range_check_failed(tree_node const*, char const*, int, char const*, tree_code, tree_code)
[...]/source-gcc/gcc/tree.c:9384
0x66e201 tree_range_check
[...]/source-gcc/gcc/tree.h:2979
0x66e201 tsubst_expr
[...]/source-gcc/gcc/cp/pt.c:14209
0x6695e3 tsubst_expr
[...]/source-gcc/gcc/cp/pt.c:13752
0x66ac07 tsubst_expr
[...]/source-gcc/gcc/cp/pt.c:13938
0x667c41 instantiate_decl(tree_node*, int, bool)
[...]/source-gcc/gcc/cp/pt.c:20367
0x6ae386 instantiate_pending_templates(int)
[...]/source-gcc/gcc/cp/pt.c:20484
0x6edc3d cp_write_global_declarations()
[...]/source-gcc/gcc/cp/decl2.c:4456
Backport from trunk r222564:
gcc/cp/
* pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
gcc/testsuite/
* g++.dg/gomp/tpl-target-update.C: New file.
Backport from Mainline
2014-11-20 Tejas Belagod <tejas.belagod@arm.com>
* config/aarch64/aarch64-protos.h (aarch64_classify_symbol):
Fixup prototype.
* config/aarch64/aarch64.c (aarch64_expand_mov_immediate,
aarch64_cannot_force_const_mem, aarch64_classify_address,
aarch64_classify_symbolic_expression): Fixup call to
aarch64_classify_symbol.
(aarch64_classify_symbol): Add range-checking for
symbol + offset addressing for tiny and small models.
Backport from mainline
2014-11-20 Tejas Belagod <tejas.belagod@arm.com>
Michael Meissner [Fri, 24 Apr 2015 23:44:41 +0000 (23:44 +0000)]
backport: re PR target/65849 (Add missing tuning knobs to #pragma target/attribute target support)
2015-04-24 Michael Meissner <meissner@linux.vnet.ibm.com>
Backport from mainline
2015-04-24 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/65849
* config/rs6000/rs6000.opt (-mvsx-align-128): Make options that
save to independent variables use the Save attribute. This will
allow these options to be modified with the #pragma/attribute
target support.
(-mallow-movmisalign): Likewise.
(-mallow-df-permute): Likewise.
(-msched-groups): Likewise.
(-malways-hint): Likewise.
(-malign-branch-targets): Likewise.
(-mvectorize-builtins): Likewise.
(-msave-toc-indirect): Likewise.
* config/rs6000/rs6000.c (rs6000_opt_masks): Add more options that
can be set via the #pragma/attribute target support.
(rs6000_opt_vars): Likewise.
(rs6000_inner_target_options): If VSX was set, also set
-mno-avoid-indexed-addresses.
Bill Schmidt [Fri, 24 Apr 2015 21:16:35 +0000 (21:16 +0000)]
backport: altivec.md (*altivec_lvx_<mode>_internal): Remove asterisk from name so this can be generated directly.
2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline r222385
2015-04-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/altivec.md (*altivec_lvx_<mode>_internal): Remove
asterisk from name so this can be generated directly.
(*altivec_stvx_<mode>_internal): Likewise.
* config/rs6000/rs6000.c (rs6000_emit_le_vsx_store): Add assert
that this is never called during or after reload/lra.
(rs6000_frame_related): Remove split_reg
argument and logic that references it.
(emit_frame_save): Remove last parameter from call to
rs6000_frame_related.
(rs6000_emit_prologue): Remove last parameter from eight calls to
rs6000_frame_related. Force generation of stvx instruction for
Altivec register saves. Remove split_reg handling, which is no
longer needed.
(rs6000_emit_epilogue): Force generation of lvx instruction for
Altivec register restores.
2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline r222351
2015-04-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (rtx_is_swappable_p): Commentary
adjustments.
(insn_is_swappable_p): Return 1 for a convert from double to
single precision when all of its uses are splats of BE element
zero.
[gcc/testsuite]
2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline r222351
2015-04-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Bill Schmidt [Fri, 24 Apr 2015 13:45:08 +0000 (13:45 +0000)]
backport: re PR target/65456 (powerpc64le autovectorized copy loop missed optimization)
[gcc]
2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline r222349
2015-04-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/65456
* config/rs6000/rs6000.c (rs6000_option_override_internal): For
VSX + POWER8, enable TARGET_ALLOW_MOVMISALIGN and
TARGET_EFFICIENT_UNALIGNED_VSX if not selected by command line
option.
(rs6000_builtin_mask_for_load): Return 0 for targets with
efficient unaligned VSX accesses so that the vectorizer will use
direct unaligned loads.
(rs6000_builtin_support_vector_misalignment): Always return true
for targets with efficient unaligned VSX accesses.
(rs6000_builtin_vectorization_cost): Cost of unaligned loads and
stores on targets with efficient unaligned VSX accesses is almost
always the same as the cost of an aligned load or store, so model
it that way.
* config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Return 0 for
unaligned vectors if we have efficient unaligned VSX accesses.
* config/rs6000/rs6000.opt (mefficient-unaligned-vector): New
undocumented option.
[gcc/testsuite]
2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline r222349
2015-04-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Bill Schmidt [Sun, 19 Apr 2015 16:51:12 +0000 (16:51 +0000)]
backport: re PR target/65787 (Miscompile due to bad vector swap optimization for little endian)
[gcc]
2015-04-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Jakub Jelinek <jakub@redhat.com>
Backport from mainline r222205
2015-04-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Jakub Jelinek <jakub@redhat.com>
PR target/65787
* config/rs6000/rs6000.c (rtx_is_swappable_p): Ensure that a
subsequent SH_NONE operand does not overwrite an existing *special
value.
(adjust_extract): Handle case where a vec_extract operation is
wrapped in a PARALLEL.
[gcc/testsuite]
2015-04-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline r222205
2015-04-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Mikael Morin [Tue, 14 Apr 2015 09:18:15 +0000 (09:18 +0000)]
re PR fortran/56674 (ICE in check_sym_interfaces)
PR fortran/56674
PR fortran/58813
PR fortran/59016
PR fortran/59024
fortran/
* symbol.c (save_symbol_data, gfc_save_symbol_data): Rename the
former to the latter and make it non-static. Update callers.
* gfortran.h (gfc_save_symbol_data): New prototype.
* decl.c (gfc_match_decl_type_spec): Call 'gfc_save_symbol_data'
before modifying symbols 'sym' and 'dt_sym'.
testsuite/
* gfortran.dg/used_types_27.f90: New.
Jonathan Wakely [Sat, 11 Apr 2015 11:47:25 +0000 (12:47 +0100)]
shared_mutex (shared_timed_mutex): Add comments to explain the logic in the non-pthread_rwlock_t version.
* include/std/shared_mutex (shared_timed_mutex): Add comments to
explain the logic in the non-pthread_rwlock_t version.
(_Mutex): Remove redundant type.
(_M_n_readers): Rename to _S_max_readers.
(_M_write_entered, _M_readers): New convenience functions.
(lock, lock_shared, try_lock_shared, unlock_shared): Use convenience
functions. Use predicates with condition variables. Simplify bitwise
operations.
(try_lock_for, try_shared_lock_for): Convert duration to time_point
and call try_lock_until or try_shared_lock_until respectively.
(try_lock_until, try_shared_lock_until): Wait on the condition
variables until the specified time passes.
(unlock): Add Debug Mode assertion.
(unlock_shared): Add Debug Mode assertion.
* testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: New.
Jonathan Wakely [Sat, 11 Apr 2015 11:47:09 +0000 (12:47 +0100)]
re PR libstdc++/58038 (std::this_thread::sleep_until can cause inifinite sleep)
PR libstdc++/58038
* include/std/thread (this_thread::sleep_for): Check for negative
durations.
(this_thread::sleep_until): Check for times in the past.
* testsuite/30_threads/this_thread/58038.cc: New.
* testsuite/30_threads/this_thread/60421.cc: New.
re PR target/65710 (Thumb1 ICE caused by no register to spill)
2015-04-09 Vladimir Makarov <vmakarov@redhat.com>
PR target/65710
* lra-int.h (lra_bad_spill_regno_start): New.
* lra.c (lra_bad_spill_regno_start): New.
(lra): Set up lra_bad_spill_regno_start. Set up
lra_constraint_new_regno_start unconditionally.
* lra-assigns.c (spill_for): Use lra_bad_spill_regno_start for
spill preferences.
Richard Biener [Tue, 7 Apr 2015 13:40:24 +0000 (13:40 +0000)]
backport: re PR tree-optimization/64909 (Missed vectorization with bdver1)
2015-04-07 Richard Biener <rguenther@suse.de>
Backport from mainline
2015-04-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/64909
PR tree-optimization/65660
* tree-vectorizer.h (vect_get_known_peeling_cost): Adjust
to take a cost vector for scalar iteration cost.
(vect_get_single_scalar_iteration_cost): Likewise.
* tree-vect-loop.c (vect_get_single_scalar_iteration_cost):
Compute the scalar iteration cost into a cost vector.
(vect_get_known_peeling_cost): Use the scalar cost vector to
account for the cost of the peeled iterations.
(vect_estimate_min_profitable_iters): Likewise.
* tree-vect-data-refs.c (vect_peeling_hash_get_lowest_cost):
Likewise.
Dominik Vogt [Tue, 31 Mar 2015 12:04:23 +0000 (12:04 +0000)]
S/390: Hotpatch: Remove special handling of nested functions.
Backport from mainline
gcc/
2015-03-31 Dominik Vogt <vogt@linux.vnet.ibm.com>
* config/s390/s390.c (s390_function_num_hotpatch_hw): Allow hotpatching
nested functions.
(s390_reorg): Adapt to new signature of s390_function_num_hotpatch_hw.
(s390_asm_output_function_label): Adapt to new signature of
s390_function_num_hotpatch_hw
Optimise the code generating assembler output.
Add comments to assembler file.
Jerry DeLisle [Sat, 28 Mar 2015 14:08:18 +0000 (14:08 +0000)]
re PR fortran/65596 (NAMELIST bug with f2003: reads too far)
2015-03-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/65596
* io/transfer.c (data_transfer_init): If in namelist mode and
delimiter is not specified, set it to DELIM_QUOTE, independent
of -std.
Vladimir Makarov [Fri, 27 Mar 2015 19:23:15 +0000 (19:23 +0000)]
backport: re PR rtl-optimization/64688 (internal compiler error: Max. number of generated reload insns per insn is achieved (90))
2015-03-27 Vladimir Makarov <vmakarov@redhat.com>
Backport from mainline
2015-01-30 Vladimir Makarov <vmakarov@redhat.com>
PR target/64688
* lra-constraints.c (original_subreg_reg_mode): New.
(simplify_operand_subreg): Try to simplify subreg of const. Use
original_subreg_reg_mode for it.
(swap_operands): Update original_subreg_reg_mode.
(curr_insn_transform): Set up original_subreg_reg_mode.
2015-03-27 Vladimir Makarov <vmakarov@redhat.com>
Backport from mainline
2015-01-30 Vladimir Makarov <vmakarov@redhat.com>
Bill Schmidt [Thu, 26 Mar 2015 12:03:36 +0000 (12:03 +0000)]
backport: rs6000.c (context.h): New #include.
gcc:
2015-03-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport of r214242, r214254, and bug fix patches from mainline
* config/rs6000/rs6000.c (context.h): New #include.
(tree-pass.h): Likewise.
(make_pass_analyze_swaps): New declaration.
(rs6000_option_override): Register swap-optimization pass.
(swap_web_entry): New class.
(special_handling_values): New enum.
(union_defs): New function.
(union_uses): Likewise.
(insn_is_load_p): Likewise.
(insn_is_store_p): Likewise.
(insn_is_swap_p): Likewise.
(rtx_is_swappable_p): Likewise.
(insn_is_swappable_p): Likewise.
(chain_purpose): New enum.
(chain_contains_only_swaps): New function.
(mark_swaps_for_removal): Likewise.
(swap_const_vector_halves): Likewise.
(adjust_subreg_index): Likewise.
(permute_load): Likewise.
(permute_store): Likewise.
(adjust_extract): Likewise.
(adjust_splat): Likewise.
(handle_special_swappables): Likewise.
(replace_swap_with_copy): Likewise.
(dump_swap_insn_table): Likewise.
(rs6000_analyze_swaps): Likewise.
(pass_data_analyze_swaps): New pass_data.
(pass_analyze_swaps): New class.
(pass_analyze_swaps::gate): New method.
(pass_analyze_swaps::execute): New method.
(make_pass_analyze_swaps): New function.
* config/rs6000/rs6000.opt (moptimize-swaps): New option.
* df.h (web_entry_base): New class, replacing struct web_entry.
(web_entry_base::pred): New method.
(web_entry_base::set_pred): Likewise.
(web_entry_base::unionfind_root): Likewise.
(web_entry_base::unionfind_union): Likewise.
(unionfind_root): Delete external reference.
(unionfind_union): Likewise.
(union_defs): Likewise.
* web.c (web_entry_base::unionfind_root): Convert to method.
(web_entry_base::unionfind_union): Likewise.
(web_entry): New class.
(union_match_dups): Convert to use class structure.
(union_defs): Likewise.
(entry_register): Likewise.
(web_main): Likewise.
[testsuite]
2015-03-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport r214254 and related tests from mainline
* gcc.target/powerpc/swaps-p8-1.c: New test.
* gcc.target/powerpc/swaps-p8-2.c: New test.
* gcc.target/powerpc/swaps-p8-3.c: New test.
* gcc.target/powerpc/swaps-p8-4.c: New test.
* gcc.target/powerpc/swaps-p8-5.c: New test.
* gcc.target/powerpc/swaps-p8-6.c: New test.
* gcc.target/powerpc/swaps-p8-7.c: New test.
* gcc.target/powerpc/swaps-p8-8.c: New test.
* gcc.target/powerpc/swaps-p8-9.c: New test.
* gcc.target/powerpc/swaps-p8-10.c: New test.
* gcc.target/powerpc/swaps-p8-11.c: New test.
* gcc.target/powerpc/swaps-p8-12.c: New test.
* gcc.target/powerpc/swaps-p8-13.c: New test.
* gcc.target/powerpc/swaps-p8-14.c: New test.
* gcc.target/powerpc/swaps-p8-15.c: New test.
* gcc.target/powerpc/swaps-p8-16.c: New test.
* gcc.target/powerpc/swaps-p8-17.c: New test.
Alan Modra [Thu, 26 Mar 2015 08:33:53 +0000 (19:03 +1030)]
re PR regression/63150 (FAIL: gcc.target/powerpc/pr53199.c scan-assembler-times *)
PR target/63150
Backport from trunk 211857 and 221445.
2014-06-20 Maciej W. Rozycki <macro@codesourcery.com>
* config/rs6000/rs6000.md: Append `DONE' to preparation
statements of `bswap' pattern splitters.
2015-03-16 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.md (bswapdi2): Remove one scratch reg.
Modify Z->r bswapdi splitter to use dest in place of scratch.
In r->Z and Z->r bswapdi splitter rename word_high, word_low
to word1, word2 and rearrange logic to suit.
(bswapdi2_64bit): Remove early clobber on Z->r alternative.
(bswapdi2_ldbrx): Likewise. Remove '??' on r->r.
(bswapdi2_32bit): Remove early clobber on Z->r alternative.
Add one '?' on r->r. Modify Z->r splitter to avoid need for
early clobber.
Maxim Kuvyrkov [Tue, 24 Mar 2015 17:19:34 +0000 (17:19 +0000)]
Backport testsuite race fix from mainline
Backport from mainline:
2015-02-19 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
PR testsuite/65116
* lib/target-supports.exp (check_compile): Check whether
additional_sources is defined before using it.
2015-02-19 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
* lib/target-supports.exp (check_compile): Save/restore
additional_sources that may belong to an actual test.
backport: re PR fortran/60255 ([OOP] Deferred character length variable at (1) cannot yet be associated with unlimited polymorphic entities)
gcc/fortran/ChangeLog
2015-03-23 Andre Vehreschild <vehre@gmx.de>
Janus Weil <janus@gcc.gnu.org>
Backported from mainline
PR fortran/60255
Initial patch version: Janus Weil
* class.c (gfc_get_len_component): New.
(gfc_build_class_symbol): Add _len component to unlimited
polymorphic entities.
(find_intrinsic_vtab): Removed emitting of error message.
* gfortran.h: Added prototype for gfc_get_len_component.
* simplify.c (gfc_simplify_len): Use _len component where
available.
* trans-expr.c (gfc_class_len_get): New.
(gfc_conv_intrinsic_to_class): Add handling for deferred
character arrays.
(gfc_conv_structure): Treat _len component correctly.
(gfc_conv_expr): Prevent bind_c handling when not required.
(gfc_trans_pointer_assignment): Propagate _len component.
* trans-stmt.c (class_has_len_component): New.
(trans_associate_var): _len component treatement for associate
context.
(gfc_trans_allocate): Same as for trans_associate_var()
* trans.h: Add prototype for gfc_class_len_get.
gcc/testsuite/ChangeLog
2015-03-20 Andre Vehreschild <vehre@gmx.de>
Backport from mainline
PR fortran/60255
* gfortran.dg/unlimited_polymorphic_2.f03: Removed error.
Converted from dos to unix line endings.
* gfortran.dg/unlimited_polymorphic_20.f03: New test.
Co-Authored-By: Janus Weil <janus@gcc.gnu.org>
From-SVN: r221591
Yvan Roux [Mon, 23 Mar 2015 09:50:33 +0000 (09:50 +0000)]
backport: re PR ipa/63587 (ICE : tree check: expected var_decl, have result_decl in add_local_variables, at tree-inline.c:4112)
gcc/
2015-03-23 Yvan Roux <yvan.roux@linaro.org>
Backport from trunk r216841.
2014-10-29 Martin Liska <mliska@suse.cz>
PR ipa/63587
* cgraphunit.c (cgraph_node::expand_thunk): Only VAR_DECLs are put to local
declarations.
* function.c (add_local_decl): Implementation moved from header file, assert
introduced for tree type.
* function.h: Likewise.
Jerry DeLisle [Mon, 23 Mar 2015 00:16:01 +0000 (00:16 +0000)]
re PR fortran/60956 (error reading (and writing) large text files in gfortran)
2015-03-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/60956
Backport from mainline
* io/fbuf.c (fbuf_flush_list): New function that only flushes
if current fbuf position exceeds a limit.
* io/fbuf.h: Declare the new function.
* io/io.h (enum unit_mode): Add two new modes.
* io/list_read.c (list_formatted_read_scalar): Call new function.
* io/write.c: Include fbuf.h. (list_formatted_write_scalar):
Call new function.
Paul Thomas [Thu, 19 Mar 2015 20:12:29 +0000 (20:12 +0000)]
re PR fortran/59198 (ICE on cyclically dependent polymorphic types)
2014-03-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/59198
* trans-types.c (gfc_get_derived_type): If an abstract derived
type with procedure pointer components has no other type of
component, return the backend_decl. Otherwise build the
components if any of the non-procedure pointer components have
no backend_decl.
2014-03-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/59198
* gfortran.dg/proc_ptr_comp_44.f90 : New test
* gfortran.dg/proc_ptr_comp_45.f90 : New test
Kyrylo Tkachov [Thu, 19 Mar 2015 09:58:42 +0000 (09:58 +0000)]
[simplify-rtx] PR 65235: Calculate element size correctly when simplifying (vec_select (vec_concat (const_int) (...)) [...])
Backport from mainline
2015-03-12 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR rtl-optimization/65235
* simplify-rtx.c (simplify_binary_operation_1, VEC_SELECT case):
When first element of vec_concat is const_int, calculate its size
using second element.
PR rtl-optimization/65235
* gcc.target/aarch64/pr65235_1.c: New test.