Skip to content
Snippets Groups Projects
  1. May 18, 2017
    • Nathan Sidwell's avatar
      name-lookup.c (find_local_binding): New, broken out of ... · 59a4ede9
      Nathan Sidwell authored
      	* name-lookup.c (find_local_binding): New, broken out of ...
      	(lookup_name_innermost_nonclass_level_1): ... here.  Call it.
      	(set_namespace_binding): Swap scope & name args.
      	(namespace_binding_1): Likewise.
      	(pushdecl_maybe_friend_1): Adjust set_namespace_binding call.
      	(push_overloaded_decl_1): Likewise.
      	(set_global_binding): Likewise.
      	(get_namespace_binding): Adjust namespace_binding_1 call.
      
      From-SVN: r248191
      59a4ede9
    • Jonathan Wakely's avatar
      Fix typos in libstdc++ manual · 8985968c
      Jonathan Wakely authored
      	* doc/xml/manual/policy_data_structures.xml: Fix typo.
      	* doc/xml/manual/test_policy_data_structures.xml: Likewise.
      	* doc/html/*: Regenerate.
      
      From-SVN: r248189
      8985968c
    • Fritz Reese's avatar
      re PR fortran/79968 (diagnostics: merge similar diagnostics containing -fdec-structure) · cf004230
      Fritz Reese authored
      2017-05-18  Fritz Reese <fritzoreese@gmail.com>
      
          PR fortran/79968
      
          gcc/fortran/ChangeLog:
      
      	PR fortran/79968
      	* decl.c (match_attr_spec, gfc_match_automatic,
      	gfc_match_static, gfc_match_structure_decl): Unify diagnostic
      	errors regarding -fdec options.
      	* io.c (match_dec_etag, match_dec_vtag, match_dec_ftag): Ditto.
      
      From-SVN: r248188
      cf004230
    • Jonathan Wakely's avatar
      Update libstdc++ version info in manual · 8268fc60
      Jonathan Wakely authored
      	* doc/xml/manual/abi.xml: Document latest library versions.
      	* doc/xml/manual/build_hacking.xml: Document requirement to update
      	abi.xml when bumping library versions.
      	* doc/html/*: Regenerate.
      
      From-SVN: r248186
      8268fc60
    • Sheldon Lobo's avatar
      MAINTAINERS: Add self to Write After Approval · 7880c1a5
      Sheldon Lobo authored
      	* MAINTAINERS: Add self to Write After Approval
      
      From-SVN: r248185
      7880c1a5
    • Sheldon Lobo's avatar
      Minor SPARC T4 and M7 fixes and additions. · 00a84d0e
      Sheldon Lobo authored
      	* config/sparc/sparc.c (sparc_option_override): Set function
      	alignment for -mcpu=niagara7 to 64 to match the I$ line.
      	* config/sparc/sparc.h (BRANCH_COST): Set the SPARC M7 branch
      	latency to 1.
      	* config/sparc/sparc.h (BRANCH_COST): Set the SPARC T4 branch
      	latency to 2.
      	* config/sparc/sol2.h: Fix a ASM_CPU32_DEFAULT_SPEC typo.
      	* gcc.target/sparc/niagara7-align.c: New test.
      
      From-SVN: r248184
      00a84d0e
    • Marek Polacek's avatar
      re PR sanitizer/80797 (-fsanitize=null doesn't instrument &s->x) · 243c2883
      Marek Polacek authored
      	PR sanitizer/80797
      	* ubsan.c (instrument_null): Unwrap ADDR_EXPRs.
      	(pass_ubsan::execute): Call gimple_assign_single_p instead of
      	gimple_assign_load_p.
      
      	* c-c++-common/ubsan/null-12.c: New test.
      
      From-SVN: r248179
      243c2883
    • GCC Administrator's avatar
      Daily bump. · a7ab6638
      GCC Administrator authored
      From-SVN: r248178
      a7ab6638
  2. May 17, 2017
    • Segher Boessenkool's avatar
      Fix comparison of decimal float zeroes (PR80692) · e98e6340
      Segher Boessenkool authored
      Decimal float negative zero should compare equal to positive zero.
      Decimal float zeroes are encoded as value class "normal" (in real.c);
      they need to be handled specially, but in this one case that does not
      yet happen.  This fixes it.
      
      
      	PR middle-end/80692
      	* real.c (do_compare): Give decimal_do_compare preference over
      	comparing just the signs.
      
      gcc/testsuite/
      	PR middle-end/80692
      	* gcc.c-torture/execute/pr80692.c: New testcase.
      
      From-SVN: r248174
      e98e6340
    • Andreas Tobler's avatar
      unwind-arm.h: Make _Unwind_GetIP... · 78eca309
      Andreas Tobler authored
      2017-05-17  Andreas Tobler  <andreast@gcc.gnu.org>
      
          * config/arm/unwind-arm.h: Make _Unwind_GetIP, _Unwind_GetIPInfo and
          _Unwind_SetIP available as functions for arm*-*-freebsd*.
          * config/arm/unwind-arm.c: Implement the above.
      
      From-SVN: r248173
      78eca309
    • Jerry DeLisle's avatar
      re PR fortran/80741 ([Regression 7/8] DTIO wrong code causes incorrect behaviour of namelist READ) · 0152001b
      Jerry DeLisle authored
      2017-05-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
      
      	PR libgfortran/80741
      	* gfortran.dg/read_4.f90: New test.
      
      From-SVN: r248172
      0152001b
    • Jerry DeLisle's avatar
      re PR fortran/80741 ([Regression 7/8] DTIO wrong code causes incorrect behaviour of namelist READ) · 42f94417
      Jerry DeLisle authored
      2017-05-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
      
      	PR libgfortran/80741
      	* gfortran.dg/read_4.f90: New test.
      
      From-SVN: r248171
      42f94417
    • Jerry DeLisle's avatar
      re PR fortran/80741 ([Regression 7/8] DTIO wrong code causes incorrect behaviour of namelist READ) · 7f72e402
      Jerry DeLisle authored
      2017-05-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
      
      	PR libgfortran/80741
      	* transfer.c (finalize_transfer): Reset last_char to 'empty'.
      	* file_pos.c (formatted_backspace): Likewise.
      	(st_endfile): Likewise.
      	(st_rewind): Likewise.
      	(st_flush): Likewise.
      
      	PR fortran/80741
      	* trans-io.c (transfer_namelist_element): Change check from
      	NULL_TREE to null_pointer_node.
      
      From-SVN: r248170
      7f72e402
    • Ian Lance Taylor's avatar
      libgo: add "vendor" to pkgpath for vendored standard packages · 7ded3472
      Ian Lance Taylor authored
          
          Ensure that the packages vendored into the standard library do not
          have the same pkgpath as the actual packages.  If we don't, attempts
          to build and test the actual packages will get confused.  The specific
          error I was seeing was import loops, causing some of the packages to
          fail to get initialized, causing an obscure run time crash.
          
          Reviewed-on: https://go-review.googlesource.com/43610
      
      From-SVN: r248168
      7ded3472
    • Bill Schmidt's avatar
      pr78604.c: Fix typo in dg-options. · c8ded430
      Bill Schmidt authored
      2017-05-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
      
      	* gcc.target/powerpc/pr78604.c: Fix typo in dg-options.
      
      From-SVN: r248165
      c8ded430
    • Marek Polacek's avatar
      c-common.c: Use NULL_TREE instead of 0 where appropriate. · 3fa8871b
      Marek Polacek authored
      	* c-common.c: Use NULL_TREE instead of 0 where appropriate.
      	* c-warn.c: Likewise.
      
      	* c-decl.c: Use NULL_TREE instead of 0 where appropriate.
      	* c-typeck.c: Likewise.
      
      From-SVN: r248161
      3fa8871b
    • Jonathan Wakely's avatar
      Fixes to Doxygen comments in libstdc++ headers · 26bddba3
      Jonathan Wakely authored
      	* include/bits/refwrap.h: Fix Doxygen warning.
      	* include/bits/specfun.h: Likewise.
      	* include/bits/std_function.h: Likewise.
      	* include/bits/stl_algo.h (set_union, set_intersection)
      	(set_difference, set_symmetric_difference): Add Doxygen @param tags
      	for output iterator parameters.
      	* include/bits/stl_iterator.h (inserter): Add Doxygen @param tag for
      	iterator parameter.
      	* include/std/mutex (try_lock, lock): Change Mutex to Lockable in
      	Doxygen comments.
      
      From-SVN: r248160
      26bddba3
    • Nathan Sidwell's avatar
      cp-tree.h (default_hash_traits <lang_identifier *>): New specialization. · 539f481a
      Nathan Sidwell authored
      	* cp-tree.h (default_hash_traits <lang_identifier *>): New
      	specialization.
      	* name-lookup.c (lookup_extern_c_fun_in_all_ns): Delete.
      	(extern_c_fns): New hash table.
      	(check_extern_c_conflict): New, broken out of ...
      	(pushdecl_maybe_friend_1): ... here.  Call it.
      	(c_linkage_bindings): Just look in hash table.
      
      From-SVN: r248159
      539f481a
    • Fritz Reese's avatar
      re PR fortran/80668 (wrong error message with -finit-derived) · e5b1f5a1
      Fritz Reese authored
      2017-05-17  Fritz Reese <fritzoreese@gmail.com>
      
          PR fortran/80668
      
          gcc/fortran/ChangeLog:
      
      	PR fortran/80668
      	* expr.c (component_initializer): Don't generate initializers for
      	pointer components.
      	* invoke.texi (-finit-derived): Document.
      
          gcc/testsuite/ChangeLog:
      
      	PR fortran/80668
      	* gfortran.dg/pr80668.f90: New.
      
      From-SVN: r248158
      e5b1f5a1
    • Uros Bizjak's avatar
      * gcc.target/i386/pr80425-1.c: Add -mregparm=1 for 32bit targets. · 3ca8120f
      Uros Bizjak authored
      From-SVN: r248157
      3ca8120f
    • Uros Bizjak's avatar
      md.texi (Canonicalization of Instructions): Describe the canonical form of... · 81ad201a
      Uros Bizjak authored
      md.texi (Canonicalization of Instructions): Describe the canonical form of instructions that inherently set a condition...
      
      	* doc/md.texi (Canonicalization of Instructions): Describe the
      	canonical form of instructions that inherently set a condition
      	code register.
      
      From-SVN: r248156
      81ad201a
    • Peter Bergner's avatar
      re PR middle-end/80775 (-O3 produces ice in group_case_labels_stmt) · 9853cb28
      Peter Bergner authored
      gcc/
      	PR middle-end/80775
      	* tree-cfg.c: Move deletion of unreachable case statements to after
      	the merging of consecutive case labels.
      
      gcc/testsuite/
      	PR middle-end/80775
      	* gcc.dg/pr80775.c: New test.
      
      From-SVN: r248155
      9853cb28
    • Ville Voutilainen's avatar
      Implement new C++ intrinsics __is_assignable and __is_constructible. · b42cc3ca
      Ville Voutilainen authored
      c-family/
      
      Implement new C++ intrinsics __is_assignable and __is_constructible.
      * c-common.c (__is_assignable, __is_constructible): New.
      * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
      
      cp/
      
      PR c++/80654
      PR c++/80682
      Implement new C++ intrinsics __is_assignable and __is_constructible.
      * cp-tree.h (CPTK_IS_ASSIGNABLE, CPTK_IS_CONSTRUCTIBLE): New.
      (is_xible): New.
      * cxx-pretty-print.c (pp_cxx_trait_expression): Handle
      CPTK_IS_ASSIGNABLE and CPTK_IS_CONSTRUCTIBLE.
      * method.c (constructible_expr): Set cp_unevaluated.
      (is_xible_helper): New.
      (is_trivially_xible): Adjust.
      (is_xible): New.
      * parser.c (cp_parser_primary_expression): Handle
      RID_IS_ASSIGNABLE and RID_IS_CONSTRUCTIBLE.
      (cp_parser_trait_expr): Likewise.
      * semantics.c (trait_expr_value): Handle
      CPTK_IS_ASSIGNABLE and CPTK_IS_CONSTRUCTIBLE.
      
      testsuite/
      
      * g++.dg/ext/80654.C: New.
      
      libstdc++-v3/
      
      Implement new C++ intrinsics __is_assignable and __is_constructible.
      * include/std/type_traits (__do_is_static_castable_impl): Remove.
      (__is_static_castable_impl, __is_static_castable_safe): Likewise.
      (__is_static_castable, __do_is_direct_constructible_impl): Likewise.
      (__is_direct_constructible_impl): Likewise.
      (__is_direct_constructible_new_safe): Likewise.
      (__is_base_to_derived_ref, __is_lvalue_to_rvalue_ref): Likewise.
      (__is_direct_constructible_ref_cast): Likewise.
      (__is_direct_constructible_new, __is_direct_constructible): Likewise.
      (__do_is_nary_constructible_impl): Likewise.
      (__is_nary_constructible_impl, __is_nary_constructible): Likewise.
      (__is_constructible_impl): Likewise.
      (is_constructible): Call the intrinsic.
      (__is_assignable_helper): Remove.
      (is_assignable): Call the intrinsic.
      (is_trivially_constructible): Likewise.
      (__is_trivially_copy_constructible_impl): New.
      (is_trivially_copy_constructible): Use it.
      (__is_trivially_move_constructible_impl): New.
      (is_trivially_move_constructible): Use it.
      (is_trivially_assignable): Call the intrinsic.
      (__is_trivially_copy_assignable_impl): New.
      (is_trivially_copy_assignable): Use it.
      (__is_trivially_move_assignable_impl): New.
      (is_trivially_move_assignable): Use it.
      (testsuite/20_util/declval/requirements/1_neg.cc): Adjust.
      (testsuite/20_util/is_trivially_copy_assignable/value.cc):
      Add test for void.
      (testsuite/20_util/is_trivially_copy_constructible/value.cc): Likewise.
      (testsuite/20_util/is_trivially_move_assignable/value.cc): Likewise.
      (testsuite/20_util/is_trivially_move_constructible/value.cc): Likewise.
      (testsuite/20_util/make_signed/requirements/typedefs_neg.cc): Adjust.
      (testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc):
      Likewise.
      
      From-SVN: r248153
      b42cc3ca
    • Nathan Sidwell's avatar
      cp-tree.h (ovl_iterator::using_p): New predicate. · 36f4bc9c
      Nathan Sidwell authored
      	* cp-tree.h (ovl_iterator::using_p): New predicate.
      	(ovl_iterator::remove_node): New worker.
      	(ovl_insert): Declare.
      	* tree.c (ovl_insert): New.
      	(ovl_iterator::remove_node): New.
      	* class.c (add_method): Use ovl_iterator, ovl_insert.
      	(clone_function_decl): Fix description.
      	(clone_constructors_and_destructors): Use ovl_iterator.
      
      From-SVN: r248151
      36f4bc9c
    • Nathan Sidwell's avatar
      class.c (handle_using_decl): Use OVL_FIRST, ovl_iterator. · 19b476fb
      Nathan Sidwell authored
      	* class.c (handle_using_decl): Use OVL_FIRST, ovl_iterator.
      	(maybe_warn_about_overly_private_class): Use ovl_iterator.
      	(method_name_cmp, resort_method_name_cmp): Use OVL_NAME.
      	(resort_type_method_vec, finish_struct_methods): Use OVL_FIRST.
      	(get_base_fndecls): Use ovl_iterator.
      	(warn_hidden): Use OVL_NAME, ovl_iterator.
      	(add_implicitly_declared_members): Use ovl_iterator.
      	* constraint.cc (normalize_template_id_expression): Use OVL_FIRST,
      	flatten nested if.
      	(finish_shorthand_constraint): Simplify, use ovl_make.
      	* pt.c (make_constrained_auto): Simplify.  Use ovl_make.
      	* search.c (shared_member_p): Use ovl_iterator.
      	(lookup_field_fuzzy_info::fuzzy_lookup_fn): Use OVL_NAME.
      	(lookup_conversion_operator): Use OVL_FIRST.
      	(lookup_fnfiels_idx_nolazy): Use OVL_FIRST, OVL_NAME.
      	(look_for_overrides_here): Use ovl_iterator.
      	(lookup_conversions_r): Use OVL_FIRST, OVL_NAME, ovl_iterator.
      	* typeck.c (build_x_unary_op): Use ovl_make.
      
      From-SVN: r248144
      19b476fb
    • Marek Polacek's avatar
      re PR sanitizer/80659 (-fsanitize=address evokes ICE in in gimplify_switch_expr) · 142473df
      Marek Polacek authored
      	PR sanitizer/80659
      	* c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
      	DECL_IGNORED_P even for non-static compound literals.
      
      	* gcc.dg/asan/pr80659.c: New test.
      
      From-SVN: r248143
      142473df
    • Thomas Preud'homme's avatar
      Fix comment for cmse_nonsecure_call_clear_caller_saved · 26092cc7
      Thomas Preud'homme authored
      2017-05-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
          gcc/
          * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Refer
          readers to __gnu_cmse_nonsecure_call libcall for saving, clearing and
          restoring of callee-saved registers.
      
      From-SVN: r248142
      26092cc7
    • Eric Botcazou's avatar
      compare-elim.c (equivalent_reg_at_start): Adjust outdated comment. · d2d61a74
      Eric Botcazou authored
      	* compare-elim.c (equivalent_reg_at_start): Adjust outdated comment.
      	* config/visium/visium.c (single_set_and_flags): Likewise.
      	* config/visium/visium.md (Substitutions): Likewise.
      
      From-SVN: r248141
      d2d61a74
    • Martin Liska's avatar
      Introduce dump_flags_t type and use it instead of int type. · 1a817418
      Martin Liska authored
      2017-05-17  Martin Liska  <mliska@suse.cz>
      
      	* class.c (dump_class_hierarchy): Introduce dump_flags_t type and
      	use it instead of int type.
      	(dump_vtable): Likewise.
      	(dump_vtt): Likewise.
      	* decl2.c (dump_tu): Likewise.
      2017-05-17  Martin Liska  <mliska@suse.cz>
      
      	* c-common.h: Introduce dump_flags_t type and
      	use it instead of int type.
      	* c-gimplify.c (c_genericize): Likewise.
      	* c-opts.c: Likewise.
      2017-05-17  Martin Liska  <mliska@suse.cz>
      
      	* c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
      	use it instead of int type.
      2017-05-17  Martin Liska  <mliska@suse.cz>
      
      	* cfg.c: Introduce dump_flags_t type and
      	use it instead of int type.
      	* cfg.h: Likewise.
      	* cfghooks.c: Likewise.
      	* cfghooks.h (struct cfg_hooks): Likewise.
      	* cfgrtl.c: Likewise.
      	* cfgrtl.h: Likewise.
      	* cgraph.c (cgraph_node::get_body): Likewise.
      	* coretypes.h: Likewise.
      	* domwalk.c: Likewise.
      	* domwalk.h: Likewise.
      	* dumpfile.c (struct dump_option_value_info): Likewise.
      	(dump_enable_all): Likewise.
      	(dump_switch_p_1): Likewise.
      	(opt_info_switch_p): Likewise.
      	* dumpfile.h (enum tree_dump_index): Likewise.
      	(struct dump_file_info): Likewise.
      	* genemit.c: Likewise.
      	* generic-match-head.c: Likewise.
      	* gengtype.c (open_base_files): Likewise.
      	* gimple-pretty-print.c: Likewise.
      	* gimple-pretty-print.h: Likewise.
      	* graph.c (print_graph_cfg): Likewise.
      	* graphite-scop-detection.c (dot_all_sese): Likewise.
      	* ipa-devirt.c (build_type_inheritance_graph): Likewise.
      	* loop-unroll.c (report_unroll): Likewise.
      	* passes.c (pass_manager::register_one_dump_file): Likewise.
      	* print-tree.c: Likewise.
      	* statistics.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* tree-cfg.h: Likewise.
      	* tree-dfa.c: Likewise.
      	* tree-dfa.h: Likewise.
      	* tree-dump.c (dump_function): Likewise.
      	* tree-dump.h (struct dump_info): Likewise.
      	* tree-pretty-print.c: Likewise.
      	* tree-pretty-print.h: Likewise.
      	* tree-ssa-live.c: Likewise.
      	* tree-ssa-live.h: Likewise.
      	* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise.
      	* tree-vect-loop.c: Likewise.
      	* tree-vect-slp.c: Likewise.
      
      From-SVN: r248140
      1a817418
    • Marek Polacek's avatar
      Bye bye, c_save_expr. · b2fa0a8b
      Marek Polacek authored
      From-SVN: r248139
      b2fa0a8b
    • Senthil Kumar Selvaraj's avatar
      Fix bogus pr78886.c failure for avr · 8508a5b5
      Senthil Kumar Selvaraj authored
      The test fails for avr because malloc has been declared to take
      an unsigned long, whereas size_t for avr is only unsigned int.
      
      Fixed by typedef'ing __SIZE_TYPE__ to size_t and using it in the
      malloc function declaration.
      
      gcc/testsuite/
      
      2017-05-17  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
      
      	* gcc.dg/tree-ssa/pr78886.c: Use __SIZE_TYPE__ instead of
      	unsigned long.
      
      From-SVN: r248138
      8508a5b5
    • Chenghua Xu's avatar
      reorgbug-1.c: Don't specify -O2. · bc36d2b7
      Chenghua Xu authored
      2017-05-17  Chenghua Xu  <paul.hua.gm@gmail.com>
      
      gcc/testsuite/
          * gcc.target/mips/reorgbug-1.c: Don't specify -O2.
      
      From-SVN: r248137
      bc36d2b7
    • GCC Administrator's avatar
      Daily bump. · 3fbab4ea
      GCC Administrator authored
      From-SVN: r248135
      3fbab4ea
  3. May 16, 2017
    • James Greenhalgh's avatar
      re PR tree-optimization/80457 (vectorizable_condition does not update the vectorizer cost model) · 4fc5ebf1
      James Greenhalgh authored
      
      [gcc]
      
      2017-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
      	    Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
      
      	PR tree-optimization/80457
      	* tree-vect-stmts.c (vect_model_simple_cost): Model the cost
      	of all arguments to a statement as scalar_to_vec operations.
      	(vectorizable_call): Adjust call to vect_model_simple_cost for
      	new parameter.
      	(vectorizable_conversion): Likewise.
      	(vectorizable_assignment): Likewise.
      	(vectorizable_shift): Likewise.
      	(vectorizable_operation): Likewise.
      	(vectorizable_comparison): Likewise.
      	(vect_is_simple_cond): Record the def types for operands.
      	(vectorizable_condition): Likewise, call vect_model_simple_cost.
      	* tree-vectorizer.h (vect_model_simple_cost): Add new parameter
      	for statement argument count.
      
      [gcc/testsuite]
      
      2017-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
      	    Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
      
      	PR tree-optimization/80457
      	* gcc.target/powerpc/pr78604.c: Verify that vectorized COND_EXPRs
      	call vect_model_simple_cost.
      
      
      Co-Authored-By: default avatarBill Schmidt <wschmidt@linux.vnet.ibm.com>
      
      From-SVN: r248130
      4fc5ebf1
    • Paul Thomas's avatar
      re PR fortran/80554 ([f08] variable redefinition in submodule) · bedee914
      Paul Thomas authored
      2017-05-16  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/80554
      	* decl.c (build_sym): In a submodule allow overriding of host
      	associated symbols from the ancestor module with a new
      	declaration.
      
      2017-05-16  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/80554
      	* gfortran.dg/submodule_29.f08: New test.
      
      From-SVN: r248129
      bedee914
    • David Malcolm's avatar
      C++: fix-it hints suggesting accessors for private fields · 10791753
      David Malcolm authored
      gcc/cp/ChangeLog:
      	* call.c (enforce_access): Add access_failure_info * param and use
      	it to record access failures.
      	* cp-tree.h (class access_failure_info): New class.
      	(enforce_access): Add access_failure_info * param, defaulting to
      	NULL.
      	(lookup_member): Likewise.
      	(locate_field_accessor): New function decl.
      	(perform_or_defer_access_check): Add access_failure_info * param,
      	defaulting to NULL.
      	* search.c (lookup_member): Add access_failure_info * param and
      	pass it on to call to perform_or_defer_access_check.
      	(matches_code_and_type_p): New function.
      	(field_access_p): New function.
      	(direct_accessor_p): New function.
      	(reference_accessor_p): New function.
      	(field_accessor_p): New function.
      	(struct locate_field_data): New struct.
      	(dfs_locate_field_accessor_pre): New function.
      	(locate_field_accessor): New function.
      	* semantics.c (perform_or_defer_access_check): Add
      	access_failure_info * param, and pass it on to call to
      	enforce_access.
      	* typeck.c (access_failure_info::record_access_failure): New method.
      	(access_failure_info::maybe_suggest_accessor): New method.
      	(finish_class_member_access_expr): Pass an access_failure_info
      	instance to the lookup_member call, and call its
      	maybe_suggest_accessor method afterwards.
      
      gcc/testsuite/ChangeLog:
      	* g++.dg/other/accessor-fixits-1.C: New test case.
      	* g++.dg/other/accessor-fixits-2.C: New test case.
      	* g++.dg/other/accessor-fixits-3.C: New test case.
      	* g++.dg/other/accessor-fixits-4.C: New test case.
      
      From-SVN: r248128
      10791753
    • Carl Love's avatar
      rs6000-c: Add support for built-in functions vector unsigned long long vec_bperm (vector... · 727577c2
      Carl Love authored
      gcc/ChangeLog:
      
      2017-05-16  Carl Love  <cel@us.ibm.com>
      
      	* config/rs6000/rs6000-c: Add support for built-in functions
      	vector unsigned long long vec_bperm (vector unsigned long long,
      	                                     vector unsigned char)
      	vector signed long long vec_mule (vector signed int,
      	                                  vector signed int)
      	vector unsigned long long vec_mule (vector unsigned int,
      	                                    vector unsigned int)
      	vector signed long long vec_mulo (vector signed int,
      	                                  vector signed int)
      	vector unsigned long long vec_mulo (vector unsigned int,
      	                                    vector unsigned int)
      	vector signed char vec_sldw (vector signed char,
      	                             vector signed char,
      	                             const int)
      	vector unsigned char vec_sldw (vector unsigned char,
      	                               vector unsigned char,
      	                               const int)
      	vector signed short vec_sldw (vector signed short,
      	                              vector signed short,
      	                              const int)
      	vector unsigned short vec_sldw (vector unsigned short,
      	                                vector unsigned short,
      	                                const int)
      	vector signed int vec_sldw (vector signed int,
      	                            vector signed int,
      	                            const int)
      	vector unsigned int vec_sldw (vector unsigned int,
      	                              vector unsigned int,
      	                              const int)
      	vector signed long long vec_sldw (vector signed long long,
      	                                  vector signed long long,
      	                                  const int)
      	vector unsigned long long vec_sldw (vector unsigned long long,
      	                                    vector unsigned long long,
      	                                    const int)
      	* config/rs6000/rs6000-c: Add support for built-in functions
      	* config/rs6000/rs6000-builtin.def: Add definition for SLDW.
      	* config/rs6000/altivec.h: Add defintion for vec_sldw.
      	* doc/extend.texi: Update the built-in documentation for the
      	new built-in functions.
      
      gcc/testsuite/ChangeLog:
      
      2017-05-16  Carl Love  <cel@us.ibm.com>
      
      	* gcc.target/powerpc/builtins-3.c: New vec_mule, vec_mulo test cases.
      	* gcc.target/powerpc/builtins-3-p8.c: Add tests for the new Power 8
      	built-ins to the test suite file.  Note, support for mradds exists
      	but no test case exists.
      	* gcc.target/powerpc/builtins-3-p9.c: Add tests for the new Power 9
      	built-ins to the test suite file.
      
      From-SVN: r248125
      727577c2
    • Marek Polacek's avatar
      re PR sanitizer/80536 (UBSAN: compile time segfault) · 6b6ae9eb
      Marek Polacek authored
      	PR sanitizer/80536
      	PR sanitizer/80386
      	* cp-gimplify.c (cp_fold): Handle SAVE_EXPR.
      
      	* tree.c (save_expr): Don't fold the expression.
      
      	* c-c++-common/ubsan/pr80536.c: New test.
      	* g++.dg/ubsan/pr80386.C: New test.
      
      From-SVN: r248124
      6b6ae9eb
    • Nathan Sidwell's avatar
      name-lookup.c (check_local_shadow): New, broke out of ... · c0c24822
      Nathan Sidwell authored
      	* name-lookup.c (check_local_shadow): New, broke out of ...
      	(pushdecl_maybe_friend_1): ... here.  Call it.
      
      From-SVN: r248123
      c0c24822
    • Uros Bizjak's avatar
      * ChangeLog: Fix whitespace. · b3d762eb
      Uros Bizjak authored
      From-SVN: r248122
      b3d762eb
Loading