1. 13 Sep, 2017 1 commit
  2. 12 Sep, 2017 1 commit
    • c-common.c (field_decl_cmp, [...]): Move to c/c-decl.c. · 6836632e
      	c-family/
      	* c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
      	resort_sorted_fields): Move to c/c-decl.c.
      	* c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
      	(struct sorted_fields_type): Move to c/c-lang.h.
      
      	c/
      	* c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
      	resort_sorted_fields): Moved from c-family/c-common.c.
      	* c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
      
      From-SVN: r252023
      Nathan Sidwell committed
  3. 01 Sep, 2017 2 commits
    • Fix excess precision handling of compound assignments (PR c/82071). · e035be33
      PR c/82071 reports how compound assignment operators such as += handle
      excess precision inconsistently with the same operation done with a
      plain assignment and binary operator.
      
      There were (at least) two problems with how compound assignments
      handled excess precision.  The EXCESS_PRECISION_EXPR for an argument
      with excess precision was removed too early, resulting in
      build_binary_op being called with an rhs operand whose type reflected
      the evaluation format, so not having sufficient information to achieve
      the intended semantics in all cases, and then the code called
      c_fully_fold on the results of build_binary_op without allowing for
      the possibility of an EXCESS_PRECISION_EXPR as the result, so leading
      to double rounding of the result (first to its semantic type, then to
      the type of the LHS of the assignment) instead of the intended single
      rounding.
      
      This patch fixes those problems by keeping EXCESS_PRECISION_EXPRs
      further through build_modify_expr (and build_atomic_assign which it
      calls) and only removing them locally where appropriate.
      
      Note that while this patch should achieve *consistency*, that's
      consistency with the understanding of C99 semantics that I originally
      intended to implement.  For the particular case in the testcase, C11
      semantics (from N1531) differ from that understanding of C99
      semantics, in that an implicit conversion of an integer to floating
      point can have excess precision.  I intend to implement those C11
      semantics separately (conditional on flag_isoc11) (which will also
      mean that building conditional expressions can produce a result with
      excess precision even when the arguments lack excess precision, where
      previously it could not), and not to close the bug until that is also
      done.
      
      Tested for x86_64-pc-linux-gnu.
      
      	PR c/82071
      gcc/c:
      	* c-typeck.c (build_atomic_assign): Handle argument with excess
      	precision.  Ensure any EXCESS_PRECISION_EXPR is present in
      	argument passed to build_binary_op and convert_for_assignment but
      	not for call to c_fully_fold.
      	(build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
      	Ensure build_binary_op is called with argument with original
      	semantic type.  Avoid calling c_fully_fold with an
      	EXCESS_PRECISION_EXPR from build_binary_op.
      
      gcc/testsuite:
      	* gcc.target/i386/excess-precision-7.c: New test.
      
      From-SVN: r251603
      Joseph Myers committed
    • re PR c/81887 (pragma omp ordered simd ignored under -fopenmp-simd) · d2e05fcb
      	PR c/81887
      c-family/
      	* c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
      	(omp_pragmas_simd): ... here.
      	* c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
      	create new clauses list containing just simd clause.
      c/
      	* c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
      cp/
      	* parser.c (cp_parser_omp_ordered): Handle -fopenmp-simd.
      fortran/
      	* parse.c (decode_omp_directive): Use matchs instead of matcho for
      	end ordered and ordered directives, except for ordered depend.  For
      	-fopenmp-simd and ordered depend, reject the stmt.
      	* trans-openmp.c (gfc_trans_omp_ordered): For -fopenmp-simd ignore
      	threads clause and if simd clause isn't present, just translate the
      	body.
      testsuite/
      	* c-c++-common/gomp/pr81887.c: New test.
      	* gfortran.dg/gomp/pr81887.f90: New test.
      
      From-SVN: r251585
      Jakub Jelinek committed
  4. 30 Aug, 2017 1 commit
    • [65/77] Add a SCALAR_TYPE_MODE macro · b397965c
      This patch adds a SCALAR_TYPE_MODE macro, along the same lines as
      SCALAR_INT_TYPE_MODE and SCALAR_FLOAT_TYPE_MODE.  It also adds
      two instances of as_a <scalar_mode> to c_common_type, when converting
      an unsigned fixed-point SCALAR_TYPE_MODE to the equivalent signed mode.
      
      2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* tree.h (SCALAR_TYPE_MODE): New macro.
      	* expr.c (expand_expr_addr_expr_1): Use it.
      	(expand_expr_real_2): Likewise.
      	* fold-const.c (fold_convert_const_fixed_from_fixed): Likeise.
      	(fold_convert_const_fixed_from_int): Likewise.
      	(fold_convert_const_fixed_from_real): Likewise.
      	(native_encode_fixed): Likewise
      	(native_encode_complex): Likewise
      	(native_encode_vector): Likewise.
      	(native_interpret_fixed): Likewise.
      	(native_interpret_real): Likewise.
      	(native_interpret_complex): Likewise.
      	(native_interpret_vector): Likewise.
      	* omp-simd-clone.c (simd_clone_adjust_return_type): Likewise.
      	(simd_clone_adjust_argument_types): Likewise.
      	(simd_clone_init_simd_arrays): Likewise.
      	(simd_clone_adjust): Likewise.
      	* stor-layout.c (layout_type): Likewise.
      	* tree.c (build_minus_one_cst): Likewise.
      	* tree-cfg.c (verify_gimple_assign_ternary): Likewise.
      	* tree-inline.c (estimate_move_cost): Likewise.
      	* tree-ssa-math-opts.c (convert_plusminus_to_widen): Likewise.
      	* tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise.
      	(vectorizable_reduction): Likewise.
      	* tree-vect-patterns.c (vect_recog_widen_mult_pattern): Likewise.
      	(vect_recog_mixed_size_cond_pattern): Likewise.
      	(check_bool_pattern): Likewise.
      	(adjust_bool_pattern): Likewise.
      	(search_type_for_mask_1): Likewise.
      	* tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
      	* tree-vect-stmts.c (vectorizable_conversion): Likewise.
      	(vectorizable_load): Likewise.
      	(vectorizable_store): Likewise.
      	* ubsan.c (ubsan_encode_value): Likewise.
      	* varasm.c (output_constant): Likewise.
      
      gcc/c-family/
      	* c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
      	* c-common.c (c_build_vec_perm_expr): Likewise.
      
      gcc/c/
      	* c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
      	(c_common_type): Likewise.  Use as_a <scalar_mode> when setting
      	m1 and m2 to the signed equivalent of a fixed-point
      	SCALAR_TYPE_MODE.
      
      gcc/cp/
      	* typeck.c (cp_build_binary_op): Use SCALAR_TYPE_MODE.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r251516
      Richard Sandiford committed
  5. 24 Aug, 2017 1 commit
    • C: fix logic within c_expr::get_location · 14e18d71
      In r251239 I added a c_expr::get_location method for use by
      c_parser_expr_list for building the vec<location_t> for
      an expression list, rather than using the location of the first token.
      
      When determining whether to use the location within the tree node,
      or fall back to the range in the c_expr, I used EXPR_CAN_HAVE_LOCATION,
      rather than EXPR_HAS_LOCATION.  This meant that any tree nodes of kinds
      that *can* have a location but which erroneously had
         EXPR_LOCATION (value) == UNKNOWN_LOCATION
      had that value added to the vec<location_t>, leading to missing
      location information when reporting on the issue
      (seen with gcc.dg/Wtraditional-conversion-2.c for m68k).
      
      This patch addresses this in two ways:
      
      (a) it fixes the specific issue in this failing test case, by
          setting up the location properly on the EXCESS_PRECISION_EXPR.
      
      (b) updating c_expr::get_location by only using the EXPR_LOCATION
          if it's sane.  Arguably this is papering over bugs, but they are
          pre-existing ones exposed by r251239, and I'd rather have this
          fix in place than play whack-a-mole on any other such "missing
          location" bugs that are lurking in the codebase.
      
      gcc/c/ChangeLog:
      	* c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
      	than CAN_HAVE_LOCATION_P when determining whether to use the
      	location_t value within "value".
      
      gcc/c-family/ChangeLog:
      	* c-lex.c (interpret_float): Use token location
      	when building an EXCESS_PRECISION_EXPR.
      
      From-SVN: r251335
      David Malcolm committed
  6. 21 Aug, 2017 2 commits
    • C: use full locations within c_parser_expr_list's vec<location_t> · 7f204c0f
      The previous patch uncovered a bug in how c_parser_expr_list builds the
      vec<location_t>: it was only using the location of the first token
      within each assignment-expression in the expr-list.
      
      This shows up in e.g. this -Wformat warning, where only part of the
      2nd param is underlined:
      
         printf("hello %i", (long)0);
                       ~^   ~
                       %li
      
      This patch fixes c_parser_expr_list to use the full range of
      each assignment-expression in the list for the vec<location_t>, so
      that for the above we print:
      
         printf("hello %i", (long)0);
                       ~^   ~~~~~~~
                       %li
      
      gcc/c/ChangeLog:
      	* c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
      	rather than peeking the location of the first token.
      	* c-tree.h (c_expr::get_location): New method.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/format/diagnostic-ranges.c (test_mismatching_types):
      	Update expected result to show all of "(long)0" being underlined.
      	* gcc.dg/plugin/diagnostic-test-string-literals-1.c
      	(test_multitoken_macro): Update expected underlining.
      
      From-SVN: r251239
      David Malcolm committed
    • c-family/c/c++: pass optional vec<location_t> to c-format.c · 2f687306
      This patch passes along the vec<location_t> of argument locations
      at a callsite from the C frontend to check_function_arguments and
      from there to c-format.c, so that we can underline the pertinent
      argument to mismatched format codes even for tree codes like decls
      and constants which lack a location_t for their usage sites.
      
      This takes e.g.:
      
          printf("hello %i %i %i ", foo, bar, baz);
                           ~^
                           %s
      
      to:
      
          printf("hello %i %i %i ", foo, bar, baz);
                           ~^            ~~~
                           %s
      
      which is useful for cases where there's more than one variadic argument.
      
      gcc/c-family/ChangeLog:
      	* c-common.c (check_function_arguments): Add "arglogs" param; pass
      	it to check_function_format.
      	* c-common.h (check_function_arguments): Add vec<location_t> *
      	param.
      	(check_function_format): Likewise.
      	* c-format.c (struct format_check_context): Add field "arglocs".
      	(check_function_format): Add param "arglocs"; pass it to
      	check_format_info.
      	(check_format_info):  Add param "arglocs"; use it to initialize
      	new field of format_ctx.
      	(check_format_arg): Pass format_ctx->arglocs to new param of
      	check_format_info_main.
      	(class argument_parser): New field "arglocs".
      	(argument_parser::argument_parser): Add "arglocs_" param and use
      	it to initialize new field.
      	(argument_parser::check_argument_type): Pass new arglocs field to
      	check_format_types.
      	(check_format_info_main): Add param "arglocs", and use it when
      	constructing arg_parser.
      	(check_format_types): Add param "arglocs"; use it if non-NULL when
      	!EXPR_HAS_LOCATION (cur_param) to get at location information.
      
      gcc/c/ChangeLog:
      	* c-typeck.c (build_function_call_vec): Pass arg_loc to call
      	to check_function_arguments.
      
      gcc/cp/ChangeLog:
      	* call.c (build_over_call): Pass NULL for new parameter to
      	check_function_arguments.
      	* typeck.c (cp_build_function_call_vec): Likewise.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/format/diagnostic-ranges.c: Update expected results
      	to show underlining of all pertinent params.
      	* gcc.dg/format/pr72858.c: Likewise.
      
      From-SVN: r251238
      David Malcolm committed
  7. 18 Aug, 2017 2 commits
    • c-parser.c (c_parser_postfix_expression): Remove unused code. · 3e7b80d7
      	* c-parser.c (c_parser_postfix_expression): Remove unused code.  Update
      	commentary.
      
      From-SVN: r251181
      Marek Polacek committed
    • Add warn_if_not_aligned attribute · 00aa1fa2
      Add warn_if_not_aligned attribute as well as  command line options:
      -Wif-not-aligned and -Wpacked-not-aligned.
      
      __attribute__((warn_if_not_aligned(N))) causes compiler to issue a
      warning if the field in a struct or union is not aligned to N:
      
      typedef unsigned long long __u64
        __attribute__((aligned(4),warn_if_not_aligned(8)));
      
      struct foo
      {
        int i1;
        int i2;
        __u64 x;
      };
      
      __u64 is aligned to 4 bytes.  But inside struct foo, __u64 should be
      aligned at 8 bytes.  It is used to define struct foo in such a way that
      struct foo has the same layout and x has the same alignment when __u64
      is aligned at either 4 or 8 bytes.
      
      Since struct foo is normally aligned to 4 bytes, a warning will be issued:
      
      warning: alignment 4 of 'struct foo' is less than 8
      
      Align struct foo to 8 bytes:
      
      struct foo
      {
        int i1;
        int i2;
        __u64 x;
      } __attribute__((aligned(8)));
      
      silences the warning.  It also warns the field with misaligned offset:
      
      struct foo
      {
        int i1;
        int i2;
        int i3;
        __u64 x;
      } __attribute__((aligned(8)));
      
      warning: 'x' offset 12 in 'struct foo' isn't aligned to 8
      
      This warning is controlled by -Wif-not-aligned and is enabled by default.
      
      When -Wpacked-not-aligned is used, the same warning is also issued for
      the field with explicitly specified alignment in a packed struct or union:
      
      struct __attribute__ ((aligned (8))) S8 { char a[8]; };
      struct __attribute__ ((packed)) S {
        struct S8 s8;
      };
      
      warning: alignment 1 of 'struct S' is less than 8
      
      This warning is disabled by default and enabled by -Wall.
      
      gcc/
      
      	PR c/53037
      	* print-tree.c (print_node): Support DECL_WARN_IF_NOT_ALIGN
      	and TYPE_WARN_IF_NOT_ALIGN.
      	* stor-layout.c (do_type_align): Merge DECL_WARN_IF_NOT_ALIGN.
      	(handle_warn_if_not_align): New.
      	(place_union_field): Call handle_warn_if_not_align.
      	(place_field): Call handle_warn_if_not_align.  Copy
      	TYPE_WARN_IF_NOT_ALIGN.
      	(finish_builtin_struct): Copy TYPE_WARN_IF_NOT_ALIGN.
      	(layout_type): Likewise.
      	* tree-core.h (tree_type_common): Add warn_if_not_align.  Set
      	spare to 18.
      	(tree_decl_common): Add warn_if_not_align.
      	* tree.c (build_range_type_1): Copy TYPE_WARN_IF_NOT_ALIGN.
      	* tree.h (TYPE_WARN_IF_NOT_ALIGN): New.
      	(SET_TYPE_WARN_IF_NOT_ALIGN): Likewise.
      	(DECL_WARN_IF_NOT_ALIGN): Likewise.
      	(SET_DECL_WARN_IF_NOT_ALIGN): Likewise.
      	* doc/extend.texi: Document warn_if_not_aligned attribute.
      	* doc/invoke.texi: Document -Wif-not-aligned and
      	-Wpacked-not-aligned.
      
      gcc/c-family/
      
      	PR c/53037
      	* c-attribs.c (handle_warn_if_not_aligned_attribute): New.
      	(c_common_attribute_table): Add warn_if_not_aligned.
      	(handle_aligned_attribute): Renamed to ...
      	(common_handle_aligned_attribute): Remove argument, name, and add
      	argument, warn_if_not_aligned.  Handle warn_if_not_aligned.
      	(handle_aligned_attribute): New.
      	* c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
      
      gcc/c/
      
      	PR c/53037
      	* c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
      	(check_bitfield_type_and_width): Don't allow bit-field with
      	warn_if_not_aligned type.
      
      gcc/cp/
      
      	PR c/53037
      	* decl.c (duplicate_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
      	* decl2.c (grokbitfield): Don't allow bit-field with
      	warn_if_not_aligned type.
      
      gcc/testsuite/
      
      	PR c/53037
      	* c-c++-common/pr53037-5.c: New test.
      	* g++.dg/pr53037-1.C: Likewise.
      	* g++.dg/pr53037-2.C: Likewise.
      	* g++.dg/pr53037-3.C: Likewise.
      	* g++.dg/pr53037-4.C: Likewise.
      	* gcc.dg/pr53037-1.c: Likewise.
      	* gcc.dg/pr53037-2.c: Likewise.
      	* gcc.dg/pr53037-3.c: Likewise.
      	* gcc.dg/pr53037-4.c: Likewise.
      
      From-SVN: r251180
      H.J. Lu committed
  8. 14 Aug, 2017 1 commit
    • PR c/81117 - Improve buffer overflow checking in strncpy - part 1 · da67acb9
      gcc/ChangeLog:
      
              PR c/81117
      	* tree-diagnostic.c (default_tree_printer): Handle %G.
      	* gimple-pretty-print.h (percent_G_format): Declare new function.
      	* gimple-pretty-print.c (percent_G_format): Define.
      	* tree-pretty-print.c (percent_K_format): Add argument.
      
      gcc/c/ChangeLog:
      
      	PR c/81117
      	* c-objc-common.c (c_objc_common_init): Handle 'G'.
      
      gcc/c-family/ChangeLog:
      
      	PR c/81117
      	* c-format.h (T89_G): New macro.
      	* c-format.c (local_gcall_ptr_node): New variable.
      	(init_dynamic_diag_info): Initialize it.
      
      gcc/cp/ChangeLog:
      
      	PR c/81117
      	* error.c (cp_printer): Handle 'G'.
      
      gcc/testsuite/ChangeLog:
      
      	PR c/81117
      	* gcc.dg/format/gcc_diag-10.c: Exercise %G.
      
      From-SVN: r251098
      Martin Sebor committed
  9. 11 Aug, 2017 1 commit
  10. 10 Aug, 2017 1 commit
    • C/C++: show pertinent open token when missing a close token · 32129a17
      gcc/c/ChangeLog:
      	* c-parser.c (c_parser_error): Rename to...
      	(c_parser_error_richloc): ...this, making static, and adding
      	"richloc" parameter, passing it to the c_parse_error call,
      	rather than calling c_parser_set_source_position_from_token.
      	(c_parser_error): Reintroduce, reimplementing in terms of the
      	above, converting return type from void to bool.
      	(class token_pair): New class.
      	(struct matching_paren_traits): New struct.
      	(matching_parens): New typedef.
      	(struct matching_brace_traits): New struct.
      	(matching_braces): New typedef.
      	(get_matching_symbol): New function.
      	(c_parser_require): Add param MATCHING_LOCATION, using it to
      	highlight matching "opening" tokens for missing "closing" tokens.
      	(c_parser_skip_until_found): Likewise.
      	(c_parser_static_assert_declaration_no_semi): Convert explicit
      	parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
      	class matching_parens, so that the pertinent open parenthesis is
      	highlighted when there are problems locating the close
      	parenthesis.
      	(c_parser_struct_or_union_specifier): Likewise.
      	(c_parser_typeof_specifier): Likewise.
      	(c_parser_alignas_specifier): Likewise.
      	(c_parser_simple_asm_expr): Likewise.
      	(c_parser_braced_init): Likewise, for matching_braces.
      	(c_parser_paren_condition): Likewise, for matching_parens.
      	(c_parser_switch_statement): Likewise.
      	(c_parser_for_statement): Likewise.
      	(c_parser_asm_statement): Likewise.
      	(c_parser_asm_operands): Likewise.
      	(c_parser_cast_expression): Likewise.
      	(c_parser_sizeof_expression): Likewise.
      	(c_parser_alignof_expression): Likewise.
      	(c_parser_generic_selection): Likewise.
      	(c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
      	RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
      	RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
      	In case CPP_OPEN_PAREN, pass loc_open_paren to the
      	c_parser_skip_until_found call.
      	(c_parser_objc_class_definition): Use class matching_parens as
      	above.
      	(c_parser_objc_method_decl): Likewise.
      	(c_parser_objc_try_catch_finally_statement): Likewise.
      	(c_parser_objc_synchronized_statement): Likewise.
      	(c_parser_objc_at_property_declaration): Likewise.
      	(c_parser_oacc_wait_list): Likewise.
      	(c_parser_omp_var_list_parens): Likewise.
      	(c_parser_omp_clause_collapse): Likewise.
      	(c_parser_omp_clause_default): Likewise.
      	(c_parser_omp_clause_if): Likewise.
      	(c_parser_omp_clause_num_threads): Likewise.
      	(c_parser_omp_clause_num_tasks): Likewise.
      	(c_parser_omp_clause_grainsize): Likewise.
      	(c_parser_omp_clause_priority): Likewise.
      	(c_parser_omp_clause_hint): Likewise.
      	(c_parser_omp_clause_defaultmap): Likewise.
      	(c_parser_oacc_single_int_clause): Likewise.
      	(c_parser_omp_clause_ordered): Likewise.
      	(c_parser_omp_clause_reduction): Likewise.
      	(c_parser_omp_clause_schedule): Likewise.
      	(c_parser_omp_clause_num_teams): Likewise.
      	(c_parser_omp_clause_thread_limit): Likewise.
      	(c_parser_omp_clause_aligned): Likewise.
      	(c_parser_omp_clause_linear): Likewise.
      	(c_parser_omp_clause_safelen): Likewise.
      	(c_parser_omp_clause_simdlen): Likewise.
      	(c_parser_omp_clause_depend): Likewise.
      	(c_parser_omp_clause_map): Likewise.
      	(c_parser_omp_clause_device): Likewise.
      	(c_parser_omp_clause_dist_schedule): Likewise.
      	(c_parser_omp_clause_proc_bind): Likewise.
      	(c_parser_omp_clause_uniform): Likewise.
      	(c_parser_omp_for_loop): Likewise.
      	(c_parser_cilk_clause_vectorlength): Likewise.
      	(c_parser_cilk_clause_linear): Likewise.
      	(c_parser_transaction_expression): Likewise.
      	* c-parser.h (c_parser_require): Add param matching_location with
      	default UNKNOWN_LOCATION.
      	(c_parser_error): Convert return type from void to bool.
      	(c_parser_skip_until_found): Add param matching_location with
      	default UNKNOWN_LOCATION.
      
      gcc/c-family/ChangeLog:
      	* c-common.c (c_parse_error): Add rich_location * param, using it
      	rather implicitly using input_location.
      	* c-common.h (c_parse_error): Add rich_location * param.
      
      gcc/cp/ChangeLog:
      	* parser.c (cp_parser_error): Update for new param to
      	c_parse_error.
      	(class token_pair): New class.
      	(struct matching_paren_traits): New struct.
      	(matching_parens): New typedef.
      	(struct matching_brace_traits): New struct.
      	(matching_braces): New typedef.
      	(cp_parser_statement_expr): Convert explicit parsing of
      	CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
      	class matching_parens, so that the pertinent open parenthesis is
      	highlighted when there are problems locating the close
      	parenthesis.
      	(cp_parser_primary_expression): Likewise.
      	(cp_parser_compound_literal_p): Remove consumption of opening
      	paren.
      	(cp_parser_postfix_expression): Convert explicit parsing of
      	CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use matching parens, as
      	above.  Use it to consume the opening paren previously consumed by
      	cp_parser_compound_literal_p.
      	(cp_parser_parenthesized_expression_list): Likewise.
      	(cp_parser_unary_expression): Likewise.
      	(cp_parser_new_expression): Likewise.
      	(cp_parser_cast_expression): Likewise.
      	(cp_parser_builtin_offsetof): Likewise.
      	(cp_parser_trait_expr): Likewise.
      	(cp_parser_lambda_declarator_opt): Likewise.
      	(cp_parser_lambda_body): Likewise, for matching_braces.
      	(cp_parser_compound_statement): Likewise.
      	(cp_parser_selection_statement): Likewise, for matching_parens.
      	(cp_parser_iteration_statement): Likewise.
      	(cp_parser_already_scoped_statement): Likewise, for
      	matching_braces.
      	(cp_parser_linkage_specification): Likewise.
      	(cp_parser_static_assert): Likewise, for matching_parens.
      	(cp_parser_decltype): Likewise.
      	(cp_parser_operator): Likewise.
      	(cp_parser_enum_specifier): Likewise.
      	(cp_parser_namespace_definition): Likewise.
      	(cp_parser_direct_declarator): Likewise.
      	(cp_parser_braced_list): Likewise.
      	(cp_parser_class_specifier_1): Likewise, for matching_braces.
      	(cp_parser_constant_initializer): Likewise.
      	(cp_parser_noexcept_specification_opt): Likewise, for
      	matching_parens.
      	(cp_parser_exception_specification_opt): Likewise.
      	(cp_parser_handler): Likewise.
      	(cp_parser_asm_specification_opt): Likewise.
      	(cp_parser_asm_operand_list): Likewise.
      	(cp_parser_gnu_attributes_opt): Likewise.
      	(cp_parser_std_attribute_spec): Likewise.
      	(cp_parser_requirement_parameter_list): Likewise.
      	(cp_parser_requirement_body): Likewise, for matching_braces.
      	(cp_parser_compound_requirement): Likewise.
      	(cp_parser_template_introduction): Likewise.
      	(cp_parser_sizeof_pack): Likewise, for matching_parens.
      	(cp_parser_sizeof_operand): Likewise; use it to consume the
      	opening paren previously consumed by cp_parser_compound_literal_p.
      	(get_matching_symbol): New function.
      	(cp_parser_required_error): Add param "matching_location".  Remove
      	calls to cp_parser_error, instead setting a non-NULL gmsgid, and
      	handling it if set by calling c_parse_error, potentially with a
      	secondary location if matching_location was set.
      	(cp_parser_require): Add param "matching_location", with a default
      	value of UNKNOWN_LOCATION.
      	(cp_parser_require_keyword): Update for new param of
      	cp_parser_required_error.
      	(cp_parser_objc_encode_expression): Update to class matching_parens
      	as above.
      	(cp_parser_objc_defs_expression): Likewise.
      	(cp_parser_objc_protocol_expression): Likewise.
      	(cp_parser_objc_selector_expression): Likewise.
      	(cp_parser_objc_typename): Likewise.
      	(cp_parser_objc_superclass_or_category): Likewise.
      	(cp_parser_objc_try_catch_finally_statement): Likewise.
      	(cp_parser_objc_synchronized_statement): Likewise.
      	(cp_parser_objc_at_property_declaration): Likewise.
      	(cp_parser_oacc_single_int_clause): Likewise.
      	(cp_parser_oacc_shape_clause): Likewise.
      	(cp_parser_omp_clause_collapse): Likewise.
      	(cp_parser_omp_clause_default): Likewise.
      	(cp_parser_omp_clause_final): Likewise.
      	(cp_parser_omp_clause_if): Likewise.
      	(cp_parser_omp_clause_num_threads): Likewise.
      	(cp_parser_omp_clause_num_tasks): Likewise.
      	(cp_parser_omp_clause_grainsize): Likewise.
      	(cp_parser_omp_clause_priority): Likewise.
      	(cp_parser_omp_clause_hint): Likewise.
      	(cp_parser_omp_clause_defaultmap): Likewise.
      	(cp_parser_omp_clause_ordered): Likewise.
      	(cp_parser_omp_clause_schedule): Likewise.
      	(cp_parser_omp_clause_num_teams): Likewise.
      	(cp_parser_omp_clause_thread_limit): Likewise.
      	(cp_parser_omp_clause_aligned): Likewise.
      	(cp_parser_omp_clause_linear): Likewise.
      	(cp_parser_omp_clause_safelen): Likewise.
      	(cp_parser_omp_clause_simdlen): Likewise.
      	(cp_parser_omp_clause_depend): Likewise.
      	(cp_parser_omp_clause_device): Likewise.
      	(cp_parser_omp_clause_dist_schedule): Likewise.
      	(cp_parser_oacc_clause_async): Likewise.
      	(cp_parser_omp_critical): Likewise.
      	(cp_parser_omp_for_loop): Likewise.
      	(cp_parser_omp_sections_scope): Likewise.
      	(cp_parser_omp_declare_reduction_exprs): Likewise.
      	Update for new param to cp_parser_required_error.
      	(cp_parser_oacc_routine): Likewise.
      	(cp_parser_transaction_expression): Likewise.
      	(cp_parser_cilk_simd_vectorlength): Likewise.
      
      gcc/testsuite/ChangeLog:
      	* c-c++-common/missing-close-symbol.c: New test case.
      	* c-c++-common/missing-symbol.c: New test case.
      	* gcc.dg/unclosed-init.c: New test case.
      	* g++.dg/diagnostic/unclosed-extern-c.C: New test case.
      	* g++.dg/diagnostic/unclosed-function.C: New test case.
      	* g++.dg/diagnostic/unclosed-namespace.C: New test case.
      	* g++.dg/diagnostic/unclosed-struct.C: New test case.
      	* g++.dg/parse/pragma2.C: Update to reflect movement of the
      	"expected identifier" error.
      
      From-SVN: r251026
      David Malcolm committed
  11. 09 Aug, 2017 3 commits
    • Boolify some parameters. · 30af3a2b
      From-SVN: r250986
      Marek Polacek committed
    • re PR c/81233 (--Wdiscarded-qualifiers and Wincompatible-pointer-types missing important detail) · 296c53ac
      	PR c/81233
      	* c-typeck.c (pedwarn_init): Make the function take a variable list.
      	Call emit_diagnostic_valist instead of pedwarn.
      	(convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
      	Print the relevant types in diagnostics.
      
      	* diagnostic-core.h (emit_diagnostic_valist): Add declaration.
      	* diagnostic.c (emit_diagnostic): Add a comment.
      	(emit_diagnostic_valist): New function.
      
      	* gcc.dg/diagnostic-types-1.c: New test.
      	* gcc.dg/assign-warn-1.c: Update warning messages.
      	* gcc.dg/assign-warn-2.c: Likewise.
      	* gcc.dg/c90-const-expr-5.c: Likewise.
      	* gcc.dg/c99-const-expr-5.c: Likewise.
      	* gcc.dg/conv-2.c: Likewise.
      	* gcc.dg/init-bad-7.c: Likewise.
      	* gcc.dg/overflow-warn-1.c: Likewise.
      	* gcc.dg/overflow-warn-2.c: Likewise.
      	* gcc.dg/overflow-warn-3.c: Likewise.
      	* gcc.dg/overflow-warn-4.c: Likewise.
      	* gcc.dg/pointer-array-atomic.c: Likewise.
      	* gcc.dg/pr26865.c: Likewise.
      	* gcc.dg/pr61162-2.c: Likewise.
      	* gcc.dg/pr61162.c: Likewise.
      	* gcc.dg/pr67730-2.c: Likewise.
      	* gcc.dg/pr69156.c: Likewise.
      	* gcc.dg/pr70174.c: Likewise.
      	* objc.dg/proto-lossage-4.m: Likewise.
      
      From-SVN: r250985
      Marek Polacek committed
    • re PR c/81417 (-Wsign-compare should print types being compared) · a32c8316
      	PR c/81417
      	* c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
      	build_conditional_expr.	
      	* c-parser.c (c_parser_conditional_expression): Create locations for
      	EXP1 and EXP2 from their source ranges.  Pass the locations down to
      	build_conditional_expr.
      	* c-tree.h (build_conditional_expr): Update declaration.
      	* c-typeck.c (build_conditional_expr): Add location_t parameters.
      	For -Wsign-compare, also print the types.
      
      	* input.c (make_location): New overload.
      	* input.h (make_location): Declare.
      
      	* objc-next-runtime-abi-02.c (build_v2_build_objc_method_call): Update
      	a call to build_conditional_expr.
      
      	* Wsign-compare-1.c: New test.
      	* gcc.dg/compare1.c: Adjust dg-bogus.
      	* gcc.dg/compare2.c: Likewise.
      	* gcc.dg/compare3.c: Likewise.
      	* gcc.dg/compare7.c: Likewise.
      	* gcc.dg/compare8.c: Likewise.
      	* gcc.dg/compare9.c: Likewise.
      	* gcc.dg/pr11492.c: Likewise.
      
      From-SVN: r250984
      Marek Polacek committed
  12. 08 Aug, 2017 1 commit
    • trans.c: Include header files. · 314e6352
      .
      2017-08-08  Martin Liska  <mliska@suse.cz>
      
      	* gcc-interface/trans.c: Include header files.
      2017-08-08  Martin Liska  <mliska@suse.cz>
      
      	* objc-gnu-runtime-abi-01.c: Include header files.
      	* objc-next-runtime-abi-01.c: Likewise.
      	* objc-next-runtime-abi-02.c: Likewise.
      2017-08-08  Martin Liska  <mliska@suse.cz>
      
      	* asan.c: Include header files.
      	* attribs.c (build_decl_attribute_variant): New function moved
      	from tree.[ch].
      	(build_type_attribute_qual_variant): Likewise.
      	(cmp_attrib_identifiers): Likewise.
      	(simple_cst_list_equal): Likewise.
      	(omp_declare_simd_clauses_equal): Likewise.
      	(attribute_value_equal): Likewise.
      	(comp_type_attributes): Likewise.
      	(build_type_attribute_variant): Likewise.
      	(lookup_ident_attribute): Likewise.
      	(remove_attribute): Likewise.
      	(merge_attributes): Likewise.
      	(merge_type_attributes): Likewise.
      	(merge_decl_attributes): Likewise.
      	(merge_dllimport_decl_attributes): Likewise.
      	(handle_dll_attribute): Likewise.
      	(attribute_list_equal): Likewise.
      	(attribute_list_contained): Likewise.
      	* attribs.h (lookup_attribute): New function moved from tree.[ch].
      	(lookup_attribute_by_prefix): Likewise.
      	* bb-reorder.c: Include header files.
      	* builtins.c: Likewise.
      	* calls.c: Likewise.
      	* cfgexpand.c: Likewise.
      	* cgraph.c: Likewise.
      	* cgraphunit.c: Likewise.
      	* convert.c: Likewise.
      	* dwarf2out.c: Likewise.
      	* final.c: Likewise.
      	* fold-const.c: Likewise.
      	* function.c: Likewise.
      	* gimple-expr.c: Likewise.
      	* gimple-fold.c: Likewise.
      	* gimple-pretty-print.c: Likewise.
      	* gimple.c: Likewise.
      	* gimplify.c: Likewise.
      	* hsa-common.c: Likewise.
      	* hsa-gen.c: Likewise.
      	* internal-fn.c: Likewise.
      	* ipa-chkp.c: Likewise.
      	* ipa-cp.c: Likewise.
      	* ipa-devirt.c: Likewise.
      	* ipa-fnsummary.c: Likewise.
      	* ipa-inline.c: Likewise.
      	* ipa-visibility.c: Likewise.
      	* ipa.c: Likewise.
      	* lto-cgraph.c: Likewise.
      	* omp-expand.c: Likewise.
      	* omp-general.c: Likewise.
      	* omp-low.c: Likewise.
      	* omp-offload.c: Likewise.
      	* omp-simd-clone.c: Likewise.
      	* opts-global.c: Likewise.
      	* passes.c: Likewise.
      	* predict.c: Likewise.
      	* sancov.c: Likewise.
      	* sanopt.c: Likewise.
      	* symtab.c: Likewise.
      	* toplev.c: Likewise.
      	* trans-mem.c: Likewise.
      	* tree-chkp.c: Likewise.
      	* tree-eh.c: Likewise.
      	* tree-into-ssa.c: Likewise.
      	* tree-object-size.c: Likewise.
      	* tree-parloops.c: Likewise.
      	* tree-profile.c: Likewise.
      	* tree-ssa-ccp.c: Likewise.
      	* tree-ssa-live.c: Likewise.
      	* tree-ssa-loop.c: Likewise.
      	* tree-ssa-sccvn.c: Likewise.
      	* tree-ssa-structalias.c: Likewise.
      	* tree-ssa.c: Likewise.
      	* tree-streamer-in.c: Likewise.
      	* tree-vectorizer.c: Likewise.
      	* tree-vrp.c: Likewise.
      	* tsan.c: Likewise.
      	* ubsan.c: Likewise.
      	* varasm.c: Likewise.
      	* varpool.c: Likewise.
      	* tree.c: Remove functions moved to attribs.[ch].
      	* tree.h: Likewise.
      	* config/aarch64/aarch64.c: Add attrs.h header file.
      	* config/alpha/alpha.c: Likewise.
      	* config/arc/arc.c: Likewise.
      	* config/arm/arm.c: Likewise.
      	* config/avr/avr.c: Likewise.
      	* config/bfin/bfin.c: Likewise.
      	* config/c6x/c6x.c: Likewise.
      	* config/cr16/cr16.c: Likewise.
      	* config/cris/cris.c: Likewise.
      	* config/darwin.c: Likewise.
      	* config/epiphany/epiphany.c: Likewise.
      	* config/fr30/fr30.c: Likewise.
      	* config/frv/frv.c: Likewise.
      	* config/ft32/ft32.c: Likewise.
      	* config/h8300/h8300.c: Likewise.
      	* config/i386/winnt.c: Likewise.
      	* config/ia64/ia64.c: Likewise.
      	* config/iq2000/iq2000.c: Likewise.
      	* config/lm32/lm32.c: Likewise.
      	* config/m32c/m32c.c: Likewise.
      	* config/m32r/m32r.c: Likewise.
      	* config/m68k/m68k.c: Likewise.
      	* config/mcore/mcore.c: Likewise.
      	* config/microblaze/microblaze.c: Likewise.
      	* config/mips/mips.c: Likewise.
      	* config/mmix/mmix.c: Likewise.
      	* config/mn10300/mn10300.c: Likewise.
      	* config/moxie/moxie.c: Likewise.
      	* config/msp430/msp430.c: Likewise.
      	* config/nds32/nds32-isr.c: Likewise.
      	* config/nds32/nds32.c: Likewise.
      	* config/nios2/nios2.c: Likewise.
      	* config/nvptx/nvptx.c: Likewise.
      	* config/pa/pa.c: Likewise.
      	* config/pdp11/pdp11.c: Likewise.
      	* config/powerpcspe/powerpcspe.c: Likewise.
      	* config/riscv/riscv.c: Likewise.
      	* config/rl78/rl78.c: Likewise.
      	* config/rx/rx.c: Likewise.
      	* config/s390/s390.c: Likewise.
      	* config/sh/sh.c: Likewise.
      	* config/sol2.c: Likewise.
      	* config/sparc/sparc.c: Likewise.
      	* config/spu/spu.c: Likewise.
      	* config/stormy16/stormy16.c: Likewise.
      	* config/tilegx/tilegx.c: Likewise.
      	* config/tilepro/tilepro.c: Likewise.
      	* config/v850/v850.c: Likewise.
      	* config/vax/vax.c: Likewise.
      	* config/visium/visium.c: Likewise.
      	* config/xtensa/xtensa.c: Likewise.
      2017-08-08  Martin Liska  <mliska@suse.cz>
      
      	* call.c: Include header files.
      	* cp-gimplify.c: Likewise.
      	* cp-ubsan.c: Likewise.
      	* cvt.c: Likewise.
      	* init.c: Likewise.
      	* search.c: Likewise.
      	* semantics.c: Likewise.
      	* typeck.c: Likewise.
      2017-08-08  Martin Liska  <mliska@suse.cz>
      
      	* lto-lang.c: Include header files.
      	* lto-symtab.c: Likewise.
      2017-08-08  Martin Liska  <mliska@suse.cz>
      
      	* c-convert.c: Include header files.
      	* c-typeck.c: Likewise.
      2017-08-08  Martin Liska  <mliska@suse.cz>
      
      	* c-ada-spec.c: Include header files.
      	* c-ubsan.c: Likewise.
      	* c-warn.c: Likewise.
      2017-08-08  Martin Liska  <mliska@suse.cz>
      
      	* trans-types.c: Include header files.
      
      From-SVN: r250946
      Martin Liska committed
  13. 07 Aug, 2017 1 commit
    • Canonicalize names of attributes. · 577eec56
      2017-08-07  Martin Liska  <mliska@suse.cz>
      
      	* attribs.h (canonicalize_attr_name): New function.
      	(cmp_attribs): Move from c-format.c and adjusted.
      	(is_attribute_p): Moved from tree.h.
      	* tree-inline.c: Add new includes.
      	* tree.c (cmp_attrib_identifiers): Use cmp_attribs.
      	(private_is_attribute_p): Remove.
      	(private_lookup_attribute): Likewise.
      	(private_lookup_attribute_by_prefix): Simplify.
      	(remove_attribute): Use is_attribute_p.
      	* tree.h: Remove removed declarations.
      2017-08-07  Martin Liska  <mliska@suse.cz>
      
      	* array-notation-common.c: Add new includes.
      	* c-format.c( handle_format_attribute): Canonicalize a format
      	function name.
      	* c-lex.c (c_common_has_attribute): Canonicalize name of an
      	attribute.
      	* c-pretty-print.c: Add new include.
      2017-08-07  Martin Liska  <mliska@suse.cz>
      
      	* parser.c (cp_parser_gnu_attribute_list): Canonicalize name of an
      	attribute.
      	(cp_parser_std_attribute): Likewise.
      	* tree.c: Add new include.
      2017-08-07  Martin Liska  <mliska@suse.cz>
      
      	* c-parser.c (c_parser_attributes): Canonicalize name of an
      	attribute.
      2017-08-07  Martin Liska  <mliska@suse.cz>
      
      	* go-gcc.cc (Gcc_backend::function): Look up for no_split_stack
      	and not __no_split_stack__.
      2017-08-07  Martin Liska  <mliska@suse.cz>
      
      	* g++.dg/cpp0x/pr65558.C: Update scanned pattern.
      	* gcc.dg/parm-impl-decl-1.c: Likewise.
      	* gcc.dg/parm-impl-decl-3.c: Likewise.
      	* gcc.dg/Wattributes-5.c: New test.
      
      From-SVN: r250911
      Martin Liska committed
  14. 02 Aug, 2017 2 commits
  15. 31 Jul, 2017 2 commits
    • Recover GOTO predictor. · 7fef86d3
      2017-07-31  Jan Hubicka <hubicka@ucw.cz>
      	    Martin Liska  <mliska@suse.cz>
      
      	* c-typeck.c (c_finish_goto_label): Build gimple predict
      	stament.
      2017-07-31  Jan Hubicka <hubicka@ucw.cz>
      	    Martin Liska  <mliska@suse.cz>
      
      	* predict.def: Remove old comment and adjust probability.
      	* gimplify.c (should_warn_for_implicit_fallthrough): Ignore
      	PREDICT statements.
      2017-07-31  Jan Hubicka <hubicka@ucw.cz>
      	    Martin Liska  <mliska@suse.cz>
      
      	* gcc.dg/predict-15.c: New test.
      	* gcc.dg/tree-ssa/vrp24.c: Update scanned pattern.
      2017-07-31  Jan Hubicka <hubicka@ucw.cz>
      	    Martin Liska  <mliska@suse.cz>
      
      	* pt.c (tsubst_copy): Copy PREDICT_EXPR.
      	* semantics.c (finish_goto_stmt): Build gimple predict
      	stament.
      	* constexpr.c (potential_constant_expression_1): Handle
      	PREDICT_EXPR.
      
      Co-Authored-By: Martin Liska <mliska@suse.cz>
      
      From-SVN: r250737
      Jan Hubicka committed
    • Do UBSAN sanitization just when current_function_decl != NULL_TREE (PR sanitize/81530). · f34ebeb2
      2017-07-31  Martin Liska  <mliska@suse.cz>
      
      	PR sanitize/81530
      	* cp-gimplify.c (cp_genericize): Guard condition with flag_sanitize_p
      	also with current_function_decl non-null equality.
      	* cp-ubsan.c (cp_ubsan_instrument_vptr_p): Likewise.
      	* decl.c (compute_array_index_type): Likewise.
      	* init.c (finish_length_check): Likewise.
      	* typeck.c (cp_build_binary_op): Likewise.
      2017-07-31  Martin Liska  <mliska@suse.cz>
      
      	PR sanitize/81530
      	* c-convert.c (convert): Guard condition with flag_sanitize_p
      	also with current_function_decl non-null equality.
      	* c-decl.c (grokdeclarator): Likewise.
      	* c-typeck.c (build_binary_op): Likewise.
      2017-07-31  Martin Liska  <mliska@suse.cz>
      
      	PR sanitize/81530
      	* convert.c (convert_to_integer_1): Guard condition with flag_sanitize_p
      	also with current_function_decl non-null equality.
      2017-07-31  Martin Liska  <mliska@suse.cz>
      
      	PR sanitize/81530
      	* c-ubsan.c (ubsan_maybe_instrument_array_ref):
      	Guard condition with flag_sanitize_p also with current_function_decl
      	non-null equality.
      	(ubsan_maybe_instrument_reference_or_call): Likewise.
      2017-07-31  Martin Liska  <mliska@suse.cz>
      
      	PR sanitize/81530
      	* g++.dg/ubsan/pr81530.C: New test.
      
      From-SVN: r250730
      Martin Liska committed
  16. 25 Jul, 2017 2 commits
  17. 18 Jul, 2017 1 commit
  18. 14 Jul, 2017 1 commit
    • c/c++: Add fix-it hints for suggested missing #includes · eea77d1f
      gcc/c-family/ChangeLog:
      	* c-common.c (try_to_locate_new_include_insertion_point): New
      	function.
      	(per_file_includes_t): New typedef.
      	(added_includes_t): New typedef.
      	(added_includes): New variable.
      	(maybe_add_include_fixit): New function.
      	* c-common.h (maybe_add_include_fixit): New decl.
      
      gcc/c/ChangeLog:
      	* c-decl.c (implicitly_declare): When suggesting a missing
      	#include, provide a fix-it hint.
      
      gcc/cp/ChangeLog:
      	* name-lookup.c (get_std_name_hint): Add '<' and '>' around
      	the header names.
      	(maybe_suggest_missing_header): Update for addition of '<' and '>'
      	to above.  Provide a fix-it hint.
      	* pt.c: Include "gcc-rich-location.h"
      	(listify): Attempt to add fix-it hint for missing
      	#include <initializer_list>.
      	* rtti.c: Include "gcc-rich-location.h".
      	(typeid_ok_p): Attempt to add fix-it hint for missing
      	#include <typeinfo>.
      
      gcc/testsuite/ChangeLog:
      	* g++.dg/cpp0x/missing-initializer_list-include.C: New test case.
      	* g++.dg/lookup/missing-std-include-2.C: New test case.
      	* g++.dg/lookup/missing-std-include-3.C: New test case.
      	* g++.dg/rtti/missing-typeinfo-include.C: New test case.
      	* gcc.dg/missing-header-fixit-1.c: New test case.
      	* gcc.dg/missing-header-fixit-2.c: New test case.
      	* gcc.dg/missing-header-fixit-2.h: New header.
      
      From-SVN: r250203
      David Malcolm committed
  19. 06 Jul, 2017 1 commit
    • Support C++-specific selftests · b6f43128
      gcc/ChangeLog:
      	* Makefile.in (SELFTEST_FLAGS): Drop "-x c", moving it to...
      	(C_SELFTEST_FLAGS): New.
      	(CPP_SELFTEST_FLAGS): New.
      	(SELFTEST_DEPS): New, from deps of s-selftest.
      	(C_SELFTEST_DEPS): New, from deps of s-selftest.
      	(CPP_SELFTEST_DEPS): New.
      	(selftest): Add dependency on s-selftest-c++.
      	(s-selftest): Rename to...
      	(s-selftest-c): ...this, moving deps to SELFTEST_DEPS
      	and C_SELFTEST_DEPS, and using C_SELFTEST_FLAGS rather
      	than SELFTEST_FLAGS.
      	(selftest-gdb): Rename to...
      	(selftest-c-gdb): ...this, using C_SELFTEST_DEPS and
      	C_SELFTEST_FLAGS.
      	(selftest-gdb): Reintroduce as an alias for selftest-c-gdb.
      	(selftest-valgrind): Rename to...
      	(selftest-c-valgrind): ...this, using C_SELFTEST_DEPS and
      	C_SELFTEST_FLAGS.
      	(selftest-valgrind): Reintroduce as an alias for
      	selftest-c-valgrind.
      	(s-selftest-c++): New.
      	(selftest-c++-gdb): New.
      	(selftest-c++-valgrind): New.
      
      gcc/c-family/ChangeLog:
      	* c-common.c (selftest::c_family_tests): New.
      	* c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
      	(selftest::c_family_tests): New decl.
      
      gcc/c/ChangeLog:
      	* c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
      	and call that instead.
      	* c-tree.h (selftest::run_c_tests): New decl.
      
      gcc/cp/ChangeLog:
      	* cp-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): Define as
      	selftest::run_cp_tests.
      	(selftest::run_cp_tests): New function.
      	* cp-tree.h (selftest::run_cp_tests): New decl.
      
      From-SVN: r250030
      David Malcolm committed
  20. 26 Jun, 2017 1 commit
    • re PR c/80116 (Warn about macros expanding to multiple statements) · 3e2becc4
      	PR c/80116
      	* c-common.h (warn_for_multistatement_macros): Declare.
      	* c-warn.c: Include "c-family/c-indentation.h".
      	(warn_for_multistatement_macros): New function.
      	* c.opt (Wmultistatement-macros): New option.
      	* c-indentation.c (guard_tinfo_to_string): No longer static.
      	Change the parameter type to "enum rid".  Handle RID_SWITCH.
      	* c-indentation.h (guard_tinfo_to_string): Declare.
      
      	* c-parser.c (c_parser_if_body): Set the location of the
      	body of the conditional after parsing all the labels.  Call
      	warn_for_multistatement_macros.
      	(c_parser_else_body): Likewise.
      	(c_parser_switch_statement): Likewise.
      	(c_parser_while_statement): Likewise.
      	(c_parser_for_statement): Likewise.
      	(c_parser_statement): Add a default argument.  Save the location
      	after labels have been parsed.
      	(c_parser_c99_block_statement): Likewise.
      
      	* parser.c (cp_parser_statement): Add a default argument.  Save the
      	location of the expression-statement after labels have been parsed.
      	(cp_parser_implicitly_scoped_statement): Set the location of the
      	body of the conditional after parsing all the labels.  Call
      	warn_for_multistatement_macros.
      	(cp_parser_already_scoped_statement): Likewise.
      
      	* doc/invoke.texi: Document -Wmultistatement-macros.
      
      	* c-c++-common/Wmultistatement-macros-1.c: New test.
      	* c-c++-common/Wmultistatement-macros-2.c: New test.
      	* c-c++-common/Wmultistatement-macros-3.c: New test.
      	* c-c++-common/Wmultistatement-macros-4.c: New test.
      	* c-c++-common/Wmultistatement-macros-5.c: New test.
      	* c-c++-common/Wmultistatement-macros-6.c: New test.
      	* c-c++-common/Wmultistatement-macros-7.c: New test.
      	* c-c++-common/Wmultistatement-macros-8.c: New test.
      	* c-c++-common/Wmultistatement-macros-9.c: New test.
      	* c-c++-common/Wmultistatement-macros-10.c: New test.
      	* c-c++-common/Wmultistatement-macros-11.c: New test.
      
      From-SVN: r249643
      Marek Polacek committed
  21. 19 Jun, 2017 1 commit
    • re PR bootstrap/80887 (gnat bootstrap fails at s-regpat.o: raised STORAGE_ERROR… · 343ae898
      re PR bootstrap/80887 (gnat bootstrap fails at s-regpat.o: raised STORAGE_ERROR : stack overflow or erroneous memory access)
      
      2017-06-19  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/80887
              c/
      	* gimple-parser.c (c_parser_gimple_postfix_expression): Handle
      	negated _Literals to parse _Literal (int) -1.
      
      	* tree-ssa-sccvn.c (mprts_hook_cnt): New global.
      	(vn_lookup_simplify_result): Allow only mprts_hook_cnt succesful
      	simplified lookups, then reset mprts_hook.
      	(vn_nary_build_or_lookup_1): Set mprts_hook_cnt to 9 before
      	simplifying.
      	(try_to_simplify): Likewise.
      
      	* gcc.dg/tree-ssa/pr80887.c: New testcase.
      
      From-SVN: r249373
      Richard Biener committed
  22. 13 Jun, 2017 1 commit
    • Implement no_sanitize function attribute · 45b2222a
      2017-06-13  Martin Liska  <mliska@suse.cz>
      
      	PR sanitize/78204
      	* c-c++-common/ubsan/attrib-2.c (float_cast2): Enhance the
      	test by adding no_sanitize attribute.
      	* gcc.dg/asan/use-after-scope-4.c: Likewise.
      2017-06-13  Martin Liska  <mliska@suse.cz>
      
      	PR sanitize/78204
      	* c-attribs.c (add_no_sanitize_value): New function.
      	(handle_no_sanitize_attribute): Likewise.
      	(handle_no_sanitize_address_attribute): Use the function.
      	(handle_no_sanitize_thread_attribute): New function.
      	(handle_no_address_safety_analysis_attribute): Use
      	add_no_sanitize_value.
      	(handle_no_sanitize_undefined_attribute): Likewise.
      	* c-common.h: Declare new functions.
      	* c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
      	(ubsan_instrument_shift): Likewise.
      	(ubsan_instrument_bounds): Likewise.
      	(ubsan_maybe_instrument_array_ref): Likewise.
      	(ubsan_maybe_instrument_reference_or_call): Likewise.
      2017-06-13  Martin Liska  <mliska@suse.cz>
      
      	PR sanitize/78204
      	* asan.c (asan_sanitize_stack_p): Use sanitize_flags_p.
      	(gate_asan): Likewise.
      	* asan.h (asan_no_sanitize_address_p): Remove the function.
      	(sanitize_flags_p): New function.
      	* builtins.def: Fix coding style.
      	* common.opt: Use renamed enum value.
      	* convert.c (convert_to_integer_1): Use sanitize_flags_p.
      	* doc/extend.texi: Document no_sanitize attribute.
      	* flag-types.h (enum sanitize_code): Rename SANITIZE_NONDEFAULT
      	to SANITIZE_UNDEFINED_NONDEFAULT.
      	* gcc.c (sanitize_spec_function): Use the renamed enum value.
      	* gimple-fold.c (optimize_atomic_compare_exchange_p):
      	Use sanitize_flags_p.
      	* gimplify.c (gimplify_function_tree): Likewise.
      	* ipa-inline.c (sanitize_attrs_match_for_inline_p): Likewise.
      	* opts.c (parse_no_sanitize_attribute): New function.
      	(common_handle_option): Use renamed enum value.
      	* opts.h (parse_no_sanitize_attribute): Declare.
      	* tree.c (sanitize_flags_p): New function.
      	* tree.h: Declared here.
      	* tsan.c: Use sanitize_flags_p.
      	* ubsan.c (ubsan_expand_null_ifn): Likewise.
      	(instrument_mem_ref): Likewise.
      	(instrument_bool_enum_load): Likewise.
      	(do_ubsan_in_current_function): Remove the function.
      	(pass_ubsan::execute): Use sanitize_flags_p.
      	* ubsan.h: Remove do_ubsan_in_current_function
      	* tree-cfg.c (print_no_sanitize_attr_value): New function.
      	(dump_function_to_file): Use it here.
      2017-06-13  Martin Liska  <mliska@suse.cz>
      
      	PR sanitize/78204
      	* class.c (build_base_path): Use sanitize_flags_p.
      	* cp-gimplify.c (cp_genericize_r): Likewise.
      	(cp_genericize_tree): Likewise.
      	(cp_genericize): Likewise.
      	* cp-ubsan.c (cp_ubsan_instrument_vptr_p): Likewise.
      	* decl.c (compute_array_index_type): Likewise.
      	(start_preparsed_function): Likewise.
      	* decl2.c (one_static_initialization_or_destruction): Likewise.
      	* init.c (finish_length_check): Likewise.
      	* lambda.c (maybe_add_lambda_conv_op): Likewise.
      	* typeck.c (cp_build_binary_op): Likewise.
      	(build_static_cast_1): Likewise.
      2017-06-13  Martin Liska  <mliska@suse.cz>
      
      	PR sanitize/78204
      	* c-convert.c (convert): Use sanitize_flags_p.
      	* c-decl.c (grokdeclarator): Likewise.
      	* c-typeck.c (convert_for_assignment): Likewise.
      	(c_finish_return): Likewise.
      	(build_binary_op): Likewise.
      
      From-SVN: r249158
      Martin Liska committed
  23. 09 Jun, 2017 1 commit
  24. 08 Jun, 2017 2 commits
    • re PR c/81006 (ICE with zero-size array and #pragma omp task depend) · 8ab7005b
      	PR c/81006
      	* c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
      	to sizetype before size_binop.
      
      	* semantics.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
      	to sizetype before size_binop.
      
      	* c-c++-common/gomp/pr81006.c: New test.
      
      From-SVN: r249035
      Jakub Jelinek committed
    • re PR middle-end/77925 (Add __builtin_issubnormal) · 94fc87ec
      2017-06-08  Tamar Christina  <tamar.christina@arm.com>
      
      	PR middle-end/77925
      	PR middle-end/77926
      	PR middle-end/66462
      
      	* gcc/builtins.c (fold_builtin_fpclassify): Remove.
      	(fold_builtin_interclass_mathfn): Remove.
      	(expand_builtin): Add builtins to lowering list.
      	(fold_builtin_n): Remove fold_builtin_varargs.
      	(fold_builtin_varargs): Remove.
      	* gcc/builtins.def (BUILT_IN_ISZERO, BUILT_IN_ISSUBNORMAL): New.
      	* gcc/real.h (get_min_float): New.
      	(real_format): Add is_ieee_compatible field.
      	* gcc/real.c (get_min_float): New.
      	(ieee_single_format): Set is_ieee_compatible flag.
      	* gcc/gimple-low.c (lower_stm): Define BUILT_IN_FPCLASSIFY,
      	CASE_FLT_FN (BUILT_IN_ISINF), BUILT_IN_ISINFD32, BUILT_IN_ISINFD64,
      	BUILT_IN_ISINFD128, BUILT_IN_ISNAND32, BUILT_IN_ISNAND64,
      	BUILT_IN_ISNAND128, BUILT_IN_ISNAN, BUILT_IN_ISNORMAL, BUILT_IN_ISZERO,
      	BUILT_IN_ISSUBNORMAL, CASE_FLT_FN (BUILT_IN_FINITE), BUILT_IN_FINITED32
      	BUILT_IN_FINITED64, BUILT_IN_FINITED128, BUILT_IN_ISFINITE.
      	(lower_builtin_fpclassify, is_nan, is_normal, is_infinity): New.
      	(is_zero, is_subnormal, is_finite, use_ieee_int_mode): Likewise.
      	(lower_builtin_isnan, lower_builtin_isinfinite): Likewise.
      	(lower_builtin_isnormal, lower_builtin_iszero): Likewise.
      	(lower_builtin_issubnormal, lower_builtin_isfinite): Likewise.
      	(emit_tree_cond, get_num_as_int, emit_tree_and_return_var): New.
      	(mips_single_format): Likewise.
      	(motorola_single_format): Likewise.
      	(spu_single_format): Likewise.
      	(ieee_double_format): Likewise.
      	(mips_double_format): Likewise.
      	(motorola_double_format): Likewise.
      	(ieee_extended_motorola_format): Likewise.
      	(ieee_extended_intel_128_format): Likewise.
      	(ieee_extended_intel_96_round_53_format): Likewise.
      	(ibm_extended_format): Likewise.
      	(mips_extended_format): Likewise.
      	(ieee_quad_format): Likewise.
      	(mips_quad_format): Likewise.
      	(vax_f_format): Likewise.
      	(vax_d_format): Likewise.
      	(vax_g_format): Likewise.
      	(decimal_single_format): Likewise.
      	(decimal_quad_format): Likewise.
      	(iee_half_format): Likewise.
      	(mips_single_format): Likewise.
      	(arm_half_format): Likewise.
      	(real_internal_format): Likewise.
      	* gcc/doc/extend.texi: Add documentation for built-ins.
      	* gcc/c/c-typeck.c (convert_arguments): Add BUILT_IN_ISZERO
      	and BUILT_IN_ISSUBNORMAL.
      
      gcc/testsuite/
      2017-06-08  Tamar Christina  <tamar.christina@arm.com>
      
      	* gcc.target/aarch64/builtin-fpclassify.c: New codegen test.
      	* gcc.dg/fold-notunord.c: Removed.
      	* gcc.dg/torture/floatn-tg-4.h: Add tests for iszero and issubnormal.
      	* gcc.dg/torture/float128-tg-4.c: Likewise.
      	* gcc.dg/torture/float128x-tg-4: Likewise.
      	* gcc.dg/torture/float16-tg-4.c: Likewise.
      	* gcc.dg/torture/float32-tg-4.c: Likewise.
      	* gcc.dg/torture/float32x-tg-4.c: Likewise.
      	* gcc.dg/torture/float64-tg-4.c: Likewise.
      	* gcc.dg/torture/float64x-tg-4.c: Likewise.
      	* gcc.dg/pr28796-1.c: Add -O2.
      	* gcc.dg/builtins-43.c: Check lower instead of gimple.
      	* gcc.dg/tg-tests.h: Add iszero and issubnormal.
      	* gcc.dg/pr77925.c: Add to test safe cases.
      
      From-SVN: r249005
      Tamar Christina committed
  25. 07 Jun, 2017 1 commit
    • dumpfile.h (enum tree_dump_index): Rename TDI_generic to TDI_gimple. · 363dc72c
      	* dumpfile.h (enum tree_dump_index): Rename TDI_generic to
      	TDI_gimple.
      	(class dump_manager): Add register_dumps method.
      	* dumpfile.c: Include langhooks.h.
      	(dump_files): Use 0 instead of 3/4/5 for TDI_{original,gimple,nested}.
      	(FIRST_AUTO_NUMBERED_DUMP): Decrease to 1.
      	(FIRST_ME_AUTO_NUMBERED_DUMP): Define.
      	(dump_manager::dump_register): Start with 512 entries instead of 32.
      	(dump_manager::register_dumps): New method.
      	* toplev.c (general_init): Instead of invoking register_dumps
      	langhook, invoke register_dumps method on the dump manager.
      	* gimplify.c (gimplify_function_tree): Use TDI_gimple instead of
      	TDI_generic.
      
      	* gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
      	of TDI_generic.
      
      From-SVN: r248947
      Jakub Jelinek committed
  26. 06 Jun, 2017 1 commit
  27. 02 Jun, 2017 1 commit
    • invoke.texi: Document the -Wsizeof-pointer-div warning. · 40ffd95f
      gcc:
      2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              * doc/invoke.texi: Document the -Wsizeof-pointer-div warning.
      
      gcc/c-family:
      2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              * c.opt (Wsizeof-pointer-div): New warning option.
      
      gcc/c:
      2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              * c-parser.c (c_parser_binary_expression): Implement the
              -Wsizeof_pointer_div warning.
              (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
              from a parenthesized expression.
              (c_parser_expr_list): Use c_last_sizeof_loc.
              * c-tree.h (c_last_sizeof_loc): New external.
              * c-typeck.c (c_last_sizeof_loc): New variable.
              (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
      
      gcc/cp:
      2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              * typeck.c (cp_build_binary_op): Implement the -Wsizeof_pointer_div
              warning.
      
      gcc/testsuite:
      2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              * c-c++-common/Wsizeof-pointer-div.c: New test. 
              * gcc.dg/Wsizeof-pointer-memaccess1.c: Add test cases with parens.
              * gcc.dg/torture/Wsizeof-pointer-memaccess1.c: Likewise.
              * gcc.target/i386/sse-init-v4hi-1.c: Fix test case.
              * gcc.target/i386/sse-init-v4sf-1.c: Likewise.
              * gcc.target/i386/sse-set-ps-1.c: Likewise.
              * gcc.target/i386/sse2-init-v16qi-1.c: Likewise.
              * gcc.target/i386/sse2-init-v2di-1.c: Likewise.
              * gcc.target/i386/sse2-init-v4si-1.c: Likewise.
              * gcc.target/i386/sse2-init-v8hi-1.c: Likewise.
              * gcc.target/i386/sse2-set-epi32-1.c: Likewise.
              * gcc.target/i386/sse2-set-epi64x-1.c: Likewise.
              * gcc.target/i386/sse4_1-init-v16qi-1.c: Likewise.
              * gcc.target/i386/sse4_1-init-v2di-1.c: Likewise.
              * gcc.target/i386/sse4_1-init-v4sf-1.c: Likewise.
              * gcc.target/i386/sse4_1-init-v4si-1.c: Likewise.
              * gcc.target/i386/sse4_1-set-epi32-1.c: Likewise.
              * gcc.target/i386/sse4_1-set-epi64x-1.c: Likewise.
              * gcc.target/i386/sse4_1-set-ps-1.c: Likewise.
              * libgomp.c/pr39591-2.c: Likewise.
              * libgomp.c/pr39591-3.c: Likewise.
      
      From-SVN: r248811
      Bernd Edlinger committed
  28. 31 May, 2017 1 commit
  29. 30 May, 2017 1 commit
    • C++ template type diff printing · f012c8ef
      gcc/ChangeLog:
      	* diagnostic-color.c (color_dict): Add "type-diff".
      	(parse_gcc_colors): Update comment.
      	* doc/invoke.texi (Diagnostic Message Formatting Options): Add
      	-fdiagnostics-show-template-tree and -fno-elide-type.
      	(GCC_COLORS): Add type-diff to example.
      	(type-diff=): New.
      	(-fdiagnostics-show-template-tree): New.
      	(-fno-elide-type): New.
      	* pretty-print.c (pp_format): Pass quote and formatters[argno] to
      	the pp_format_decoder callback.  Call any m_format_postprocessor's
      	"handle" method.
      	(pretty_printer::pretty_printer): Initialize
      	m_format_postprocessor.
      	(pretty_printer::~pretty_printer): Delete any
      	m_format_postprocessor.
      	* pretty-print.h (printer_fn): Add bool and const char **
      	parameters.
      	(class format_postprocessor): New class.
      	(struct pretty_printer::format_decoder): Document the new
      	parameters.
      	(struct pretty_printer::m_format_postprocessor): New field.
      	* tree-diagnostic.c (default_tree_printer): Update for new
      	bool and const char ** params.
      	* tree-diagnostic.h (default_tree_printer): Likewise.
      
      gcc/c/ChangeLog:
      	* c-objc-common.c (c_tree_printer): Gain bool and const char **
      	parameters.
      
      gcc/c-family/ChangeLog:
      	* c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
      	format_chars.
      	* c.opt (fdiagnostics-show-template-tree): New option.
      	(felide-type): New option.
      
      gcc/cp/ChangeLog:
      	* call.c (perform_implicit_conversion_flags): Convert
      	"from %qT to %qT" to "from %qH to %qI" in diagnostic.
      	(print_conversion_rejection): Replace pairs of %qT with
      	%qH and %qI in various places.
      	(build_user_type_conversion_1): Likewise.
      	(build_integral_nontype_arg_conv): Likewise.
      	(build_conditional_expr_1): Likewise.
      	(convert_like_real): Likewise.
      	(convert_arg_to_ellipsis): Likewise.
      	(joust): Likewise.
      	(initialize_reference): Likewise.
      	* cvt.c (cp_convert_to_pointer): Likewise.
      	(cp_convert_to_pointer): Likewise.
      	(convert_to_reference): Likewise.
      	(ocp_convert): Likewise.
      	* error.c (cp_printer): Gain bool and const char ** parameters.
      	(struct deferred_printed_type): New struct.
      	(class cxx_format_postprocessor): New class.
      	(cxx_initialize_diagnostics): Wire up a cxx_format_postprocessor
      	to pp->m_format_postprocessor.
      	(comparable_template_types_p): New function.
      	(newline_and_indent): New function.
      	(arg_to_string): New function.
      	(print_nonequal_arg): New function.
      	(print_template_differences): New function.
      	(type_to_string_with_compare): New function.
      	(print_template_tree_comparison): New function.
      	(append_formatted_chunk): New function.
      	(add_quotes): New function.
      	(cxx_format_postprocessor::handle): New function.
      	(defer_phase_2_of_type_diff): New function.
      	(cp_printer): Add "quoted" and "buffer_ptr" params.  Implement
      	%H and %I.
      	* typeck.c (cp_build_binary_op): Replace pairs of %qT with
      	%qH and %qI in various places.
      	(convert_member_func_to_ptr): Likewise.
      	(build_reinterpret_cast_1): Likewise.
      	(convert_for_assignment): Likewise.
      	* typeck2.c (check_narrowing): Likewise.
      
      gcc/fortran/ChangeLog:
      	* error.c (gfc_format_decoder): Update for new bool and
      	const char ** params.
      
      gcc/testsuite/ChangeLog:
      	* g++.dg/plugin/plugin.exp (plugin_test_list): Add...
      	* g++.dg/plugin/show-template-tree-color-no-elide-type.C: New
      	test case.
      	* g++.dg/plugin/show-template-tree-color.C: New test case.
      	* g++.dg/plugin/show_template_tree_color_plugin.c: New plugin.
      	* g++.dg/template/show-template-tree-2.C: New test case.
      	* g++.dg/template/show-template-tree-3.C: New test case.
      	* g++.dg/template/show-template-tree-4.C: New test case.
      	* g++.dg/template/show-template-tree-no-elide-type.C: New test case.
      	* g++.dg/template/show-template-tree.C: New test case.
      
      From-SVN: r248698
      David Malcolm committed
  30. 24 May, 2017 1 commit
    • PR c/80731 - poor -Woverflow warnings · 3cd211af
      gcc/c-family/ChangeLog:
      
      	PR c/80731
      	* c-common.h (unsafe_conversion_p): Add a function argument.
      	* c-common.c (unsafe_conversion_p): Same.
      	Add type names and values to diagnostics.
      	(scalar_to_vector): Adjust.
      	* c-warn.c (constant_expression_error): Add a function argument.
      	Add type names and values to diagnostics.
      	(conversion_warning): Add a function argument.
      	Add type names and values to diagnostics.
      	(warnings_for_convert_and_check): Same.
      
      gcc/c/ChangeLog:
      
      	PR c/80731
      	* c-fold.c (c_fully_fold_internal): Adjust.
      	* c-typeck.c (parser_build_unary_op): Adjust.
      
      gcc/cp/ChangeLog:
      
      	PR c/80731
      	* call.c (fully_fold_internal): Adjust.
      
      gcc/testsuite/ChangeLog:
      
      	PR c/80731
      	* c-c++-common/Wfloat-conversion.c: Adjust.
      	* c-c++-common/dfp/convert-int-saturate.c: Same.
      	* c-c++-common/pr68657-1.c: Same.
      	* g++.dg/ext/utf-cvt.C: Same.
      	* g++.dg/ext/utf16-4.C: Same.
      	* g++.dg/warn/Wconversion-real-integer-3.C: Same.
      	* g++.dg/warn/Wconversion-real-integer2.C: Same.
      	* g++.dg/warn/Wconversion3.C: Same.
      	* g++.dg/warn/Wconversion4.C: Same.
      	* g++.dg/warn/Wsign-conversion.C: Same.
      	* g++.dg/warn/overflow-warn-1.C: Same.
      	* g++.dg/warn/overflow-warn-3.C: Same.
      	* g++.dg/warn/overflow-warn-4.C: Same.
      	* g++.dg/warn/pr35635.C: Same.
      	* g++.old-deja/g++.mike/enum1.C: Same.
      	* gcc.dg/Wconversion-3.c: Same.
      	* gcc.dg/Wconversion-5.c: Same.
      	* gcc.dg/Wconversion-complex-c99.c: Same.
      	* gcc.dg/Wconversion-complex-gnu.c: Same.
      	* gcc.dg/Wconversion-integer.c: Same.
      	* gcc.dg/Wsign-conversion.c: Same.
      	* gcc.dg/bitfld-2.c: Same.
      	* gcc.dg/c90-const-expr-11.c: Same.
      	* gcc.dg/c90-const-expr-7.c: Same.
      	* gcc.dg/c99-const-expr-7.c: Same.
      	* gcc.dg/overflow-warn-1.c: Same.
      	* gcc.dg/overflow-warn-2.c: Same.
      	* gcc.dg/overflow-warn-3.c: Same.
      	* gcc.dg/overflow-warn-4.c: Same.
      	* gcc.dg/overflow-warn-5.c: Same.
      	* gcc.dg/overflow-warn-8.c: Same.
      	* gcc.dg/overflow-warn-9.c: New test.
      	* gcc.dg/pr35635.c: Adjust.
      	* gcc.dg/pr59940.c: Same.
      	* gcc.dg/pr59963-2.c: Same.
      	* gcc.dg/pr60114.c: Same.
      	* gcc.dg/switch-warn-2.c: Same.
      	* gcc.dg/utf-cvt.c: Same.
      	* gcc.dg/utf16-4.c: Same.
      
      From-SVN: r248431
      Martin Sebor committed
  31. 23 May, 2017 1 commit
    • OpenACC 2.5 kernels construct: num_gangs, num_workers, vector_length clauses · fd71a9a2
      	gcc/c/
      	* c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
      	"PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
      	"VECTOR_LENGTH".
      	gcc/cp/
      	* parser.c (OACC_KERNELS_CLAUSE_MASK): Add
      	"PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
      	"VECTOR_LENGTH".
      	gcc/fortran/
      	* openmp.c (OACC_KERNELS_CLAUSES): Add "OMP_CLAUSE_NUM_GANGS",
      	"OMP_CLAUSE_NUM_WORKERS", "OMP_CLAUSE_VECTOR_LENGTH".
      	gcc/
      	* omp-offload.c (execute_oacc_device_lower): Remove the
      	parallelism dimensions function attributes for unparallelized
      	OpenACC kernels constructs.
      	gcc/testsuite/
      	* c-c++-common/goacc/parallel-dims-1.c: Update.
      	* c-c++-common/goacc/parallel-dims-2.c: Likewise.
      	* c-c++-common/goacc/routine-1.c: Likewise.
      	* c-c++-common/goacc/uninit-dim-clause.c: Likewise.
      	* g++.dg/goacc/template.C: Likewise.
      	* gfortran.dg/goacc/kernels-tree.f95: Likewise.
      	* gfortran.dg/goacc/routine-3.f90: Likewise.
      	* gfortran.dg/goacc/sie.f95: Likewise.
      	* gfortran.dg/goacc/uninit-dim-clause.f95: Likewise.
      	libgomp/
      	* testsuite/libgomp.oacc-c-c++-common/kernels-loop-2.c: Update.
      	* testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Likewise.
      	* testsuite/libgomp.oacc-fortran/kernels-loop-2.f95: Likewise.
      
      From-SVN: r248370
      Thomas Schwinge committed