1. 05 Oct, 2016 29 commits
  2. 04 Oct, 2016 11 commits
    • builtin-sprintf-warn-1.c: Cast int argument to %lc directive to wint_t to… · 7ec39552
      builtin-sprintf-warn-1.c: Cast int argument to %lc directive to wint_t to silence -Wformat warnings on...
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: Cast int argument to
      	%lc directive to wint_t to silence -Wformat warnings on targets
      	where the latter is a distinct type such as long.
      
      From-SVN: r240758
      Martin Sebor committed
    • PR c++/77775 - misoptimization of PMF comparison · 2db613e5
      	* constexpr.c (cxx_eval_component_reference): Use name matching
      	for PMFs.
      
      From-SVN: r240757
      Jason Merrill committed
    • Implement P0091R2, Template argument deduction for class templates. · 76b294d4
      * parser.c (cp_parser_simple_type_specifier): Parse class placeholder.
      Use the location of the beginning of the type-specifier.
      (cp_parser_init_declarator): Parse deduction guide.
      (cp_parser_diagnose_invalid_type_name): Mention class deduction.
      (cp_parser_type_id_1): Don't accept class placeholder as template arg.
      * cp-tree.h (CLASS_PLACEHOLDER_TEMPLATE): New.
      * decl.c (grokdeclarator): Check for uninitialized auto here.
      (start_decl_1): Not here.
      (cp_finish_decl): Or here.  Don't collapse a list when doing
      class deduction.
      (grokfndecl): Check deduction guide scope and body.
      * error.c (dump_decl, dump_function_decl, dump_function_name):
      Handle deduction guides.
      * pt.c (make_template_placeholder, do_class_deduction): New.
      (build_deduction_guide, rewrite_template_parm): New.
      (dguide_name, dguide_name_p, deduction_guide_p): New.
      (do_auto_deduction): Call do_class_deduction.
      (splice_late_return_type, is_auto): Handle class placeholders.
      (template_parms_level_to_args): Split from template_parms_to_args.
      (tsubst_template_parms_level): Split from tsubst_template_parms.
      * typeck2.c (build_functional_cast): Handle class placeholder.
      
      From-SVN: r240756
      Jason Merrill committed
    • PR c++/77804 - Internal compiler error on incorrect initialization of new-d array · 8ff04ff9
      gcc/cp/ChangeLog:
      
      	PR c++/77804
      	* init.c (warn_placement_new_too_small): Avoid assuming an array type
      	has a constant size.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/77804
      	* g++.dg/warn/Wplacement-new-size-4.C: New test.
      
      From-SVN: r240754
      Martin Sebor committed
    • read-md.c: track column numbers · 3814e880
      gcc/ChangeLog:
      	* genattrtab.c (make_internal_attr): Supply dummy column number to
      	file_location ctor.
      	(main): Likewise.
      	* genoutput.c (init_insn_for_nothing): Likewise.
      	* gensupport.c (add_define_attr): Likewise.
      	* read-md.c (message_at_1): Print column number.
      	(fatal_with_file_and_line): Likewise.
      	(rtx_reader::read_char): Track column numbers.
      	(rtx_reader::unread_char): Likewise.
      	(rtx_reader::rtx_reader): Initialize m_read_md_colno.
      	(rtx_reader::handle_include): Stash and restore m_read_md_colno.
      	(rtx_reader::handle_file): Initialize m_read_md_colno.
      	(rtx_reader::get_current_location): Supply column number to
      	file_location ctor.
      	* read-md.h (struct file_location): Add field "colno".
      	(file_location::file_location): Likewise.
      	(rtx_reader::get_colno): New accessor.
      	(rtx_reader::m_read_md_colno): New field.
      	(rtx_reader::m_last_line_colno): New field.
      
      From-SVN: r240752
      David Malcolm committed
    • re PR c++/77791 (ICE on invalid C++11 code with redefined function parameter:… · f72da967
      re PR c++/77791 (ICE on invalid C++11 code with redefined function parameter: tree check: expected tree that contains ‘decl minimal’ structure, have ‘error_mark’ in cp_parser_lambda_declarator_opt, at cp/parser.c:1011)
      
      	PR c++/77791
      	* parser.c (cp_parser_lambda_declarator_opt): Only pedwarn
      	for C++11 on decls in the param_list.  Test cxx_dialect < cxx14 before
      	the loop just once.
      
      	* g++.dg/cpp0x/lambda/lambda-77791.C: New test.
      
      From-SVN: r240751
      Jakub Jelinek committed
    • extend.texi (Java Exceptions): Remove. · bfecd57c
      	* doc/extend.texi (Java Exceptions): Remove.
      	(java_interface): Remove.
      cp/
      	* cp-tree.h (enum cp_tree_index): Remove CPTI_JAVA_*,
      	CPTI_LANG_NAME_JAVA and CPTI_JCLASS.
      	(java_byte_type_node, java_short_type_node, java_int_type_node,
      	java_long_type_node, java_float_type_node, java_double_type_node,
      	java_char_type_node, java_boolean_type_node, lang_name_java,
      	jclass_node): Remove.
      	(enum languages): Remove lang_java.
      	(TYPE_FOR_JAVA): Remove.
      	(struct lang_type_class): Remove java_interface bit-field.
      	(TYPE_JAVA_INTERFACE): Remove.
      	(pragma_java_exceptions): Remove.
      	(check_java_method, build_java_class_ref): Remove prototypes.
      	* name-lookup.c (pushtag_1): Don't set TYPE_FOR_JAVA.
      	* decl2.c (acceptable_java_type, check_java_method): Remove.
      	(import_export_decl): Remove TYPE_FOR_JAVA handling.
      	(build_java_method_aliases): Remove.
      	(c_parse_final_cleanups): Don't call build_java_method_aliases.
      	(possibly_inlined_p): Don't test pragma_java_exceptions.
      	* init.c (build_new_1): Remove TYPE_FOR_JAVA handling.
      	(build_java_class_ref): Remove.
      	* pt.c (maybe_new_partial_specialization, lookup_template_class_1,
      	instantiate_class_template_1): Don't copy TYPE_FOR_JAVA.
      	* except.c (eh_type_info): Remove java type handling.
      	(decl_is_java_type, choose_personality_routine): Remove.
      	(initialize_handler_parm): Don't call choose_personality_routine.
      	(expand_start_catch_block): Don't handle java types.
      	(build_throw): Likewise.
      	* cp-lang.c (cp_eh_personality): Don't handle pragma_java_exceptions.
      	* typeck.c (structural_comptypes): Don't compare TYPE_FOR_JAVA.
      	* call.c (build_over_call): Don't handle TYPE_JAVA_INTERFACE.
      	(java_iface_lookup_fn): Remove.
      	(build_java_interface_fn_ref): Remove.
      	* tree.c (cxx_attribute_table): Remove java_interface.
      	(handle_java_interface_attribute): Remove.
      	* lex.c (pragma_java_exceptions): Remove.
      	(init_cp_pragma): Don't register GCC java_exceptions pragma.
      	(handle_pragma_java_exceptions): Remove.
      	(retrofit_lang_decl): Don't handle lang_name_java.
      	* method.c (implicitly_declare_fn): Don't handle TYPE_FOR_JAVA.
      	* error.c (language_to_string): Don't handle lang_java.
      	* decl.c (record_builtin_java_type): Remove.
      	(initialize_predefined_identifiers): Remove Java.
      	(cxx_init_decl_processing): Remove java_*_type_node.
      	(cp_finish_decl): Don't handle TYPE_FOR_JAVA.
      	(grokfndecl): Likewise.
      	(check_special_function_return_type): Likewise.
      	(grokdeclarator): Don't set TYPE_FOR_JAVA.
      	(grokparms): Don't handle TYPE_FOR_JAVA.
      	(xref_basetypes): Likewise.
      	(check_function_type): Likewise.
      	(finish_constructor_body): Likewise.
      	* mangle.c (write_builtin_type): Don't handle TYPE_FOR_JAVA
      	and java_*_type_node.
      	(write_bare_function_type): Don't handle TYPE_FOR_JAVA.
      	(write_java_integer_type_codes): Remove.
      	* class.c (add_method): Don't handle TYPE_FOR_JAVA.
      	(add_implicitly_declared_members, determine_key_method,
      	finish_struct_1): Likewise.
      	(push_lang_context): Don't handle lang_name_java.
      testsuite/
      	* g++.dg/other/java3.C: Remove.
      	* g++.dg/other/java1.C: Remove.
      	* g++.dg/other/error12.C: Remove.
      	* g++.dg/other/java2.C: Remove.
      	* g++.dg/warn/Wnvdtor.C: Remove.
      	* g++.dg/lookup/java1.C: Remove.
      	* g++.dg/lookup/java2.C: Remove.
      	* g++.dg/ext/pr34829.C: Remove.
      	* g++.dg/ext/java-3.C: Remove.
      	* g++.dg/ext/java-1.C: Remove.
      	* g++.dg/ext/java-2.C: Remove.
      	* g++.old-deja/g++.oliva/dwarf2.C: Remove.
      
      From-SVN: r240750
      Jakub Jelinek committed
    • re PR tree-optimization/77808 (ICE in duplicate_ssa_name_ptr_info, at… · fe8b1e83
      re PR tree-optimization/77808 (ICE in duplicate_ssa_name_ptr_info, at tree-ssanames.c:630 starting with r240439)
      
      Fix PR tree-optimization/77808
      
      gcc/
      	PR tree-optimization/77808
      	* tree-ssa-loop-prefetch.c (issue_prefetch_ref): Check base_addr
      	and addr are different before copying points-to information.
      
      gcc/testsuite/
      	PR tree-optimization/77808
      	* gcc.dg/tree-ssa/pr77808.c: New testcase.
      
      From-SVN: r240749
      Doug Gilmore committed
    • x86-tune.def (X86_TUNE_VECTORIZE_DOUBLE): Remove. · 9f06db14
      	* config/i386/x86-tune.def (X86_TUNE_VECTORIZE_DOUBLE): Remove.
      	* config/i386/i386.h (TARGET_VECTORIZE_DOUBLE): Remove.
      	* config/i386/i386.c (ix86_add_stmt_cost): Use TARGET_BONNEL instead
      	of !TARGET_VECTORIZE_DOUBLE when penalizing DFmode vector ops.
      
      From-SVN: r240748
      Uros Bizjak committed
    • re PR tree-optimization/77399 (Poor code generation for vector casts and loads) · 078b5aab
      2016-10-04  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/77399
      	* tree-ssa-forwprop.c (simplify_vector_constructor): Properly
      	verify the target can convert.
      
      	* gcc.dg/tree-ssa/forwprop-35.c: Adjust.
      
      From-SVN: r240744
      Richard Biener committed