Jonathan Wakely [Mon, 24 Oct 2016 16:45:40 +0000 (17:45 +0100)]
Do not retry failed close(3) in filesystem::copy
* src/filesystem/ops.cc (close_fd): Remove.
(do_copy_file): Just use close(3) instead of close_fd, to prevent
retrying on error.
From-SVN: r241485
Jonathan Wakely [Mon, 24 Oct 2016 16:45:31 +0000 (17:45 +0100)]
Implement DR resolutions for filesystem::copy
* src/filesystem/ops.cc (do_copy_file): Return an error if either
source or destination is not a regular file.
(copy): Update comment to refer to LWG 2681. Implement 2682 and 2683
resolutions.
(read_symlink): Add missing ec.clear().
* testsuite/experimental/filesystem/operations/copy.cc: Update
expected behaviour for copying directories with create_symlinks.
Verify that error_code arguments are cleared if there's no error.
* testsuite/experimental/filesystem/operations/read_symlink.cc: New.
From-SVN: r241484
Moritz Klammler [Mon, 24 Oct 2016 16:05:48 +0000 (16:05 +0000)]
download_prerequisites: Conditionally verify checksums of downloaded pacakges.
2016-10-24 Moritz Klammler <moritz@glammler.eu>
* download_prerequisites: Conditionally verify checksums of
downloaded pacakges. Add help text.
* prerequisites.md5: New file.
* prerequisites.sha512: New file.
From-SVN: r241483
Jakub Jelinek [Mon, 24 Oct 2016 16:05:09 +0000 (18:05 +0200)]
trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use VAR_P (x) instead of TREE_CODE (x) == VAR_DECL.
* trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use VAR_P (x)
instead of TREE_CODE (x) == VAR_DECL.
* trans-expr.c (gfc_class_vptr_get, gfc_class_len_get,
gfc_class_len_or_zero_get, gfc_get_vptr_from_expr,
gfc_conv_string_length, conv_base_obj_fcn_val,
gfc_conv_procedure_call, gfc_trans_assignment_1): Likewise.
* trans-openmp.c (gfc_omp_predetermined_sharing,
gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause,
gfc_trans_omp_atomic, gfc_trans_omp_do): Likewise.
* trans-io.c (nml_get_addr_expr): Likewise.
* trans-decl.c (gfc_finish_decl, gfc_build_qualified_array,
gfc_get_symbol_decl, gfc_get_fake_result_decl,
gfc_trans_deferred_vars, gfc_trans_use_stmts,
generate_local_decl): Likewise.
* trans-array.c (trans_array_constructor, trans_array_bound_check,
build_class_array_ref, gfc_array_init_size,
gfc_trans_auto_array_allocation, gfc_trans_g77_array,
gfc_trans_dummy_array_bias, gfc_alloc_allocatable_for_assignment,
gfc_trans_deferred_array): Likewise.
* trans.c (gfc_build_array_ref): Likewise. Use
VAR_OR_FUNCTION_DECL_P (x) instead of TREE_CODE (x) == VAR_DECL
|| TREE_CODE (x) == FUNCTION_DECL.
From-SVN: r241482
Jakub Jelinek [Mon, 24 Oct 2016 16:04:37 +0000 (18:04 +0200)]
i386.c (ix86_in_large_data_p, [...]): Use VAR_P (x) instead of TREE_CODE (x) == VAR_DECL.
* config/i386/i386.c (ix86_in_large_data_p, ix86_expand_builtin): Use
VAR_P (x) instead of TREE_CODE (x) == VAR_DECL.
From-SVN: r241481
Jakub Jelinek [Mon, 24 Oct 2016 16:04:01 +0000 (18:04 +0200)]
cxx-pretty-print.c (pp_cxx_check_constraint): Use VAR_P (x) instead of TREE_CODE (x) == VAR_DECL.
* cxx-pretty-print.c (pp_cxx_check_constraint): Use VAR_P (x)
instead of TREE_CODE (x) == VAR_DECL.
* constraint.cc (get_concept_definition): Likewise.
(finish_shorthand_constraint): Likewise.
* init.c (warn_placement_new_too_small): Likewise.
* cp-gimplify.c (cp_genericize_r): Likewise.
From-SVN: r241480
Ville Voutilainen [Mon, 24 Oct 2016 13:22:11 +0000 (16:22 +0300)]
Cross-port exception-safety and move fixes of std::any to std::experimental::any.
Cross-port exception-safety and move fixes of std::any to
std::experimental::any.
* include/experimental/any (operator=(const any&)):
Make strongly exception-safe.
(operator=(any&&)): clear() unconditionally in the case where
rhs has a value.
(_Manager_internal<_Tp>::_S_manage): Move in _Op_xfer, don't copy.
* testsuite/experimental/any/assign/2.cc: Adjust.
* testsuite/experimental/any/assign/exception.cc: New.
* testsuite/experimental/any/cons/2.cc: Adjust.
* testsuite/experimental/any/misc/any_cast_neg.cc: Ajust.
From-SVN: r241479
Richard Biener [Mon, 24 Oct 2016 12:58:20 +0000 (12:58 +0000)]
re PR testsuite/71491 (gcc.dg/vect/slp-43.c FAILs)
2016-10-24 Richard Biener <rguenther@suse.de>
PR testsuite/71491
* gcc.dg/vect/slp-43.c: Adjust for !vect_hw_misalign.
* gcc.dg/vect/slp-45.c: Likewise.
From-SVN: r241478
Ville Voutilainen [Mon, 24 Oct 2016 12:46:44 +0000 (15:46 +0300)]
Cross-port the latest resolution of LWG2756 and some bug-fixes to experimental::optional.
Cross-port the latest resolution of LWG2756 and some
bug-fixes to experimental::optional.
PR libstdc++/77288
PR libstdc++/77727
* include/experimental/optional (_Optional_base):
Remove constructors that take a _Tp.
(__is_optional_impl, __is_optional): Remove.
(__converts_from_optional): New.
(optional(_Up&&)): Fix constraints, call base with in_place.
(optional(const optional<_Up>&)): Fix constraints, use emplace.
(optional(optional<_Up>&&)): Likewise.
(operator=(_Up&&)): Fix constraints.
(operator=(const optional<_Up>&)): Likewise.
(operator=(optional<_Up>&&)): Likewise.
(emplace(_Args&&...)): Constrain.
(emplace(initializer_list<_Up>, _Args&&...)): Likewise.
* testsuite/experimental/optional/77288.cc: New.
* testsuite/experimental/optional/assignment/5.cc: Adjust.
* testsuite/experimental/optional/cons/77727.cc: New.
* testsuite/experimental/optional/cons/value.cc: Adjust.
From-SVN: r241476
Jonathan Wakely [Mon, 24 Oct 2016 12:25:28 +0000 (13:25 +0100)]
Make vector::data() return type consistent in C++98
* include/bits/stl_vector.h (vector::_M_data_ptr, vector::data):
Change return type of non-standard C++98 extension to match C++11.
From-SVN: r241475
Ximin Luo [Mon, 24 Oct 2016 11:57:27 +0000 (12:57 +0100)]
re PR debug/77985 (DW_AT_comp_dir is omitted when filename is absolute and the file does not contain a specific typedef)
2016-10-24 Ximin Luo <infinity0@pwned.gg>
PR debug/77985
* dwarf2out.c (file_table_relative_p): Remove.
(gen_compile_unit_die, dwarf2out_early_finish): Emit DW_AT_comp_dir
also for absolute paths.
* doc/tm.texi: Update.
* doc/tm.texi.in (SDB and DWARF) <TARGET_FORCE_AT_COMP_DIR>: Remove.
* target.def (force_at_comp_dir): Remove hook.
* config/darwin.h (TARGET_FORCE_AT_COMP_DIR): Remove define.
From-SVN: r241473
Paul Thomas [Mon, 24 Oct 2016 11:45:17 +0000 (11:45 +0000)]
Remove dead wood from trans-expr.c
From-SVN: r241472
Kyrylo Tkachov [Mon, 24 Oct 2016 11:23:36 +0000 (11:23 +0000)]
[check_GNU_style.sh] More aggressively ignore dg-xxx directives
* check_GNU_style.sh (remove_testsuite): New function.
Use it to remove testsuite from the diff.
From-SVN: r241471
Richard Biener [Mon, 24 Oct 2016 11:22:42 +0000 (11:22 +0000)]
tree-vrp.c (evrp_dom_walker::before_dom_children): Ignore backedges when identifying the single predecessor to take conditional...
2016-10-24 Richard Biener <rguenther@suse.de>
* tree-vrp.c (evrp_dom_walker::before_dom_children): Ignore
backedges when identifying the single predecessor to take
conditional info from. Use SCEV to get at ranges for loop IVs.
* lto-streamer-out.c (lto_write_mode_table): CSE inner mode to
avoid false warning.
* gcc.dg/tree-ssa/cunroll-13.c: Disable EVRP.
* gcc.dg/tree-ssa/pr21458.c: Likewise.
* gcc.dg/tree-ssa/pr21458-2.c: New testcase for EVRP.
From-SVN: r241470
Rainer Orth [Mon, 24 Oct 2016 11:18:21 +0000 (11:18 +0000)]
Parallelize check-gnat
* gcc-interface/Make-lang.in (lang_checks_parallelized): New target.
(check_gnat_parallelize): Likewise.
From-SVN: r241469
Georg-Johann Lay [Mon, 24 Oct 2016 11:02:51 +0000 (11:02 +0000)]
re PR target/78093 ([avr] New variable attribute "absdata" and option "-mabsdata" to enable LDS / STS on Reduced Tiny)
gcc/
PR target/78093
* doc/extend.texi (AVR Variable Attributes) [absdata]: Document it.
* config/avr/avr.c (AVR_SYMBOL_FLAG_TINY_ABSDATA): New macro.
(avr_address_tiny_absdata_p): New static function.
(avr_legitimate_address_p, avr_legitimize_address) [AVR_TINY]: Use
it to determine validity of constant addresses.
(avr_attribute_table) [absdata]: New variable attribute...
(avr_handle_absdata_attribute): ...and handler.
(avr_decl_absdata_p): New static function.
(avr_encode_section_info) [AVR_TINY]: Use it to add flag
AVR_SYMBOL_FLAG_TINY_ABSDATA to respective symbols_refs.
(avr_address_cost) [AVR_TINY]: absdata addresses cost 2.
gcc/testsuite/
PR target/78093
* lib/target-supports.exp (check_effective_target_avr_tiny): New proc.
* gcc.target/avr/torture/tiny-absdata-1.c: New test.
From-SVN: r241468
Richard Biener [Mon, 24 Oct 2016 10:31:03 +0000 (10:31 +0000)]
re PR tree-optimization/78076 (Conditional jump or move depends on uninitialised value @ tree-vect-loop.c:2307)
2016-10-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/78076
* tree-ssa-loop-split.c (tree_ssa_split_loops): Reset aux
also on the loop tree root.
From-SVN: r241467
Andre Vieira [Mon, 24 Oct 2016 08:57:45 +0000 (08:57 +0000)]
pure-code.exp: Restore saved globals.
2016-10-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
* gcc.target/arm/pure-code/pure-code.exp: Restore saved globals.
From-SVN: r241466
Jakub Jelinek [Mon, 24 Oct 2016 08:29:42 +0000 (10:29 +0200)]
i386.c (ix86_fold_builtin): Handle IX86_BUILTIN_BEXTR{,I}{32,64}...
* config/i386/i386.c (ix86_fold_builtin): Handle
IX86_BUILTIN_BEXTR{,I}{32,64}, IX86_BUILTIN_BZHI{32,64},
IX86_BUILTIN_PDEP{32,64} and IX86_BUILTIN_PEXT{32,64}.
(ix86_gimple_fold_builtin): Handle IX86_BUILTIN_BZHI{32,64},
IX86_BUILTIN_PDEP{32,64} and IX86_BUILTIN_PEXT{32,64}.
* gcc.target/i386/bmi2-pext-1.c: New test.
* gcc.target/i386/bmi2-pdep-1.c: New test.
* gcc.target/i386/bmi2-bzhi-3.c: New test.
* gcc.target/i386/tbm-bextri-1.c: New test.
* gcc.target/i386/bmi-bextr-6.c: New test.
From-SVN: r241465
Rainer Orth [Mon, 24 Oct 2016 08:07:27 +0000 (08:07 +0000)]
Work around 32-bit i386 STV testcases failing with -mstackrealign (PR target/77483)
PR target/77483
* gcc.target/i386/mask-unpack.c (dg-options): Add -mno-stackrealign.
* gcc.target/i386/pr65105-1.c: Likewise.
* gcc.target/i386/pr65105-2.c: Likewise.
* gcc.target/i386/pr65105-3.c: Likewise.
* gcc.target/i386/pr65105-5.c: Likewise.
* gcc.target/i386/pr67761.c: Likewise.
* gcc.target/i386/pr70799-1.c: Likewise.
From-SVN: r241464
Martin Liska [Mon, 24 Oct 2016 07:00:53 +0000 (09:00 +0200)]
Do not disable aggressive loop opts for
PR sanitizer/77966
* opts.c (finish_options): Skip conditionally.
PR sanitizer/77966
* c-c++-common/ubsan/unreachable-3.c: New test.
From-SVN: r241463
GCC Administrator [Mon, 24 Oct 2016 00:16:14 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r241460
Martin Sebor [Sun, 23 Oct 2016 22:38:24 +0000 (22:38 +0000)]
PR target/77837 - missing -Wformat-length warning for %p with null argument on powerpc64
gcc/ChangeLog:
PR target/77837
* config/rs6000/linux.h (TARGET_PRINTF_POINTER_FORMAT): Define.
* config/rs6000/linux64.h (TARGET_PRINTF_POINTER_FORMAT): Likewise.
From-SVN: r241457
Steven G. Kargl [Sun, 23 Oct 2016 21:26:44 +0000 (21:26 +0000)]
re PR fortran/77763 (ICE in parse_struct_map, at fortran/parse.c:3064)
2016-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77763
* parse.c (parse_spec): Allow STRUCTURE in BLOCK DATA. Sort
case labels.
2016-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77763
* gfortran.dg/pr77763.f90
From-SVN: r241454
Eric Botcazou [Sun, 23 Oct 2016 20:31:41 +0000 (20:31 +0000)]
sparc.md (cpu_feature): Minor tweak.
* config/sparc/sparc.md (cpu_feature): Minor tweak.
(enabled): Likewise.
(movsi_insn, movdi_insn_sp32, movdi_insn_sp64, movsf_insn,
movdf_insn_sp32, movdf_insn_sp64, zero_extendsidi2_insn_sp64,
sign_extendsidi2_insn, mov<VM32:mode>_insn, mov<VM64:mode>_insn_sp64,
mov<VM64:mode>_insn_sp32, not_<code><mode>, nand<mode>_vis,
<code>_not1<mode>_vi, <code>_not2<mode>_vis, one_cmpl<mode>2,
fcmp<code><GCM:gcm_name>, pdistn<mode>_vis): Likewise.
From-SVN: r241452
Steven G. Kargl [Sun, 23 Oct 2016 18:12:28 +0000 (18:12 +0000)]
re PR fortran/54730 (ICE in gfc_typenode_for_spec, at fortran/trans-types.c:1066)
2016-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/54730
PR fortran/78033
* array.c (gfc_match_array_constructor): Remove checkpointing
introduced in r196416 (original fix for PR fortran/54730). Move
initialization to top of function.
* match.c (gfc_match_type_spec): Special case matching for REAL.
2016-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/54730
PR fortran/78033
* gfortran.dg/pr78033.f90: New test.
From-SVN: r241451
Paul Thomas [Sun, 23 Oct 2016 18:09:14 +0000 (18:09 +0000)]
re PR fortran/69834 ([OOP] Collision in derived type hashes)
2016-10-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69834
* class.c (gfc_find_derived_vtab): Obtain the gsymbol for the
derived type's module. If the gsymbol is present and the top
level namespace corresponds to a module, use the gsymbol name
space. In the search to see if the vtable exists, try the gsym
namespace first.
* dump-parse-tree (show_code_node): Modify select case dump to
show select type construct.
* resolve.c (build_loc_call): New function.
(resolve_select_type): Add check for repeated type is cases.
Retain selector expression and use it later instead of expr1.
Exclude deferred length TYPE IS cases and emit error message.
Store the address for the vtable in the 'low' expression and
the hash value in the 'high' expression, for each case. Do not
call resolve_select.
* trans.c(trans_code) : Call gfc_trans_select_type.
* trans-stmt.c (gfc_trans_select_type_cases): New function.
(gfc_trans_select_type): New function.
* trans-stmt.h : Add prototype for gfc_trans_select_type.
2016-10-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69834
* gfortran.dg/select_type_1.f03: Change error for overlapping
TYPE IS cases.
* gfortran.dg/select_type_36.f03: New test.
From-SVN: r241450
Eric Botcazou [Sun, 23 Oct 2016 10:55:04 +0000 (10:55 +0000)]
sparc-c.c (sparc_target_macros): Replace TARGET_64BIT with TARGET_ARCH64.
* config/sparc/sparc-c.c (sparc_target_macros): Replace TARGET_64BIT
with TARGET_ARCH64. Define __VIS to 0x400 if TARGET_VIS4.
From-SVN: r241446
François Dumont [Sun, 23 Oct 2016 10:26:59 +0000 (10:26 +0000)]
2016-10-22 François Dumont <fdumont@gcc.gnu.org>
* include/bits/c++config (_GLIBCXX_BEGIN_NAMESPACE_ALGO)
(_GLIBCXX_END_NAMESPACE_ALGO): Default to respectively
_GLIBCXX_BEGIN_NAMESPACE_VERSION and _GLIBCXX_END_NAMESPACE_VERSION.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER, _GLIBCXX_END_NAMESPACE_CONTAINER):
Likewise.
From-SVN: r241445
GCC Administrator [Sun, 23 Oct 2016 00:16:18 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r241444
Eric Botcazou [Sat, 22 Oct 2016 18:23:39 +0000 (18:23 +0000)]
* gcc.dg/tree-ssa/pr71347.c: Remove XFAIL on SPARC.
From-SVN: r241441
Thomas Koenig [Sat, 22 Oct 2016 14:04:46 +0000 (14:04 +0000)]
re PR fortran/78021 (Wrong result with optimization on character constant)
2016-10-22 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/78021
* gfc_compare_functions: Strings with different lengths in
argument lists compare unequal.
2016-10-22 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/78021
* gfortran.dg/string_length_3.f90: New test.
From-SVN: r241440
Andre Vehreschild [Sat, 22 Oct 2016 12:33:38 +0000 (14:33 +0200)]
re PR fortran/43366 ([OOP][F08] Intrinsic assign to polymorphic variable)
gcc/fortran/ChangeLog:
2016-10-22 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/43366
PR fortran/51864
PR fortran/57117
PR fortran/61337
PR fortran/61376
* primary.c (gfc_expr_attr): For transformational functions on classes
get the attrs from the class argument.
* resolve.c (resolve_ordinary_assign): Remove error message due to
feature implementation. Rewrite POINTER_ASSIGNS to ordinary ones when
the right-hand side is scalar class object (with some restrictions).
* trans-array.c (trans_array_constructor): Create the temporary from
class' inner type, i.e., the derived type.
(build_class_array_ref): Add support for class array's storage of the
class object or the array descriptor in the decl saved descriptor.
(gfc_conv_expr_descriptor): When creating temporaries for class objects
add the class object's handle into the decl saved descriptor.
(structure_alloc_comps): Use the common way to get the _data component.
(gfc_is_reallocatable_lhs): Add notion of allocatable class objects.
* trans-expr.c (gfc_find_and_cut_at_last_class_ref): Remove the only ref
only when the expression's type is BT_CLASS.
(gfc_trans_class_init_assign): Correctly handle class arrays.
(gfc_trans_class_assign): Joined into gfc_trans_assignment_1.
(gfc_conv_procedure_call): Support for class types as arguments.
(trans_get_upoly_len): For unlimited polymorphics retrieve the _len
component's tree.
(trans_class_vptr_len_assignment): Catch all ways to assign the _vptr
and _len components of a class object correctly.
(pointer_assignment_is_proc_pointer): Identify assignments of
procedure pointers.
(gfc_trans_pointer_assignment): Enhance support for class object pointer
assignments.
(gfc_trans_scalar_assign): Removed assert.
(trans_class_assignment): Assign to a class object.
(gfc_trans_assignment_1): Treat class objects correctly.
(gfc_trans_assignment): Propagate flags to trans_assignment_1.
* trans-stmt.c (gfc_trans_allocate): Use gfc_trans_assignment now
instead of copy_class_to_class.
* trans-stmt.h: Function prototype removed.
* trans.c (trans_code): Less special casing for class objects.
* trans.h: Added flags to gfc_trans_assignment () prototype.
gcc/testsuite/ChangeLog:
2016-10-22 Andre Vehreschild <vehre@gcc.gnu.org>
Forgot to add on original commit.
* gfortran.dg/coarray_alloc_comp_2.f08: New test.
2016-10-22 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/43366
PR fortran/57117
PR fortran/61337
* gfortran.dg/alloc_comp_class_5.f03: New test.
* gfortran.dg/class_allocate_21.f90: New test.
* gfortran.dg/class_allocate_22.f90: New test.
* gfortran.dg/realloc_on_assign_27.f08: New test.
From-SVN: r241439
Jonathan Wakely [Sat, 22 Oct 2016 11:42:16 +0000 (12:42 +0100)]
Ignore perms::symlink_nofollow on non-symlinks
* src/filesystem/ops.cc (permissions(const path&, perms, error_code&)):
Ignore symlink_nofollow flag if file is not a symlink.
* testsuite/experimental/filesystem/operations/permissions.cc: Test
symlink_nofollow on non-symlinks.
From-SVN: r241438
Andrew Pinski [Sat, 22 Oct 2016 03:40:06 +0000 (03:40 +0000)]
aarch64-cores.def: Rewrite so IMP and PART are integer constants.
2016-10-21 Andrew Pinski <apinski@cavium.com>
* config/aarch64/aarch64-cores.def: Rewrite so IMP and PART are
integer constants.
* config/aarch64/driver-aarch64.c (struct aarch64_core_data): Change
implementer_id to unsigned char.
Change part_no to unsigned int.
(AARCH64_BIG_LITTLE): New define.
(INVALID_IMP): New define.
(INVALID_CORE): New define.
(cpu_data): Change the last element's implementer_id and part_no to
integers.
(valid_bL_string_p): Rewrite to ..
(valid_bL_core_p): this for integers instead of strings.
(parse_field): New function.
(contains_string_p): Rewrite to ...
(contains_core_p): this for integers and only for the part_no.
(host_detect_local_cpu): Rewrite handling of implementation and
par num to be integers; simplifying the code.
From-SVN: r241437
GCC Administrator [Sat, 22 Oct 2016 00:16:15 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r241436
Ian Lance Taylor [Fri, 21 Oct 2016 21:01:04 +0000 (21:01 +0000)]
libgo: keep c0 and c1 out of runtime.inc
The constants named c0 and c1 turn up as macros in runtime.inc. This
reportedly breaks building on Solaris 11, where there is a system struct
that has a field named c1. The constants aren't needed by the runtime C
code, so avoid the problem by grepping them out.
Reviewed-on: https://go-review.googlesource.com/31730
From-SVN: r241432
Ian Lance Taylor [Fri, 21 Oct 2016 20:44:46 +0000 (20:44 +0000)]
libgo: leave Int64Align as 8 on 32-bit SPARC
Verified by testing on SPARC Solaris.
Reviewed-on: https://go-review.googlesource.com/31675
From-SVN: r241430
Jeff Law [Fri, 21 Oct 2016 20:41:34 +0000 (14:41 -0600)]
re PR tree-optimization/71947 (x ^ y not folded to 0 if x == y by DOM)
* PR tree-optimization/71947
* gcc.dg/tree-ssa/pr71947-4.c: Avoid x86 opcode.
* gcc.dg/tree-ssa/pr71947-5.c: Likewise.
* gcc.dg/tree-ssa/pr71947-6.c: Make it opt-in rather than opt-out.
From-SVN: r241429
Kugan Vivekanandarajah [Fri, 21 Oct 2016 20:13:55 +0000 (20:13 +0000)]
ADDR_EXPR and nonnull
ADDR_EXPR and nonnull
gcc/ChangeLog:
2016-10-21 Kugan Vivekanandarajah <kuganv@linaro.org>
* ipa-prop.c (ipa_compute_jump_functions_for_edge): Create nonzero
value range for pointers in more cases.
gcc/testsuite/ChangeLog:
2016-10-21 Kugan Vivekanandarajah <kuganv@linaro.org>
* gcc.dg/ipa/vrp5.c: New test.
* gcc.dg/ipa/vrp6.c: New test.
From-SVN: r241428
Ian Lance Taylor [Fri, 21 Oct 2016 20:07:06 +0000 (20:07 +0000)]
runtime: copy lfstack code from Go 1.7 runtime
Note that lfstack_64bit.go was modified for Solaris support in a
different, and better, way than the superseded lfstack.goc code.
Reviewed-on: https://go-review.googlesource.com/31673
From-SVN: r241427
Jason Merrill [Fri, 21 Oct 2016 19:45:45 +0000 (15:45 -0400)]
re PR c++/77656 (64-bit integral template parameter gets incorrectly sized as 32-bits)
PR c++/77656
* pt.c (convert_template_argument): Call convert_nontype_argument
on value-dependent but not type-dependent arguments.
(convert_nontype_argument): Handle value-dependent arguments.
(canonicalize_expr_argument): New.
(deducible_expression, unify): Skip CONVERT_EXPR.
* error.c (dump_template_argument): Likewise.
* mangle.c (write_expression): Likewise.
From-SVN: r241425
Jason Merrill [Fri, 21 Oct 2016 19:45:39 +0000 (15:45 -0400)]
* ptree.c (cxx_print_xnode) [TEMPLATE_PARM_INDEX]: Dump the decl.
From-SVN: r241424
Jerry DeLisle [Fri, 21 Oct 2016 18:02:32 +0000 (18:02 +0000)]
re PR libfortran/78055 (Many new gfortran test failures)
2016-10-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/78055
* io/io.h (st_parameter_dt): Restore GFC_IO_INT to maintain
alignment.
From-SVN: r241422
Wilco Dijkstra [Fri, 21 Oct 2016 17:27:15 +0000 (17:27 +0000)]
Really add the test this time...
testsuite/
* gcc.target/aarch64/test_frame_17.c: New test.
From-SVN: r241421
Wilco Dijkstra [Fri, 21 Oct 2016 17:15:22 +0000 (17:15 +0000)]
Improve stack adjustment by reusing a temporary move immediate from the epilog...
Improve stack adjustment by reusing a temporary move immediate from the epilog
if the register is still valid in the epilog. This generates smaller code for
leaf functions with a stack size of more then 4KB.
gcc/
* config/aarch64/aarch64.c (aarch64_add_constant_internal):
Add extra argument to allow emitting the move immediate.
Use add/sub with positive immediate.
(aarch64_add_constant): Add inline function.
(aarch64_add_sp): Likewise.
(aarch64_sub_sp): Likewise.
(aarch64_expand_prologue): Call aarch64_sub_sp.
(aarch64_expand_epilogue): Call aarch64_add_sp.
Decide when to leave out move.
(aarch64_output_mi_thunk): Call aarch64_add_constant.
testsuite/
* gcc.target/aarch64/test_frame_17.c: New test.
From-SVN: r241420
Wilco Dijkstra [Fri, 21 Oct 2016 17:04:21 +0000 (17:04 +0000)]
If the number of integer callee-saves is odd, any FP callee-saves use 8-byte aligned LDP/STP.
If the number of integer callee-saves is odd, any FP callee-saves use 8-byte
aligned LDP/STP. Since 16-byte alignment may be faster on some CPUs, align
the FP callee-saves to 16 bytes and use the alignment gap for the last FP
callee-save when possible.
gcc/
* config/aarch64/aarch64.c (aarch64_layout_frame):
Align FP callee-saves.
From-SVN: r241419
Jonathan Wakely [Fri, 21 Oct 2016 17:01:05 +0000 (18:01 +0100)]
LWG2720 implement filesystem::perms::symlink_nofollow
* include/experimental/bits/fs_fwd.h (perms::resolve_symlinks):
Replace with symlink_nofollow (LWG 2720).
* src/filesystem/ops.cc (permissions(const path&, perms, error_code&)):
Handle symlink_nofollow.
* testsuite/experimental/filesystem/operations/create_symlink.cc: New
test.
* testsuite/experimental/filesystem/operations/permissions.cc: Test
overload taking error_code.
From-SVN: r241418
Jonathan Wakely [Fri, 21 Oct 2016 17:00:59 +0000 (18:00 +0100)]
LWG2725 Fix error reporting for filesystem::exists
* include/experimental/bits/fs_ops.h
(exists(const path&, error_code&)): Clear error if status is known
(LWG 2725).
(status(const path&, error_code&)): Handle EOVERFLOW.
* testsuite/experimental/filesystem/operations/exists.cc: Test
overload taking an error_code.
From-SVN: r241417
Jonathan Wakely [Fri, 21 Oct 2016 17:00:53 +0000 (18:00 +0100)]
LWG2707 init filesystem::path from string_type&&
* include/experimental/bits/fs_path.h (path::path(string_type&&))
(path::operator=(string&&), path::assign(string_type&&)): Define
construction and assignment from string_type rvalues (LWG 2707).
From-SVN: r241416
Andris Pavenis [Fri, 21 Oct 2016 16:22:51 +0000 (19:22 +0300)]
re PR preprocessor/71681 (header.gcc file lookup is broken for -remap)
2016-10-21 Andris Pavenis <andris.pavenis@iki.fi>
PR preprocessor/71681
* gcc.dg/cpp/pr71681-1.c: New testcase
* gcc.dg/cpp/pr71681-2.c: Likewise
* gcc.dg/cpp/remap/header.gcc: File for added test-cases
* gcc.dg/cpp/remap/a/header.gcc: Likewise
* gcc.dg/cpp/remap/a/t_1.h: Likewise
* gcc.dg/cpp/remap/a/t_2.h: Likewise
From-SVN: r241415
Eelis van der Weegen [Fri, 21 Oct 2016 15:55:07 +0000 (15:55 +0000)]
Optimize RNG use in std::sample selection sampling
2016-10-21 Eelis van der Weegen <eelis@eelis.net>
* include/bits/stl_algo.h (__gen_two_uniform_ints): Move logic out
of shuffle into new function.
(shuffle): Call __gen_two_uniform_ints.
(__sample<ForwardIterator, OutputIterator, Cat, Size, URBG>): Use
__gen_two_uniform_ints and perform two samples at a time.
From-SVN: r241414
Andris Pavenis [Fri, 21 Oct 2016 15:52:25 +0000 (18:52 +0300)]
re PR preprocessor/71681 (header.gcc file lookup is broken for -remap)
2016-10-21 Andris Pavenis <andris.pavenis@iki.fi>
PR preprocessor/71681
* files.c (remap_filename): Fix handling -remap in subdirectories.
From-SVN: r241413
Jakub Jelinek [Fri, 21 Oct 2016 15:40:48 +0000 (17:40 +0200)]
adxintrin.h (_subborrow_u32, [...]): Formatting fixes.
* config/i386/adxintrin.h (_subborrow_u32, _addcarry_u32,
_addcarryx_u32, _subborrow_u64, _addcarry_u64, _addcarryx_u64):
Formatting fixes.
* config/i386/rdseedintrin.h (_rdseed16_step, _rdseed32_step,
_rdseed64_step): Likewise.
* config/i386/tbmintrin.h (__bextri_u32): Likewise.
From-SVN: r241412
Jakub Jelinek [Fri, 21 Oct 2016 15:39:25 +0000 (17:39 +0200)]
re PR target/78057 (FAIL: gcc.target/i386/bmi-{4,5,6}.c)
PR target/78057
* config/i386/i386.c: Include fold-const-call.h, tree-vrp.h
and tree-ssanames.h.
(ix86_fold_builtin): Fold IX86_BUILTIN_[LT]ZCNT{16,32,64}
with INTEGER_CST argument.
(ix86_gimple_fold_builtin): New function.
(TARGET_GIMPLE_FOLD_BUILTIN): Define.
* gcc.target/i386/pr78057.c: New test.
From-SVN: r241411
Jonathan Wakely [Fri, 21 Oct 2016 15:32:25 +0000 (16:32 +0100)]
Split <functional> into smaller pieces
* include/Makefile.am: Add <bits/refwrap.h> and <bits/std_function.h>.
Order alphabetically.
* include/Makefile.in: Regenerate.
* include/bits/refwrap.h: New header.
(_Maybe_get_result_type,_Weak_result_type_impl, _Weak_result_type)
(_Reference_wrapper_base_impl, _Reference_wrapper_base)
(reference_wrapper, ref, cref): Move here from <functional>.
* include/bits/shared_ptr_base.h: Include <bits/refwrap.h> and
<bits/stl_function.h> instead of <functional>.
* include/bits/std_function.h: New header.
(_Maybe_unary_or_binary_function, bad_function_call)
(__is_location_invariant, _Nocopy_types, _Any_data)
(_Simple_type_wrapper, _Function_base, _Function_handler, function):
Move here from <functional>.
* include/bits/unique_ptr.h: Include <bits/stl_function.h>.
* include/std/functional: Include new headers and move components to
them.
* include/std/future: Include <bits/std_function.h> instead of
<functional>.
* include/std/mutex: Likewise.
* include/std/regex: Likewise.
* src/c++11/compatibility-thread-c++0x.cc: Include <functional>.
* testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
* testsuite/20_util/default_delete/void_neg.cc: Likewise.
* testsuite/20_util/unique_ptr/assign/48635_neg.cc: Adjust dg-error
lines.
* testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc: Likewise.
* testsuite/30_threads/packaged_task/49668.cc: Include <functional>.
From-SVN: r241410
Jakub Jelinek [Fri, 21 Oct 2016 15:19:52 +0000 (17:19 +0200)]
dwarf2out.c (ranges_table): Change into vec<dw_ranges, va_gc> *.
* dwarf2out.c (ranges_table): Change into vec<dw_ranges, va_gc> *.
(ranges_by_label): Change into vec<dw_ranges_by_label, va_gc> *.
(ranges_table_allocated, ranges_table_in_use,
ranges_by_label_allocated, ranges_by_label_in_use,
RANGES_TABLE_INCREMENT): Removed.
(add_ranges_num): Use vec_safe_push into ranges_table.
(add_ranges_by_labels): Use vec_safe_push into ranges_by_label.
(output_ranges): Adjust for ranges_table and ranges_by_label
conversion from arrays to vec.
(add_high_low_attributes, dwarf2out_finish): Adjust for range_table
conversion from arrays to vec.
(dwarf2out_c_finalize): Don't clear ranges_table_allocated,
ranges_table_in_use, ranges_by_label_allocated and
ranges_by_label_in_use. Set ranges_by_label to NULL instead of 0.
From-SVN: r241409
Jakub Jelinek [Fri, 21 Oct 2016 15:11:48 +0000 (17:11 +0200)]
dwarf2out.c (gen_variable_die): Emit DW_AT_const_expr attribute if needed.
* dwarf2out.c (gen_variable_die): Emit DW_AT_const_expr attribute
if needed. Re-add origin_die variable and its initialization.
cp/
* cp-objcp-common.c (cp_decl_dwarf_attribute): Handle
DW_AT_const_expr.
testsuite/
* g++.dg/debug/dwarf2/constexpr-var-1.C: New test.
From-SVN: r241408
Jakub Jelinek [Fri, 21 Oct 2016 15:09:49 +0000 (17:09 +0200)]
gimplify.c (gimplify_bind_expr): Handle oacc_declare_returns even for -fstack-reuse=none, or for volatile vars etc.
* gimplify.c (gimplify_bind_expr): Handle oacc_declare_returns
even for -fstack-reuse=none, or for volatile vars etc.
From-SVN: r241407
David Malcolm [Fri, 21 Oct 2016 13:52:53 +0000 (13:52 +0000)]
Start adding selftests for print_rtx
gcc/ChangeLog:
* print-rtl-function.c (flag_compact): Move extern decl to...
* print-rtl.h (flag_compact): ...here.
* rtl-tests.c (selftests::assert_rtl_dump_eq): New function.
(ASSERT_RTL_DUMP_EQ): New macro.
(selftest::test_dumping_regs): New function.
(selftest::test_dumping_insns): New function.
(selftest::test_uncond_jump): Add uses of ASSERT_RTL_DUMP_EQ on
the insns.
(selftest::rtl_tests_c_tests): Call the new test functions.
From-SVN: r241405
Jonathan Wakely [Fri, 21 Oct 2016 13:21:09 +0000 (14:21 +0100)]
Use global operator new in std::make_exception_ptr
* libsupc++/exception_ptr.h (make_exception_ptr): Qualify new.
* testsuite/18_support/exception_ptr/make_exception_ptr_2.cc: New
test.
From-SVN: r241404
Paul Thomas [Fri, 21 Oct 2016 12:50:56 +0000 (12:50 +0000)]
re PR fortran/69566 ([OOP] Failure of SELECT TYPE with unlimited polymorphic function result)
2016-10-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69566
* resolve.c (fixup_array_ref): New function.
(resolve_select_type): Gather up the rank and array reference,
if any, from the selector. Fix up the 'associate name' and the
'associate entities' as necessary.
* trans-expr.c (gfc_conv_class_to_class): If the symbol backend
decl is a FUNCTION_DECL, use the 'fake_result_decl' instead.
2016-10-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69566
* gfortran.dg/select_type_37.f03: New test.
From-SVN: r241403
Trevor Saunders [Fri, 21 Oct 2016 12:33:01 +0000 (12:33 +0000)]
make tablejump_p return the label as a rtx_insn *
gcc/ChangeLog:
2016-10-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* cfgcleanup.c (merge_blocks_move_successor_nojumps): Adjust.
(outgoing_edges_match): Likewise.
(try_crossjump_to_edge): Likewise.
* cfgrtl.c (try_redirect_by_replacing_jump): Likewise.
(rtl_tidy_fallthru_edge): Likewise.
* rtl.h (tablejump_p): Adjust prototype.
* rtlanal.c (tablejump_p): Return the label as a rtx_insn *.
From-SVN: r241402
Trevor Saunders [Fri, 21 Oct 2016 12:32:56 +0000 (12:32 +0000)]
make LABEL_REF_LABEL a rtx_insn *
While changing LABEL_REF_LABEL it might as well become an inline
function, so that its clearer what types are involved. Unfortunately
because it is still possible to use XEXP and related macros on a
LABEL_REF rtx you can still set the field to be a non insn rtx. The
other unfortunate thing is that the generators actually create LABEL_REF
rtx that refer to MATCH_x rtx, so there we actually need to use XEXP to
bypass the checking this patch adds.
gcc/ChangeLog:
2016-10-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* rtl.h (label_ref_label): New function.
(set_label_ref_label): New function.
(LABEL_REF_LABEL): Delete.
* alias.c (rtx_equal_for_memref_p): Adjust.
* cfgbuild.c (make_edges): Likewise.
(purge_dead_tablejump_edges): Likewise.
* cfgexpand.c (convert_debug_memory_address): Likewise.
* cfgrtl.c (patch_jump_insn): Likewise.
* combine.c (distribute_notes): Likewise.
* cse.c (hash_rtx_cb): Likewise.
(exp_equiv_p): Likewise.
(fold_rtx): Likewise.
(check_for_label_ref): Likewise.
* cselib.c (rtx_equal_for_cselib_1): Likewise.
(cselib_hash_rtx): Likewise.
* emit-rtl.c (mark_label_nuses): Likewise.
* explow.c (convert_memory_address_addr_space_1): Likewise.
* final.c (output_asm_label): Likewise.
(output_addr_const): Likewise.
* gcse.c (add_label_notes): Likewise.
* genconfig.c (walk_insn_part): Likewise.
* genrecog.c (validate_pattern): Likewise.
* ifcvt.c (cond_exec_get_condition): Likewise.
(noce_emit_store_flag): Likewise.
(noce_get_alt_condition): Likewise.
(noce_get_condition): Likewise.
* jump.c (maybe_propagate_label_ref): Likewise.
(mark_jump_label_1): Likewise.
(redirect_exp_1): Likewise.
(rtx_renumbered_equal_p): Likewise.
* lra-constraints.c (operands_match_p): Likewise.
* print-rtl.c (print_value): Likewise.
* reload.c (find_reloads): Likewise.
* reload1.c (set_label_offsets): Likewise.
* reorg.c (get_branch_condition): Likewise.
* rtl-tests.c (test_uncond_jump): Likewise.
* rtl.c (rtx_equal_p_cb): Likewise.
(rtx_equal_p): Likewise.
* rtlanal.c (reg_mentioned_p): Likewise.
(rtx_referenced_p): Likewise.
(get_condition): Likewise.
* varasm.c (const_hash_1): Likewise.
(compare_constant): Likewise.
(const_rtx_hash_1): Likewise.
(output_constant_pool_1): Likewise.
From-SVN: r241401
Senthil Kumar Selvaraj [Fri, 21 Oct 2016 11:48:19 +0000 (11:48 +0000)]
Fix PR 71627 - unable to find a register to spill
Tweak find_valid_class_1 to consider a reg class if atleast one regno in
that class is ok.
Previously, even if no regno was in_hard_reg_set_p, the code goes ahead and
considers rclass as valid. bad was set only if a regno was in the reg
class *and* HARD_REGNO_MODE_OK was false - if both were false, bad wasn't
set and the reload got a wrong rclass. If that happened to be the best
one, this eventually lead to find_reg running out of registers to
spill, because the chosen rclass wouldn't have enough regs.
Also, it expected every regno in rclass to be valid for mode
i.e., if any regno fails HARD_REGNO_MODE_OK, it rejected the rclass. The
comments in the original commit for find_valid_class_1 say atleast one
regno is ok. This was updated to say "class which contains only
registers" when in_hard_reg_set_p was introduced in place of just
TEST_HARD_REG_BIT.
This commit fixes both of the above problems by not breaking out of the loop
on first unavailable regno. Instead, it computes the rclass size consisting
of all regnos in that class valid for the current mode.
If that computed size is zero, the rclass would be skipped, as it won't
beat best_size. Otherwise, the computed size is used to choose the best
rclass, instead of the static size from reg_class_size.
gcc/
2016-10-21 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
PR target/71627
* reload.c (find_valid_class_1): Allow regclass if atleast one
regno in regclass is ok. Compute and use rclass size based on
actually available regnos for mode in rclass.
gcc/testsuite/
2016-10-21 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
PR target/71627
* gcc.target/avr/pr71627.c: New test
From-SVN: r241400
Hartmut Penner [Fri, 21 Oct 2016 11:29:52 +0000 (11:29 +0000)]
MAINTAINERS: Update email address
* MAINTAINERS: Update email address
Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com>
From-SVN: r241399
Eric Botcazou [Fri, 21 Oct 2016 09:17:47 +0000 (09:17 +0000)]
tree-ssa-loop-split.c: Remove trailing spaces.
* tree-ssa-loop-split.c: Remove trailing spaces.
* match.pd: Likewise.
From-SVN: r241398
Eric Botcazou [Fri, 21 Oct 2016 09:16:29 +0000 (09:16 +0000)]
sparc-modes.def (CCV): New.
* config/sparc/sparc-modes.def (CCV): New.
(CCXV): Likewise.
* config/sparc/predicates.md (v_comparison_operator): New.
(icc_comparison_operator): Add support for CCV/CCXV.
(xcc_comparison_operator): Likewise.
* config/sparc/sparc.c (output_cbranch): Likewise.
(sparc_print_operand): Likewise.
* config/sparc/sparc.md (UNSPEC_{ADD,SUB,NEG}V): New constants.
(uaddvdi4): New expander.
(addvdi4): Likewise.
(uaddvdi4_sp32): New instruction.
(addvdi4_sp32): Likewise.
(uaddvsi4): New expander.
(addvsi4): Likewise.
(cmp_ccc_plus_sltu_set): New instruction.
(cmp_ccv_plus): Likewise.
(cmp_ccxv_plus): Likewise.
(cmp_ccv_plus_set): Likewise.
(cmp_ccxv_plus_set): Likewise.
(cmp_ccv_plus_sltu_set): Likewise.
(uaddvdi4): New expander.
(subvdi4): Likewise.
(usubdi4_sp32): New instruction.
(subvdi4_sp32): Likewise.
(usubvsi4): New expander.
(subvsi4): Likewise.
(cmpsi_minus_sltu_set): New instruction.
(cmp_ccv_minus): Likewise.
(cmp_ccxv_minus): Likewise.
(cmp_ccv_minus_set): Likewise.
(cmp_ccxv_minus_set): Likewise.
(cmp_ccv_minus_sltu_set): Likewise.
(unegvdi3): New expander.
(negvdi3): Likewise.
(unegdi3_sp32): New instruction.
(negvdi3_sp32): Likewise.
(unegvsi3): New expander.
(negvsi3): Likewise.
(cmp_ccc_neg_sltu_set): New instruction.
(cmp_ccv_neg): Likewise.
(cmp_ccxv_neg): Likewise.
(cmp_ccv_neg_set): Likewise.
(cmp_ccxv_neg_set): Likewise.
(cmp_ccv_neg_sltu_set): Likewise.
From-SVN: r241397
Andre Vieira [Fri, 21 Oct 2016 08:53:27 +0000 (08:53 +0000)]
pure-code.exp: Require arm_cortex_m effective target.
2016-10-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
* gcc.target/arm/pure-code/pure-code.exp: Require arm_cortex_m
effective target.
From-SVN: r241396
Kyrylo Tkachov [Fri, 21 Oct 2016 07:55:30 +0000 (07:55 +0000)]
[ree] PR rtl-optimization/78038: Handle global register dataflow definitions in ree
PR rtl-optimization/78038
* ree.c (get_defs): Return NULL if a defining insn for REG cannot
be deduced to set REG through the RTL structure.
(make_defs_and_copies_lists): Return false on a failing get_defs call.
* gcc.target/aarch64/pr78038.c: New test.
From-SVN: r241395
Richard Biener [Fri, 21 Oct 2016 07:07:06 +0000 (07:07 +0000)]
re PR c++/78051 (error: dead STMT in EH table when using -O2)
2016-10-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/78051
* tree-vrp.c (evrp_dom_walker::before_dom_children): Update stmt
and mark replaced if folding did something.
* g++.dg/torture/pr78051.C: New testcase.
From-SVN: r241394
David Edelsohn [Fri, 21 Oct 2016 02:26:09 +0000 (02:26 +0000)]
rs6000.c (rs6000_assemble_visibility): Swap "internal" and "protected" in visibility types.
* config/rs6000/rs6000.c (rs6000_assemble_visibility): Swap "internal"
and "protected" in visibility types.
(rs6000_xcoff_declare_function_name): Fix formatting.
(rs6000_xcoff_declare_object_name): Fix formatting.
From-SVN: r241393
Jerry DeLisle [Fri, 21 Oct 2016 01:41:03 +0000 (01:41 +0000)]
transfer.c (finalize_transfer): Free format data in child procedures.
2016-10-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* io/transfer.c (finalize_transfer): Free format data in child
procedures. (st_read_done, st_write_done): Don't free format
hash table.
From-SVN: r241392
GCC Administrator [Fri, 21 Oct 2016 00:16:14 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r241391
Steven G. Kargl [Thu, 20 Oct 2016 23:55:19 +0000 (23:55 +0000)]
array.c (gfc_match_array_constructor): Remove set, but unused variable.
2016-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
* array.c (gfc_match_array_constructor): Remove set, but unused
variable.
From-SVN: r241388
Uros Bizjak [Thu, 20 Oct 2016 22:57:11 +0000 (00:57 +0200)]
i386.c (ix86_fold_builtin): Handle IX86_BUILTIN_INFQ and IX86_BUILTIN_HUGE_VALQ here ...
* config/i386/i386.c (ix86_fold_builtin): Handle IX86_BUILTIN_INFQ
and IX86_BUILTIN_HUGE_VALQ here ...
(ix86_expand_builtin): ... not here.
From-SVN: r241387
Bernd Edlinger [Thu, 20 Oct 2016 19:39:19 +0000 (19:39 +0000)]
wdate-time.c: Restored test case.
2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-c++-common/wdate-time.c: Restored test case.
* g++.dg/warn/Wconversion-real.C: Deleted empty file.
From-SVN: r241385
Ian Lance Taylor [Thu, 20 Oct 2016 18:51:35 +0000 (18:51 +0000)]
runtime: rewrite interface code into Go
I started to copy the Go 1.7 interface code, but the gc and gccgo
representations of interfaces are too different. So instead I rewrote
the gccgo interface code from C to Go. The code is largely the same as
it was, but the names are more like those used in the gc runtime.
I also copied over the string comparison functions, and tweaked the
compiler to use eqstring when comparing strings for equality.
Reviewed-on: https://go-review.googlesource.com/31591
From-SVN: r241384
Jakub Jelinek [Thu, 20 Oct 2016 18:37:40 +0000 (20:37 +0200)]
* g++.dg/cpp1z/inline-var1.C (w): Initialize to 64 + 2.
From-SVN: r241383
Jakub Jelinek [Thu, 20 Oct 2016 18:34:31 +0000 (20:34 +0200)]
* doc/gty.texi (for_user): Use @item next to @findex.
From-SVN: r241382
Uros Bizjak [Thu, 20 Oct 2016 17:53:10 +0000 (19:53 +0200)]
re PR target/78037 (Incorrect code generated at optimization level -O2 for tzcnt and binary and)
PR target/78037
* config/i386/bmiintrin.h (__tzcnt_u16): Call __builtin_ia32_tzcnt_u16.
(__tzcnt_u32, _tzcnt_u32): Call __builtin_ia32_tzcnt_u32.
(__tzcnt_u64, _tzcnt_u64): Call __builtin_ia32_tzcnt_u64.
* config/i386/lzcntintrin.h (__lzcnt_u16): Call
__builtin_ia32_lzcnt_u16.
(__lzcnt_u32, _lzcnt_u32): Call __builtin_ia32_lzcnt_u32.
(__lzcnt_u64, _lzcnt_u64): Call __builtin_ia32_lzcnt_u64.
* config/i386/i386.md (UNSPEC_LZCNT, UNSPEC_TZCNT): New unspecs.
(ctz<mode>2, *ctz<mode>2): Use SWI48 mode iterator.
(bmi_tzcnt_<mode>): New expander.
(*bmi_tzcnt_<mode>_falsedep_1): New define_insn_and_split pattern.
(*bmi_tzcnt_<mode>_falsedep, *bmi_tzcnt_<mode>): New insn patterns.
(clz<mode>2_lzcnt, *clz<mode>2_lzcnt): Use SWI48 mode iterator.
(lzcnt_<mode>): New expander.
(*lzcnt_<mode>_falsedep_1): New define_insn_and_split pattern.
(*lzcnt_<mode>_falsedep, *lzcnt_<mode>): New insn patterns.
* config/i386/i386-builtin-types.def (UINT_FTYPE_UINT): New.
(UINT64_FTYPE_UINT64): New.
* config/i386/i386-builtin.def (__builtin_clzs): Remove description.
(__builtin_ia32_lzcnt_u16): New description.
(__builtin_ia32_lzcnt_u32): Ditto.
(__builtin_ia32_lzcnt_u64): Ditto.
(__builtin_ctzs): Remove description.
(__builtin_ia32_tzcnt_u16): New description.
(__builtin_ia32_tzcnt_u32): Ditto.
(__builtin_ia32_tzcnt_u64): Ditto.
* config/i386/i386.c (ix86_expand_args_builtin): Handle
UINT_FTYPE_UINT and UINT64_FTYPE_UINT64.
testsuite/ChangeLog:
PR target/78037
* gcc.target/i386/pr78037.c: New test.
From-SVN: r241381
Martin Liska [Thu, 20 Oct 2016 15:30:17 +0000 (17:30 +0200)]
Do not fixup edges for a thunk in LTRANS (PR lto/78049)
PR lto/78049
* lto-streamer-in.c (fixup_call_stmt_edges_1): Replace value
comparison with STMT_UID_NOT_IN_RANGE.
(fixup_call_stmt_edges): Do not fixup edges of a thunk in
LTRANS.
From-SVN: r241380
Eric Botcazou [Thu, 20 Oct 2016 14:38:43 +0000 (14:38 +0000)]
compare-elim.c (conforming_compare): Accept UNSPECs.
* compare-elim.c (conforming_compare): Accept UNSPECs.
(find_comparison_dom_walker::before_dom_children): Deal with
instructions both using and killing the flags register.
(equivalent_reg_at_start): New function extracted from...
(try_eliminate_compare): ...here. Use it and add support for
registers and UNSPECs as second operand of the compare.
* config/visium/visium-modes.def (CCV): New.
* config/visium/predicates.md (visium_v_comparison_operator): New.
(visium_branch_operator): Deal with CCV mode.
* config/visium/visium.c (visium_select_cc_mode): Likewise.
(output_cbranch): Likewise.
* config/visium/visium.md (UNSPEC_{ADD,SUB,NEG}V): New constants.
(uaddv<mode>4): New expander.
(addv<mode>4): Likewise.
(add<mode>3_insn_set_carry): New instruction.
(add<mode>3_insn_set_overflow): Likewise.
(addsi3_insn_set_overflow): Likewise.
(usubv<mode>4): New expander.
(subv<mode>4): Likewise.
(sub<mode>3_insn_set_carry): New instruction.
(sub<mode>3_insn_set_overflow): Likewise.
(subsi3_insn_set_overflow): Likewise.
(unegv<mode>3): New expander.
(negv<mode>3): Likewise.
(neg<mode>2_insn_set_overflow): New instruction.
(addv_tst<mode>): Likewise.
(subv_tst<mode>): Likewise.
(negv_tst<mode>): Likewise.
(cbranch<mode>4_addv_insn): New splitter and instruction.
(cbranch<mode>4_subv_insn): Likewise.
(cbranch<mode>4_negv_insn): Likewise.
From-SVN: r241379
Richard Biener [Thu, 20 Oct 2016 14:14:47 +0000 (14:14 +0000)]
tree-ssa-alias.c (ptrs_compare_unequal): Remove code duplication.
2016-10-20 Richard Biener <rguenther@suse.de>
* tree-ssa-alias.c (ptrs_compare_unequal): Remove code duplication.
Handle decls possibly not bound.
* tree-ssa-structalias.c (get_constraint_for_ssa_var): Add
nothing_id for decls that might not be bound if we are interested
for the address.
(get_constraint_for_component_ref): Deal with that.
From-SVN: r241378
Bernd Edlinger [Thu, 20 Oct 2016 14:00:46 +0000 (14:00 +0000)]
c-common.c (c_common_truthvalue_conversion): Fix the comment.
2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_common_truthvalue_conversion): Fix the comment.
From-SVN: r241377
Jason Merrill [Thu, 20 Oct 2016 13:49:28 +0000 (09:49 -0400)]
* c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
From-SVN: r241376
Jason Merrill [Thu, 20 Oct 2016 13:47:25 +0000 (09:47 -0400)]
* g++.dg/cpp1z/aligned-new7.C: Fix for small MAX_STACK_ALIGNMENT targets.
From-SVN: r241375
Michael Matz [Thu, 20 Oct 2016 12:18:32 +0000 (12:18 +0000)]
loop splitting
(approved at https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00648.html )
* common.opt (-fsplit-loops): New flag.
* passes.def (pass_loop_split): Add.
* opts.c (default_options_table): Add OPT_fsplit_loops entry at -O3.
(enable_fdo_optimizations): Add loop splitting.
* timevar.def (TV_LOOP_SPLIT): Add.
* tree-pass.h (make_pass_loop_split): Declare.
* tree-ssa-loop-manip.h (rewrite_into_loop_closed_ssa_1): Declare.
* tree-ssa-loop-unswitch.c: Include tree-ssa-loop-manip.h,
* tree-ssa-loop-split.c: New file.
* Makefile.in (OBJS): Add tree-ssa-loop-split.o.
* doc/invoke.texi (fsplit-loops): Document.
* doc/passes.texi (Loop optimization): Add paragraph about loop
splitting.
testsuite/
* gcc.dg/loop-split.c: New test.
* gcc.dg/tree-ssa/ifc-9.c: Update.
* gcc.dg/tree-ssa/ifc-10.c: Update.
From-SVN: r241374
Jonathan Wakely [Thu, 20 Oct 2016 12:07:45 +0000 (13:07 +0100)]
Prepare shared_ptr for array support
* include/backward/auto_ptr.h (__shared_ptr(auto_ptr&&))
(shared_ptr(auto_ptr&&)): Adjust template parameter lists.
* include/bits/shared_ptr.h (__sp_compatible_with)
(__sp_is_constructible): New helper traits for shared_ptr.
(shared_ptr::_Convertible): Replace with _Constructible.
(shared_ptr::_Constructible, shared_ptr::_Assignable): Forward checks
to base class.
(shared_ptr::shared_ptr, shared_ptr::operator=): Constrain template
with _Constructible and _Assignable.
(shared_ptr::shared_ptr(shared_ptr<_Tp1>, _Tp*)): Use element_type
instead of _Tp.
(operator<): Likewise.
(operator>): Define in terms of operator<.
(static_pointer_cast, const_pointer_cast, dynamic_pointer_cast): Use
element_type instead of _Tp.
(reinterpret_pointer_cast): Define for C++17.
(weak_ptr::_Convertible): Replace with _Constructible.
(weak_ptr::_Constructible, weak_ptr::_Assignable): Forward checks
to base class.
(weak_ptr::weak_ptr, weak_ptr::operator=): Constrain templates
with _Constructible and _Assignable.
* include/bits/shared_ptr_base.h (__shared_ptr::_Convertible): Replace
with _Compatible.
(__shared_ptr::_SafeConv): New constraint for incoming raw pointers.
(__shared_ptr::_Compatible): New constraint for converting from
other types of shared_ptr and weak_ptr.
(__shared_ptr::_Assignable): Define in terms of _Compatible.
(__shared_ptr::_UniqCompatible, __shared_ptr::_UniqAssignable): New
constraints for converting from unique_ptr.
(__shared_ptr::__shared_ptr, __shared_ptr::operator=): Constrain
template with _SaveConf, _Compatible and _Assignable. Remove
__glibcxx_function_requires concept checks. Add static assertion for
deleter expression being well-formed.
(__shared_ptr::__shared_ptr(__shared_ptr<_Tp1>, _Tp*))
(__shared_ptr::operator*, __shared_ptr::operator->)
(__shared_ptr::get, __shared_ptr::_M_ptr): Use element_type instead
of _Tp.
(operator<): Likewise.
(operator>): Define in terms of operator<.
(static_pointer_cast, const_pointer_cast, dynamic_pointer_cast): Use
element_type instead of _Tp.
(reinterpret_pointer_cast): Define for C++17.
(weak_ptr::_Convertible): Replace with _Compatible.
(weak_ptr::_Compatible, weak_ptr::_Assignable): New constraints for
conversions from other types of weak_ptr and shared_ptr.
(__weak_ptr::__weak_ptr, __weak_ptr::operator=): Constrain templates
with _Constructible and _Assignable.
(__weak_ptr::_M_ptr): Use element_type instead of _Tp.
* testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Adjust
dg-error pattern.
* testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Test conversions.
* testsuite/20_util/shared_ptr/cons/unique_ptr.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.
* testsuite/20_util/shared_ptr/casts/reinterpret.cc: New test.
From-SVN: r241373
Ville Voutilainen [Thu, 20 Oct 2016 11:54:52 +0000 (14:54 +0300)]
Do the operator= SFINAE in the return type for optional,
not in the template parameters.
* include/std/optional (operator=(_Up&&)): Move SFINAE
from template parameters to the return type.
(operator=(const optional<_Up>&)): Likewise.
(operator=(optional<_Up>&&)): Likewise.
From-SVN: r241372
Jonathan Wakely [Thu, 20 Oct 2016 11:37:19 +0000 (12:37 +0100)]
Tweak whitespace in std::allocator files
* include/bits/allocator.h: Remove trailing whitespace, tab-indent.
* include/ext/new_allocator.h: Likewise.
From-SVN: r241371
Nicolas Roche [Thu, 20 Oct 2016 11:06:21 +0000 (11:06 +0000)]
Makefile (x86-64/Linux): Restore missing pairs.
* gcc-interface/Makefile (x86-64/Linux): Restore missing pairs.
(x86/Darwin): Likewise.
From-SVN: r241369
Andre Vehreschild [Thu, 20 Oct 2016 10:50:27 +0000 (12:50 +0200)]
class.c (gfc_build_class_symbol): Set the kind of _len to gfc_charlen_int_kind to catch changes of the charlen kind.
gcc/fortran/ChangeLog:
2016-10-20 Andre Vehreschild <vehre@gcc.gnu.org>
* class.c (gfc_build_class_symbol): Set the kind of _len to
gfc_charlen_int_kind to catch changes of the charlen kind.
From-SVN: r241367
Richard Biener [Thu, 20 Oct 2016 10:43:39 +0000 (10:43 +0000)]
pr35356-1.c: Update.
2016-10-20 Richard Biener <rguenther@suse.de>
* gcc.dg/graphite/pr35356-1.c: Update.
From-SVN: r241366
Jonathan Wakely [Thu, 20 Oct 2016 10:13:10 +0000 (11:13 +0100)]
PR78052 Define std::allocator<void>::{construct,destroy}
PR libstdc++/78052
* include/bits/allocator.h (allocator<void>::construct)
(allocator<void>::destroy): Define.
* testsuite/20_util/allocator/void.cc: New test.
From-SVN: r241365
Jonathan Wakely [Thu, 20 Oct 2016 10:13:04 +0000 (11:13 +0100)]
Add more tests for enable_shared_from_this ambiguities
* testsuite/20_util/enable_shared_from_this/56383.cc: Add tests for
additional ambiguous cases.
From-SVN: r241364
Richard Biener [Thu, 20 Oct 2016 08:49:48 +0000 (08:49 +0000)]
cgraphunit.c (analyze_functions): Set node->definition to false to signal symbol removal to...
2016-10-20 Richard Biener <rguenther@suse.de>
* cgraphunit.c (analyze_functions): Set node->definition to
false to signal symbol removal to debug_hooks->late_global_decl.
* ipa.c (symbol_table::remove_unreachable_nodes): When not in
WPA signal symbol removal to the debuginfo machinery.
* dwarf2out.c (dwarf2out_late_global_decl): Instead of
using early_finised to guard the we're called for symbol
removal case look at the symtabs definition flag.
(gen_variable_die): Remove redundant check.
From-SVN: r241363
Andreas Krebbel [Thu, 20 Oct 2016 08:43:50 +0000 (08:43 +0000)]
S/390: Add fallthrough comment in md file.
gcc/ChangeLog:
2016-10-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.md ("prefetch"): Add fallthrough comment.
From-SVN: r241362
Paolo Carlini [Thu, 20 Oct 2016 08:15:49 +0000 (08:15 +0000)]
re PR c++/77446 (Suspicious "non-constant condition for static assertion" error)
2016-10-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/77446
* g++.dg/cpp1y/pr77446.C: New.
From-SVN: r241361
Prathamesh Kulkarni [Thu, 20 Oct 2016 07:55:28 +0000 (07:55 +0000)]
re PR tree-optimization/53979 (((a ^ b) | a) not optimized to (a | b))
2016-10-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR tree-optimization/53979
* match.pd ((a ^ b) | a -> a | b): New pattern.
testsuite/
* gcc.dg/pr53979-1.c: New test-case.
* gcc.dg/pr53979-2.c: Likewise.
From-SVN: r241360