- 19 May, 2016 32 commits
-
-
A common way for a c_expr to have an uninitialized src_range is in error-handling, where the "value" field is set to error_mark_node without touching the src_range, leading to complaints from valgrind. This patch introduces a new method c_expr::set_error which sets the value to error_mark_node whilst initializing the src_range to UNKNOWN_LOCATION. This fixes the valgrind issue seen in PR c/71171, along with various other related issues seen when running the testsuite using the checker patch I posted here: https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00887.html (this checker still doesn't fully work yet, but it seems to be good for easily detecting these issues without needing Valgrind). gcc/c/ChangeLog: PR c/71171 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error in error-handling. (c_parser_postfix_expression): Likewise. * c-tree.h (c_expr::set_error): New method. * c-typeck.c (parser_build_binary_op): In error-handling, ensure that result's range is initialized. From-SVN: r236488
David Malcolm committed -
PR c++/71075 * pt.c (unify_template_argument_mismatch): Use %qE instead of %qD. * g++.dg/diagnostic/pr71075.C: New test. From-SVN: r236487
Marek Polacek committed -
PR c++/10200 * pt.c (fn_type_unification): Add outer template args if needed. (type_unification_real): Handle getting full args. From-SVN: r236486
Jason Merrill committed -
The source-range handling for the array form of operator new/delete erroneously assumed that the "]" was present, leading to a dereference of NULL when it's absent. Fix it thusly. gcc/cp/ChangeLog: PR c++/71184 * parser.c (cp_parser_operator): For array new/delete, check that cp_parser_require returned a non-NULL token before dereferencing it. gcc/testsuite/ChangeLog: PR c++/71184 * g++.dg/pr71184.C: New test case. From-SVN: r236483
David Malcolm committed -
2016-05-16 Ryan Burn <contact@rnburn.com> * Makefile.in (GTFILES): Add cilk.h and cilk-common.c. * gengtype.c (open_base_files): Add cilk.h to ifiles. From-SVN: r236482
Ryan Burn committed -
* sched-deps.c (sched_analyze_2) <case TRAP_IF>: Also force pending loads from memory. From-SVN: r236481
Uros Bizjak committed -
gcc/testsuite/ChangeLog: 2016-05-19 Kelvin Nilsen <kelvin@gcc.gnu.org> * gcc.target/powerpc/darn-0.c: New test. * gcc.target/powerpc/darn-1.c: New test. * gcc.target/powerpc/darn-2.c: New test. gcc/ChangeLog: 2016-05-19 Kelvin Nilsen <kelvin@gcc.gnu.org> * config/rs6000/altivec.md (UNSPEC_DARN): New unspec constant. (UNSPEC_DARN_32): New unspec constant. (UNSPEC_DARN_RAW): New unspec constant. (darn_32): New instruction. (darn_raw): New instruction. (darn): New instruction. * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_0): Add support and documentation for this macro. (BU_P9_MISC_1): New macro definition. (BU_P9_64BIT_MISC_0): New macro definition. (BU_P9_MISC_0): New macro definition. (darn_32): New builtin definition. (darn_raw): New builtin definition. (darn): New builtin definition. * config/rs6000/rs6000.c: Add #define RS6000_BUILTIN_0 and #undef RS6000_BUILTIN_0 directives to surround each occurrence of #include "rs6000-builtin.def". (rs6000_builtin_mask_calculate): Add in the RS6000_BTM_MODULO and RS6000_BTM_64BIT flags to the returned mask, depending on configuration. (def_builtin): Correct an error in the assignments made to the debugging variable attr_string. (rs6000_expand_builtin): Add support for no-operand built-in functions. (builtin_function_type): Remove fatal_error assertion that is no longer valid. (rs6000_common_init_builtins): Add support for no-operand built-in functions. * config/rs6000/rs6000.h (RS6000_BTM_MODULO): New macro definition. (RS6000_BTM_PURE): Enhance comment to clarify intent of this flag definition. (RS6000_BTM_64BIT): New macro definition. * doc/extend.texi: Document __builtin_darn (void), __builtin_darn_raw (void), and __builtin_darn_32 (void) built-in functions. From-SVN: r236480
Kelvin Nilsen committed -
* tree-vect-loop.c (vect_analyze_loop_2): Use also max_loop_iterations_int. From-SVN: r236478
Jan Hubicka committed -
PR tree-optimization/71031 * tree-vrp.c (extract_range_from_binary_expr_1): Turn assert into a condition and adjust the code a bit. * gcc.dg/tree-ssa/vrp100.c: New test. From-SVN: r236477
Marek Polacek committed -
* tree-vect-stmts.c (vectorizable_simd_clone_call): Utilize auto_vec instead of vec. From-SVN: r236472
Martin Liska committed -
* tree-parloops.c (oacc_entry_exit_ok): Release a vector. From-SVN: r236471
Martin Liska committed -
* tree-if-conv.c (ifcvt_repair_bool_pattern): Utilize auto_vecs. From-SVN: r236470
Martin Liska committed -
* ipa-pure-const.c (set_function_state): Remove an existing funct_state. (remove_node_data): Do not free it as it's released in set_function_state. From-SVN: r236469
Martin Liska committed -
* tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Release bitmap. From-SVN: r236468
Martin Liska committed -
* omp-simd-clone.c (simd_clone_adjust): Release vector. From-SVN: r236467
Martin Liska committed -
* tree-ssa-reassoc.c (eliminate_duplicate_pair): Truncate an auto_vec instead of re-creating it. From-SVN: r236466
Martin Liska committed -
* tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Use auto_vec instead of vec. From-SVN: r236465
Martin Liska committed -
* lto-section-in.c (lto_get_section_data): Call lto_check_version with additional argument. * lto-streamer.c (lto_check_version): Add new argument. * lto-streamer.h (lto_check_version): Likewise. From-SVN: r236464
Martin Liska committed -
* config/arm/arm.c (arm_new_rtx_costs, SIGN_EXTEND case): Don't add cost of inner memory when handling sign-extended loads. From-SVN: r236461
Kyrylo Tkachov committed -
gcc/ * cse.c (cse_main): Free dominance info. (rest_of_handle_cse): Don't free dominance info. (rest_of_handle_cse2): Likewise. (rest_of_handle_cse_after_global_opts): Likewise. gcc/testsuite/ * gcc.dg/pr71148.c: New test. From-SVN: r236460
Ilya Enkovich committed -
PR target/71056 * config/arm/arm-builtins.c (arm_builtin_vectorized_function): Return NULL_TREE early if NEON is not available. Remove now redundant check in ARM_CHECK_BUILTIN_MODE. * gcc.target/arm/pr71056.c: New test. From-SVN: r236459
Kyrylo Tkachov committed -
2016-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de> * decl.c (finish_enum_value_list): Use the specified mode. testsuite: 2016-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de> * c-c++-common/pr69669.c: Check the used mode. From-SVN: r236458
Bernd Edlinger committed -
2016-05-19 Maxim Ostapenko <m.ostapenko@samsung.com> PR sanitizer/64354 * cppbuiltin.c (define_builtin_macros_for_compilation_flags): Add new builtin __SANITIZE_THREAD__ macros for fsanitize=thread switch. * doc/cpp.texi: Document new macros. * c-c++-common/tsan/sanitize-thread-macro.c: New test. From-SVN: r236457
Maxim Ostapenko committed -
PR other/61321 PR other/61233 * demangle.h (enum demangle_component_type) <DEMANGLE_COMPONENT_CONVERSION>: New value. From-SVN: r236449
Jakub Jelinek committed -
From-SVN: r236448
Jakub Jelinek committed -
PR tree-optimization/69848 * tree-vect-loop.c (vectorizable_reduction): Don't factor comparison expr out of VEC_COND_EXPR for COND_REDUCTION. From-SVN: r236447
Bin Cheng committed -
PR c++/70498 * cp-demangle.c (d_expression_1): Formatting fix. From-SVN: r236445
Jakub Jelinek committed -
From-SVN: r236443
Jakub Jelinek committed -
It failed for targets that have an eh_return pattern with a splitter gated by epilogue_done. * function.c (thread_prologue_and_epilogue_insn): Move the "goto epilogue_done" one block later. From-SVN: r236441
Segher Boessenkool committed -
2016-05-19 Richard Biener <rguenther@suse.de> PR tree-optimization/70729 * passes.def: Move LIM pass before PRE. Remove no longer required copyprop and move first DCE out of the loop pipeline. * gcc.dg/autopar/outer-6.c: Adjust to avoid redundant store. * gcc.dg/graphite/scop-18.c: Likewise. * gcc.dg/pr41783.c: Disable LIM. * gcc.dg/tree-ssa/loadpre10.c: Likewise. * gcc.dg/tree-ssa/loadpre23.c: Likewise. * gcc.dg/tree-ssa/loadpre24.c: Likewise. * gcc.dg/tree-ssa/loadpre25.c: Likewise. * gcc.dg/tree-ssa/loadpre4.c: Likewise. * gcc.dg/tree-ssa/loadpre8.c: Likewise. * gcc.dg/tree-ssa/ssa-pre-16.c: Likewise. * gcc.dg/tree-ssa/ssa-pre-18.c: Likewise. * gcc.dg/tree-ssa/ssa-pre-20.c: Likewise. * gcc.dg/tree-ssa/ssa-pre-3.c: Likewise. * gfortran.dg/pr42108.f90: Likewise. From-SVN: r236440
Richard Biener committed -
opts-common.c's cmdline_handle_error handles invalid arguments for options with CL_ERR_ENUM_ARG by building a string listing the valid arguments. By also building a vec of valid arguments, we can use find_closest_string and provide a hint if we see a close misspelling. gcc/ChangeLog: PR driver/69265 * Makefile.in (GCC_OBJS): Move spellcheck.o to... (OBJS-libcommon-target): ...here. * opts-common.c: Include spellcheck.h. (cmdline_handle_error): Build a vec of valid options and use it to suggest provide hints for misspelled arguments. gcc/testsuite/ChangeLog: PR driver/69265 * gcc.dg/spellcheck-options-11.c: New test case. From-SVN: r236439
David Malcolm committed -
From-SVN: r236438
GCC Administrator committed
-
- 18 May, 2016 8 commits
-
-
* cplus-dem.c (enum type_kind_t): Add tk_rvalue_reference constant. (demangle_template_value_parm): Handle tk_rvalue_reference type kind. (do_type): Support 'O' type id (rvalue references). * testsuite/demangle-expected: Add tests. From-SVN: r236434
Artemiy Volkov committed -
PR c++/71100 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Don't drop lhs if it has TREE_ADDRESSABLE type. * g++.dg/opt/pr71100.C: New test. From-SVN: r236430
Jakub Jelinek committed -
PR target/71145 * config/alpha/alpha.md (trap): Add (use (reg:DI 29)). (*exception_receiver_1): Return "#" for TARGET_EXPLICIT_RELOCS. From-SVN: r236423
Uros Bizjak committed -
* pt.c (value_dependent_expression_p): Tweak new cases to better match the wording in the standard. From-SVN: r236421
Jason Merrill committed -
2016-05-18 Martin Jambor <mjambor@suse.cz> PR ipa/69708 * ipa-cp.c (ipa_get_jf_pass_through_result): Allow non-ip constant input for NOP_EXPR pass-through functions. * ipa-prop.c (ipa_compute_jump_functions_for_edge): Allow aggregate global constant VAR_DECLs in constant jump functions. testsuite/ * gcc.dg/ipa/iinline-cstagg-2.c: New test. * gcc.dg/ipa/ipcp-cstagg-5.c: Likewise. * gcc.dg/ipa/ipcp-cstagg-6.c: Likewise. * gcc.dg/ipa/ipcp-cstagg-7.c: Likewise. From-SVN: r236418
Martin Jambor committed -
2016-05-18 Martin Jambor <mjambor@suse.cz> PR ipa/69708 * ipa-prop.c (parm_preserved_before_stmt_p): Return true for loads from TREE_READONLY parameters. From-SVN: r236417
Martin Jambor committed -
2016-05-18 Martin Jambor <mjambor@suse.cz> PR ipa/69708 * cgraph.h (cgraph_indirect_call_info): New field guaranteed_unmodified. * ipa-cp.c (ipa_get_indirect_edge_target_1): Also pass parameter value to ipa_find_agg_cst_for_param, check guaranteed_unmodified when appropriate. * ipa-inline-analysis.c (evaluate_conditions_for_known_args): Also pass the parameter value to ipa_find_agg_cst_for_param. * ipa-prop.c (ipa_load_from_parm_agg): New parameter guaranteed_unmodified, store AA results there instead of bailing out if present. (ipa_note_param_call): Also initialize guaranteed_unmodified flag. (ipa_analyze_indirect_call_uses): Also set guaranteed_unmodified flag. (find_constructor_constant_at_offset): New function. (ipa_find_agg_cst_from_init): Likewise. (ipa_find_agg_cst_for_param): Also seearch for aggregate values in static initializers of contants, report back through a new paameter from_global_constant if that was the case. (try_make_edge_direct_simple_call): Also pass parameter value to ipa_find_agg_cst_for_param, check guaranteed_unmodified when appropriate. (ipa_write_indirect_edge_info): Stream new flag guaranteed_unmodified. (ipa_read_indirect_edge_info): Likewise. * ipa-prop.h (ipa_find_agg_cst_for_param): Update declaration. (ipa_load_from_parm_agg): Likewise. testsuite/ * gcc.dg/ipa/iinline-cstagg-1.c: New test. * gcc.dg/ipa/ipcp-cstagg-1.c: Likewise. * gcc.dg/ipa/ipcp-cstagg-2.c: Likewise. * gcc.dg/ipa/ipcp-cstagg-3.c: Likewise. * gcc.dg/ipa/ipcp-cstagg-4.c: Likewise. From-SVN: r236416
Martin Jambor committed -
/cp 2016-05-18 Paolo Carlini <paolo.carlini@oracle.com> PR c++/69793 * parser.c (cp_parser_template_id): Don't call cp_lexer_peek_nth_token when the previous cp_lexer_peek_token returns CPP_EOF. /testsuite 2016-05-18 Paolo Carlini <paolo.carlini@oracle.com> PR c++/69793 * g++.dg/template/crash122.C: New. From-SVN: r236414
Paolo Carlini committed
-