Commit Graph

149293 Commits

Author SHA1 Message Date
Florian Weimer 331075711a PR libgcc/78064: Add missing include directive to unwind-c.c
PR libgcc/78064
	* unwind-c.c: Include auto-target.h.

From-SVN: r241491
2016-10-24 20:25:09 +02:00
Bernd Edlinger f834806177 c-common.c (c_common_truthvalue_conversion): Warn for multiplications in boolean context.
2016-10-24  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * c-common.c (c_common_truthvalue_conversion): Warn for
        multiplications in boolean context.  Fix the quoting of '<<' and '<'
        in the shift warning.

gcc:
2016-10-24  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * doc/invoke.text (Wint-in-bool-context): Update documentation.
        * value-prof.c (stringop_block_profile): Fix a warning.

testsuite:
2016-10-24  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * c-c++-common/Wint-in-bool-context-3.c: New test.

From-SVN: r241490
2016-10-24 17:14:41 +00:00
Martin Sebor 1eb4547b10 PR middle-end/77735 - FAIL: gcc.dg/tree-ssa/builtin-sprintf-warn-1.c
gcc/ChangeLog:

	PR middle-end/77735
	* builtins.c (string_length): New function.
	(c_strlen): Use string_length.  Correctly handle wide strings.
	* gimple-ssa-sprintf.c (target_max_value, target_size_max): New
	functions.
	(target_int_max): Call target_max_value.
	(format_result::knownrange): New data member.
	(fmtresult::fmtresult): Define default constructor.
	(format_integer): Use it and set format_result::knownrange.
	Handle global constants.
	(format_floating_max): Add third argument.
	(format_floating): Recompute maximum value for %a for each argument.
	(get_string_length): Use fmtresult default ctor.
	(format_string): Set format_result::knownrange.
	(format_directive): Check format_result::knownrange.
	(add_bytes): Same.  Correct caret placement in diagnostics.
	(pass_sprintf_length::compute_format_length): Set
	format_result::knownrange.
	(pass_sprintf_length::handle_gimple_call): Use target_size_max.

gcc/testsuite/ChangeLog:

	PR middle-end/77735
	* gcc.dg/tree-ssa/builtin-sprintf-2.c: Add test cases.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: Same.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-2.c: Same.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: Adjust/relax.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-4.c: Add test cases.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-6.c: XFAIL for LP64 only.
	* gcc.dg/tree-ssa/builtin-sprintf.c: Add test cases.

From-SVN: r241489
2016-10-24 10:53:20 -06:00
Jonathan Wakely 94caf86019 Fix error handling in filesystem::is_empty
* src/filesystem/ops.cc (is_empty): Fix error handling.
	* testsuite/experimental/filesystem/operations/is_empty.cc: New test.

From-SVN: r241488
2016-10-24 17:45:55 +01:00
Jonathan Wakely 6daff2d946 PR71337 fix filesystem::temp_directory_path error handling
PR libstdc++/71337
	* src/filesystem/ops.cc (temp_directory_path): Pass error_code
	argument to other filesystem operations.
	* testsuite/experimental/filesystem/operations/temp_directory_path.cc:
	Add testcase for inaccessible directory.

From-SVN: r241487
2016-10-24 17:45:51 +01:00
Jonathan Wakely bb52a7e324 Make directory iterators become end iterator on error
* src/filesystem/dir.cc (open_dir): Return same value for errors
	whether ignored or not.
	(_Dir::advance(error_code*, directory_options)): Return false on
	error.
	(directory_iterator(const path&, directory_options, error_code*)):
	Create end iterator on error (LWG 2723).
	(recursive_directory_iterator(const path&, directory_options,
	error_code*)): Likewise.
	* testsuite/experimental/filesystem/iterators/directory_iterator.cc:
	Update expected behaviour on error.
	* testsuite/experimental/filesystem/iterators/
	recursive_directory_iterator.cc: Likewise.

From-SVN: r241486
2016-10-24 17:45:45 +01:00
Jonathan Wakely cfef9c1ea7 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
2016-10-24 17:45:40 +01:00
Jonathan Wakely b3dec9e57e 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
2016-10-24 17:45:31 +01:00
Moritz Klammler 38000825cd 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
2016-10-24 10:05:48 -06:00
Jakub Jelinek d168c883c5 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
2016-10-24 18:05:09 +02:00
Jakub Jelinek 4467029544 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
2016-10-24 18:04:37 +02:00
Jakub Jelinek 86287716e8 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
2016-10-24 18:04:01 +02:00
Ville Voutilainen a3f6007cbc 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
2016-10-24 16:22:11 +03:00
Richard Biener 292af53796 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
2016-10-24 12:58:20 +00:00
Ville Voutilainen f11cc05023 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
2016-10-24 15:46:44 +03:00
Jonathan Wakely 405def8d46 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
2016-10-24 13:25:28 +01:00
Ximin Luo 89cc66c478 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
2016-10-24 11:57:27 +00:00
Paul Thomas c101fad870 Remove dead wood from trans-expr.c
From-SVN: r241472
2016-10-24 11:45:17 +00:00
Kyrylo Tkachov e77cf8c6d6 [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
2016-10-24 11:23:36 +00:00
Richard Biener 40f683e88d 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
2016-10-24 11:22:42 +00:00
Rainer Orth 6a5792b660 Parallelize check-gnat
* gcc-interface/Make-lang.in (lang_checks_parallelized): New target.
	(check_gnat_parallelize): Likewise.

From-SVN: r241469
2016-10-24 11:18:21 +00:00
Georg-Johann Lay b1b6774f67 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
2016-10-24 11:02:51 +00:00
Richard Biener 06d1ff9050 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
2016-10-24 10:31:03 +00:00
Andre Vieira ed9760d22d 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
2016-10-24 08:57:45 +00:00
Jakub Jelinek fb027a4235 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
2016-10-24 10:29:42 +02:00
Rainer Orth 8e10302e3f 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
2016-10-24 08:07:27 +00:00
Martin Liska 866c72a837 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
2016-10-24 07:00:53 +00:00
GCC Administrator af460fd74a Daily bump.
From-SVN: r241460
2016-10-24 00:16:14 +00:00
Martin Sebor 683068d61a 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
2016-10-23 16:38:24 -06:00
Steven G. Kargl 0804124b9b 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
2016-10-23 21:26:44 +00:00
Eric Botcazou d94c476c36 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
2016-10-23 20:31:41 +00:00
Steven G. Kargl 87c9fca50c 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
2016-10-23 18:12:28 +00:00
Paul Thomas dfd6231ea3 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
2016-10-23 18:09:14 +00:00
Eric Botcazou fb4ab5f005 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
2016-10-23 10:55:04 +00:00
François Dumont 35518d76b9 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
2016-10-23 10:26:59 +00:00
GCC Administrator 8c2430bbf8 Daily bump.
From-SVN: r241444
2016-10-23 00:16:18 +00:00
Eric Botcazou 66ccff98bb * gcc.dg/tree-ssa/pr71347.c: Remove XFAIL on SPARC.
From-SVN: r241441
2016-10-22 18:23:39 +00:00
Thomas Koenig 15876ceeb1 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
2016-10-22 14:04:46 +00:00
Andre Vehreschild 574284e9c4 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
2016-10-22 14:33:38 +02:00
Jonathan Wakely 4e04812da2 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
2016-10-22 12:42:16 +01:00
Andrew Pinski 2e721daadf 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
2016-10-21 20:40:06 -07:00
GCC Administrator e1454b8c60 Daily bump.
From-SVN: r241436
2016-10-22 00:16:15 +00:00
Ian Lance Taylor 15ca61bc74 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
2016-10-21 21:01:04 +00:00
Ian Lance Taylor 6156a05a25 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
2016-10-21 20:44:46 +00:00
Jeff Law 20276dc9d1 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
2016-10-21 14:41:34 -06:00
Kugan Vivekanandarajah f75036994f 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
2016-10-21 20:13:55 +00:00
Ian Lance Taylor e597e0533d 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
2016-10-21 20:07:06 +00:00
Jason Merrill 16b61424dd 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
2016-10-21 15:45:45 -04:00
Jason Merrill a7564a05ff * ptree.c (cxx_print_xnode) [TEMPLATE_PARM_INDEX]: Dump the decl.
From-SVN: r241424
2016-10-21 15:45:39 -04:00
Jerry DeLisle 8b729f5c8f 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
2016-10-21 18:02:32 +00:00