Daily bump.
authorGCC Administrator <gccadmin@gcc.gnu.org>
Sun, 20 Sep 2020 00:16:23 +0000 (00:16 +0000)
committerGCC Administrator <gccadmin@gcc.gnu.org>
Sun, 20 Sep 2020 00:16:23 +0000 (00:16 +0000)
gcc/ChangeLog
gcc/DATESTAMP
gcc/c-family/ChangeLog
gcc/c/ChangeLog
gcc/cp/ChangeLog
gcc/fortran/ChangeLog
gcc/objc/ChangeLog
gcc/testsuite/ChangeLog

index be428b84fd0d410e4af8a8291021a53c186a5b98..41b34b207fc11e9c2e39b99a5f879c0950391f7e 100644 (file)
@@ -1,3 +1,82 @@
+2020-09-19  Martin Sebor  <msebor@redhat.com>
+
+       PR middle-end/82608
+       PR middle-end/94195
+       PR c/50584
+       PR middle-end/84051
+       * gimple-array-bounds.cc (get_base_decl): New function.
+       (get_ref_size): New function.
+       (trailing_array): New function.
+       (array_bounds_checker::check_array_ref): Call them.  Handle arrays
+       declared in function parameters.
+       (array_bounds_checker::check_mem_ref):  Same.  Handle references to
+       dynamically allocated arrays.
+
+2020-09-19  Martin Sebor  <msebor@redhat.com>
+
+       PR c/50584
+       * builtins.c (warn_for_access): Add argument.  Distinguish between
+       reads and writes.
+       (check_access): Add argument.  Distinguish between reads and writes.
+       (gimple_call_alloc_size): Set range even on failure.
+       (gimple_parm_array_size): New function.
+       (compute_objsize): Call it.
+       (check_memop_access): Pass check_access an additional argument.
+       (expand_builtin_memchr, expand_builtin_strcat): Same.
+       (expand_builtin_strcpy, expand_builtin_stpcpy_1): Same.
+       (expand_builtin_stpncpy, check_strncat_sizes): Same.
+       (expand_builtin_strncat, expand_builtin_strncpy): Same.
+       (expand_builtin_memcmp): Same.
+       * builtins.h (compute_objsize): Declare a new overload.
+       (gimple_parm_array_size): Declare.
+       (check_access): Add argument.
+       * calls.c (append_attrname): Simplify.
+       (maybe_warn_rdwr_sizes): Handle internal attribute access.
+       * tree-ssa-uninit.c (maybe_warn_pass_by_reference): Avoid adding
+       quotes.
+
+2020-09-19  Martin Sebor  <msebor@redhat.com>
+
+       * tree-ssa-uninit.c (maybe_warn_pass_by_reference): Handle attribute
+       access internal representation of arrays.
+
+2020-09-19  Martin Sebor  <msebor@redhat.com>
+
+       PR c/50584
+       * attribs.c (decl_attributes): Also pass decl along with type
+       attributes to handlers.
+       (init_attr_rdwr_indices): Change second argument to attribute chain.
+       Handle internal attribute representation in addition to external.
+       (get_parm_access): New function.
+       (attr_access::to_internal_string): Define new member function.
+       (attr_access::to_external_string): Define new member function.
+       (attr_access::vla_bounds): Define new member function.
+       * attribs.h (struct attr_access): Declare new members.
+       (attr_access::from_mode_char): Define new member function.
+       (get_parm_access): Declare new function.
+       * calls.c (initialize_argument_information): Pass function type
+       attributes to init_attr_rdwr_indices.
+       * doc/invoke.texi (-Warray-parameter, -Wvla-parameter): Document.
+       * tree-pretty-print.c (dump_generic_node): Correct handling of
+       qualifiers.
+       * tree-ssa-uninit.c (maybe_warn_pass_by_reference): Same.
+       * tree.h (access_mode): Add new enumerator.
+
+2020-09-19  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * doc/generic.texi (Basic Statements): Document SWITCH_EXPR here,
+       not SWITCH_STMT.
+       (Statements for C and C++): Rename node to reflect what
+       the introduction already says about sharing between C and C++
+       front ends.  Copy-edit and correct documentation for structured
+       loops and switch.
+
+2020-09-19  liuhongt  <hongtao.liu@intel.com>
+
+       PR target/96861
+       * config/i386/x86-tune-costs.h (skylake_cost): increase rtx
+       cost of sse_to_integer from 2 to 6.
+
 2020-09-18  Sudi Das  <sudi.das@arm.com>
            Omar Tahir  <omar.tahir@arm.com>
 
index 795f43e0fdb75ef6a5831b782efb14a320e13045..2225e4604f0ff9e2f582da229ed79355155ccb64 100644 (file)
@@ -1 +1 @@
-20200919
+20200920
index 7b303913caede400784c6ffa09dcf6be00882af1..bc002cf9670abac6422ceca2f0923232e317dff3 100644 (file)
@@ -1,3 +1,79 @@
+2020-09-19  Martin Sebor  <msebor@redhat.com>
+
+       PR c/50584
+       * c-common.h (warn_parm_array_mismatch): Declare new function.
+       (has_attribute): Move declaration of an existing function.
+       (build_attr_access_from_parms): Declare new function.
+       * c-warn.c (parm_array_as_string): Define new function.
+       (plus_one):  Define new function.
+       (warn_parm_ptrarray_mismatch): Define new function.
+       (warn_parm_array_mismatch):  Define new function.
+       (vla_bound_parm_decl): New function.
+       * c.opt (-Warray-parameter, -Wvla-parameter): New options.
+       * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
+       qualifiers here...
+       (c_pretty_printer::direct_abstract_declarator): ...but instead print
+       them in brackets here.  Also print [static].  Strip extraneous
+       expressions from VLA bounds.
+
+2020-09-19  Martin Sebor  <msebor@redhat.com>
+
+       PR c/50584
+       * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
+       (handle_argspec_attribute): New function.
+       (get_argument, get_argument_type): New functions.
+       (append_access_attrs): Add overload.  Handle internal attribute
+       representation in addition to external.
+       (handle_access_attribute): Handle internal attribute representation
+       in addition to external.
+       (build_attr_access_from_parms): New function.
+
+2020-09-19  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * c-gimplify.c (genericize_c_loop): Rewrite to match
+       c_finish_loop in c-typeck.c.
+
+2020-09-19  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * c-common.c (c_block_may_fallthrough): New, split from
+       cxx_block_may_fallthrough in the cp front end.
+       (c_common_init_ts): Move handling of loop and switch-related
+       statements here from the cp front end.
+       * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
+       cp front end.
+       (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
+       * c-common.h (c_block_may_fallthru): Declare.
+       (bc_state_t): Move here from cp front end.
+       (save_bc_state, restore_bc_state): Declare.
+       (c_genericize_control_stmt): Declare.
+       (WHILE_COND, WHILE_BODY): Likewise.
+       (DO_COND, DO_BODY): Likewise.
+       (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
+       (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
+       (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
+       (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
+       (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
+       * c-dump.c (dump_stmt): Copy from cp front end.
+       (c_dump_tree): Move code to handle structured loop and switch
+       tree nodes here from cp front end.
+       * c-gimplify.c: Adjust includes.
+       (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
+       cp front end.
+       (save_bc_state, restore_bc_state): New functions using old code
+       from cp front end.
+       (get_bc_label, expr_loc_or_loc): Move from cp front end.
+       (genericize_c_loop): Move from cp front end.
+       (genericize_for_stmt, genericize_while_stmt): Likewise.
+       (genericize_do_stmt, genericize_switch_stmt): Likewise.
+       (genericize_continue_stmt, genericize_break_stmt): Likewise.
+       (genericize_omp_for_stmt): Likewise.
+       (c_genericize_control_stmt): New function using code split from
+       cp front end.
+       (c_genericize_control_r): New.
+       (c_genericize): Call walk_tree with c_genericize_control_r.
+       * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
+       structured loop and switch tree nodes here from cp front end.
+
 2020-09-17  Patrick Palka  <ppalka@redhat.com>
 
        PR c/80076
index eb68b1274fca4990f3d201a06e7ffaec39e6f48a..839bfa17ad1244c19ec598df7e5afaa50acd88e7 100644 (file)
@@ -1,3 +1,59 @@
+2020-09-19  Martin Sebor  <msebor@redhat.com>
+
+       PR c/50584
+       * c-decl.c (lookup_last_decl): Define new function.
+       (c_decl_attributes): Call it.
+       (start_decl): Add argument and use it.
+       (finish_decl): Call build_attr_access_from_parms and decl_attributes.
+       (get_parm_array_spec): Define new function.
+       (push_parm_decl): Call get_parm_array_spec.
+       (start_function): Call warn_parm_array_mismatch.  Build attribute
+       access and add it to current function.
+       * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
+       in forms of array parameters.
+       * c-tree.h (start_decl): Add argument.
+
+2020-09-19  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * c-decl.c (c_break_label, c_cont_label): Delete, and replace
+       with...
+       (in_statement): New.
+       (start_function): Adjust for above change.
+       (c_push_function_context, c_pop_function_context): Likewise.
+       * c-lang.h (struct language_function): Likewise.
+       * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
+       * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
+       New.
+       (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
+       (c_parser_switch_statement): Adjust break/switch context handling
+       and calls to renamed functions.
+       (c_parser_while_statement): Adjust break/switch context handling and
+       build a WHILE_STMT.
+       (c_parser_do_statement): Ditto, with DO_STMT respectively.
+       (c_parser_for_statement): Ditto, with FOR_STMT respectively.
+       (c_parser_omp_for_loop): Adjust break/switch context handling.
+       * c-tree.h (c_break_label, c_cont_label): Delete.
+       (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
+       (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
+       (in_statement, switch_statement_break_seen_p): Declare.
+       (c_start_case, c_finish_case): Renamed to...
+       (c_start_switch, c_finish_switch).
+       (c_finish_bc_stmt): Adjust arguments.
+       * c-typeck.c (build_function_call_vec): Don't try to print
+       statements with %qE format.
+       (struct c_switch):  Rename switch_expr field to switch_stmt.
+       Add break_stmt_seen_p field.
+       (c_start_case): Rename to c_start_switch.  Build a SWITCH_STMT
+       instead of a SWITCH_EXPR.  Update for changes to struct c_switch.
+       (do_case): Update for changes to struct c_switch.
+       (c_finish_case): Rename to c_finish_switch.  Update for changes to
+       struct c_switch and change of representation from SWITCH_EXPR to
+       SWITCH_STMT.
+       (c_finish_loop): Delete.
+       (c_finish_bc_stmt): Update to reflect changes to break/continue
+       state representation.  Build a BREAK_STMT or CONTINUE_STMT instead
+       of a GOTO_EXPR except for objc foreach loops.
+
 2020-09-01  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/96867
index 3f3de0b29ede38f71ab24a4f85749b5703243d4c..8e6fd0d31b7f64e1336a771a32fe31f769fe5d65 100644 (file)
@@ -1,3 +1,55 @@
+2020-09-19  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * cp-gimplify.c (enum bc_t, bc_label): Move to c-family.
+       (begin_bc_block, finish_bc_block, get_bc_label): Likewise.
+       (genericize_cp_loop): Likewise.
+       (genericize_for_stmt, genericize_while_stmt): Likewise.
+       (genericize_do_stmt, genericize_switch_stmt): Likewise.
+       (genericize_continue_stmt, genericize_break_stmt): Likewise.
+       (genericize_omp_for_stmt): Likewise.
+       (cp_genericize_r): Call c_genericize_control_stmt instead of
+       above functions directly.
+       (cp_genericize): Call save_bc_state and restore_bc_state instead
+       of manipulating bc_label directly.
+       * cp-objcp-common.c (cxx_block_may_fallthru): Defer to
+       c_block_may_fallthru instead of handling SWITCH_STMT here.
+       (cp_common_init_ts): Move handling of loop and switch-related
+       statements to c-family.
+       * cp-tree.def (FOR_STMT, WHILE_STMT, DO_STMT): Move to c-family.
+       (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
+       * cp-tree.h (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
+       (WHILE_COND, WHILE_BODY): Likewise.
+       (DO_COND, DO_BODY): Likewise.
+       (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
+       (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
+       (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
+       (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
+       * cxx-pretty-print.c (cxx_pretty_printer::statement): Move code
+       to handle structured loop and switch tree nodes to c-family.
+       * dump.c (cp_dump_tree): Likewise.
+
+2020-09-19  Patrick Palka  <ppalka@redhat.com>
+
+       PR c++/96531
+       PR c++/97103
+       * constraint.cc (map_arguments): Call template_parm_to_arg
+       in the self-mapping case.
+       (finish_shorthand_constraint): No need to build a TREE_LIST
+       before calling template_parm_to_arg.
+       * pt.c (template_parm_to_arg): Rewrite to handle TEMPLATE_PARM_P
+       nodes as well as DECL_TEMPLATE_PARM_P nodes, and to make the
+       overlying TREE_LIST node optional.
+       (keep_template_parm): Don't record a BOUND_TEMPLATE_TEMPLATE_PARM,
+       instead record its corresponding TEMPLATE_TEMPLATE_PARM.
+       (convert_generic_types_to_packs): Don't call
+       template_parm_to_arg.
+
+2020-09-19  Patrick Palka  <ppalka@redhat.com>
+
+       PR c++/97051
+       * constraint.cc (satisfy_atom): Pass true as the
+       manifestly_const_eval argument to maybe_constant_value.
+
 2020-09-18  Jason Merrill  <jason@redhat.com>
 
        PR bootstrap/97118
index 2faf861174d09399de35764ffd38913403e2a3fb..3c8701e2192abe19d2c5d74613ecf90fae9e6c8b 100644 (file)
@@ -1,3 +1,13 @@
+2020-09-19  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * interface.c (gfc_compare_actual_formal): Add assertion after
+       main processing loop to silence maybe-uninitialized error.
+
+2020-09-19  Harald Anlauf  <anlauf@gmx.de>
+
+       * symbol.c (gfc_check_conflict): Allow ELEMENTAL RECURSIVE
+       procedure prefix for -std=f2018.
+
 2020-09-17  Tobias Burnus  <tobias@codesourcery.com>
 
        PR fortran/96041
index 8970c15d372c666ad799f857a3294598425de526..fd36c3d19af04b3b552719a7cb63000453beb618 100644 (file)
@@ -1,3 +1,8 @@
+2020-09-19  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * objc-act.c (objc_start_method_definition): Update to reflect
+       changes to break/continue state bookkeeping in C front end.
+
 2020-09-17  Patrick Palka  <ppalka@redhat.com>
 
        PR c/80076
index 4450f204454896c6c279245363e5760f0d9e267f..716f644f662ea4592e5f3b6fc8583d102355ef93 100644 (file)
@@ -1,3 +1,85 @@
+2020-09-19  Martin Sebor  <msebor@redhat.com>
+
+       PR middle-end/82608
+       PR middle-end/94195
+       PR c/50584
+       PR middle-end/84051
+       * c-c++-common/Warray-bounds.c: Adjust.
+       * gcc.dg/Wbuiltin-declaration-mismatch-9.c: Adjust.
+       * gcc.dg/Warray-bounds-63.c: New test.
+       * gcc.dg/Warray-bounds-64.c: New test.
+       * gcc.dg/Warray-bounds-65.c: New test.
+       * gcc.dg/Warray-bounds-66.c: New test.
+       * gcc.dg/Warray-bounds-67.c: New test.
+
+2020-09-19  Martin Sebor  <msebor@redhat.com>
+
+       PR c/50584
+       * c-c++-common/Wsizeof-pointer-memaccess1.c: Disable new expected
+       warnings.
+       * g++.dg/ext/attr-access.C: Update text of expected warnings.
+       * gcc.dg/Wstringop-overflow-23.c: Same.
+       * gcc.dg/Wstringop-overflow-24.c: Same.
+       * gcc.dg/attr-access-none.c: Same.
+       * gcc.dg/dfp/composite-type.c: Prune expected warnings.
+       * gcc.dg/torture/pr57147-1.c: Add a member to an otherwise empty
+       struct to avoid a warning.
+       * gcc.dg/torture/pr57147-3.c: Same.
+       * gcc.dg/Warray-bounds-30.c: Adjust.
+       * gcc.dg/attr-access-none.c: Same.
+       * gcc.dg/Wstringop-overflow-40.c: New test.
+       * gcc.dg/attr-access-2.c: New test.
+
+2020-09-19  Martin Sebor  <msebor@redhat.com>
+
+       * gcc.dg/uninit-37.c: New test.
+
+2020-09-19  Martin Sebor  <msebor@redhat.com>
+
+       PR c/50584
+       * gcc.dg/attr-access-read-write-2.c: Adjust text of expected message.
+       * c-c++-common/Warray-bounds-6.c: Correct C++ declaration, adjust
+       text of expected diagnostics.
+       * gcc.dg/Wbuiltin-declaration-mismatch-9.c: Prune expected warning.
+       * gcc.dg/Warray-parameter-2.c: New test.
+       * gcc.dg/Warray-parameter-3.c: New test.
+       * gcc.dg/Warray-parameter-4.c: New test.
+       * gcc.dg/Warray-parameter-5.c: New test.
+       * gcc.dg/Warray-parameter.c: New test.
+       * gcc.dg/Wvla-parameter-2.c: New test.
+       * gcc.dg/Wvla-parameter-3.c: New test.
+       * gcc.dg/Wvla-parameter.c: New test.
+       * gcc.dg/Wvla-parameter-4.c: New file.
+
+2020-09-19  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * gcc.dg/gomp/block-7.c: Update expected error message wording.
+
+2020-09-19  Harald Anlauf  <anlauf@gmx.de>
+
+       * gfortran.dg/pr97036.f90: New test.
+
+2020-09-19  H.J. Lu  <hjl.tools@gmail.com>
+
+       PR target/96861
+       * gcc.target/i386/pr96861.c: New test.
+
+2020-09-19  Patrick Palka  <ppalka@redhat.com>
+
+       PR c++/96531
+       PR c++/97103
+       * g++.dg/cpp2a/concepts-ttp2.C: New test.
+       * g++.dg/cpp2a/concepts-variadic1.C: New test.
+
+2020-09-19  Patrick Palka  <ppalka@redhat.com>
+
+       PR c++/97051
+       * g++.dg/cpp2a/is-constant-evaluated11.C: New test.
+
+2020-09-19  liuhongt  <hongtao.liu@intel.com>
+
+       * gcc.target/i386/pr95021-3.c: Add -mtune=generic.
+
 2020-09-18  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/97105