1. 22 Feb, 2019 3 commits
  2. 21 Feb, 2019 20 commits
    • extend.texi (__clear_cache): Correct signature. · a90b0cdd
      gcc/ChangeLog:
      
      	* doc/extend.texi (__clear_cache): Correct signature.
      
      libgcc/ChangeLog:
      
      	* libgcc2.h (__clear_cache): Correct signature.
      	* libgcc2.c (__clear_cache): Same.
      
      gcc/testsuite/ChangeLog:
      
      	* gcc.dg/Wbuiltin-declaration-mismatch-12.c: New test.
      
      From-SVN: r269082
      Martin Sebor committed
    • PR c++/89422 - ICE with -g and lambda in default arg in template. · 4bcd47e2
      Here, we were trying to instantiate the default argument before setting
      DECL_FRIEND_CONTEXT, so that the instantiated lambda ended up being treated
      as part of the S template, which confused dwarf2out.
      
      	* pt.c (tsubst_function_decl): SET_DECL_FRIEND_CONTEXT sooner.
      
      From-SVN: r269081
      Jason Merrill committed
    • PR c++/88419 - C++17 ICE with class template arg deduction. · 5498361c
      Just like in make_constrained_auto, we need to defer setting TYPE_CANONICAL
      until we've set fields that will affect structural_comptypes.
      
      	* pt.c (make_template_placeholder): Set TYPE_CANONICAL after
      	CLASS_PLACEHOLDER_TEMPLATE.
      
      From-SVN: r269080
      Jason Merrill committed
    • re PR go/89170 (FAIL: net/http) · eeb20b96
      	PR go/89170
      	* varasm.c (decode_addr_const): Call lookup_constant_def rather
      	than output_constant_def.
      	(add_constant_to_table): New static function.
      	(output_constant_def): Call add_constant_to_table.
      	(tree_output_constant_def): Likewise.
      
      From-SVN: r269079
      Ian Lance Taylor committed
    • re PR c++/89285 (ICE after casting the this pointer in the constructor in C++17 mode) · 43574e4f
      	PR c++/89285
      	* builtins.c (fold_builtin_arith_overflow): If first two args are
      	INTEGER_CSTs, set intres and ovfres to constants rather than calls
      	to ifn.
      
      	* constexpr.c (struct constexpr_fundef): Add parms and result members.
      	(retrieve_constexpr_fundef): Adjust for the above change.
      	(register_constexpr_fundef): Save constexpr body with copy_fn,
      	temporarily set DECL_CONTEXT on DECL_RESULT before that.
      	(get_fundef_copy): Change FUN argument to FUNDEF with
      	constexpr_fundef * type, grab body and parms/result out of
      	constexpr_fundef struct and temporarily change it for copy_fn calls
      	too.
      	(cxx_eval_builtin_function_call): For __builtin_FUNCTION temporarily
      	adjust current_function_decl from ctx->call context.  Test
      	!potential_constant_expression instead of !is_constant_expression.
      	(cxx_bind_parameters_in_call): Grab parameters from new_call.  Undo
      	convert_for_arg_passing changes for TREE_ADDRESSABLE type passing.
      	(cxx_eval_call_expression): Adjust get_fundef_copy caller.
      	(cxx_eval_conditional_expression): For IF_STMT, allow then or else
      	operands to be NULL.
      	(label_matches): Handle BREAK_STMT and CONTINUE_STMT.
      	(cxx_eval_loop_expr): Add support for FOR_STMT, WHILE_STMT and DO_STMT.
      	(cxx_eval_switch_expr): Add support for SWITCH_STMT.
      	(cxx_eval_constant_expression): Handle IF_STMT, FOR_STMT, WHILE_STMT,
      	DO_STMT, CONTINUE_STMT, SWITCH_STMT, BREAK_STMT and CONTINUE_STMT.
      	For SIZEOF_EXPR, recurse on the result of fold_sizeof_expr.  Ignore
      	DECL_EXPR with USING_DECL operand.
      	* lambda.c (maybe_add_lambda_conv_op): Build thisarg using
      	build_int_cst to make it a valid constant expression.
      
      	* g++.dg/ubsan/vptr-4.C: Expect reinterpret_cast errors.
      	* g++.dg/cpp1y/constexpr-84192.C (f2): Adjust expected diagnostics.
      	* g++.dg/cpp1y/constexpr-70265-2.C (foo): Adjust expected line of
      	diagnostics.
      	* g++.dg/cpp1y/constexpr-89285.C: New test.
      	* g++.dg/cpp0x/constexpr-arith-overflow.C (add, sub, mul): Ifdef out
      	for C++11.
      	(TEST_ADD, TEST_SUB, TEST_MUL): Define to Assert (true) for C++11.
      	* g++.dg/cpp0x/constexpr-arith-overflow2.C: New test.
      
      From-SVN: r269078
      Jakub Jelinek committed
    • PR libstdc++/89416 fix __is_move_insertable trait · d331c5f1
      The common base class for __is_move_insertable and __is_copy_insertable
      instantiates both the copy and move tests, when only one is needed. The
      unneeded one might cause errors outside the immediate context.
      
      The solution used in this patch is to replace them with alias templates,
      which will only be instantiated as needed.
      
      	PR libstdc++/89416
      	* include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
      	class template with class. Replace move and copy member types with
      	member alias templates, so they are only instantiated when needed.
      	(__is_copy_insertable, __is_move_insertable): Adjust base class.
      	* testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
      	test for C++11/14/17 as well.
      	* testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
      	test.
      
      From-SVN: r269075
      Jonathan Wakely committed
    • i386: Replace -fcf-protection with -fcf-protection=branch · f43044a3
      Since -mindirect-branch is incompatible with -fcf-protection=return and
      -fcf-protection, replace -fcf-protection with -fcf-protection=branch.
      
      	PR target/87412
      	* gcc.target/i386/indirect-thunk-attr-14.c: Replace
      	-fcf-protection with -fcf-protection=branch.
      	* gcc.target/i386/indirect-thunk-attr-15.c: Likewise.
      	* gcc.target/i386/indirect-thunk-attr-16.c: Likewise.
      	* gcc.target/i386/indirect-thunk-extern-8.c: Likewise.
      	* gcc.target/i386/indirect-thunk-extern-9.c: Likewise.
      	* gcc.target/i386/indirect-thunk-extern-10.c: Likewise.
      
      From-SVN: r269074
      H.J. Lu committed
    • PR c++/88690 - C++17 ICE with empty base in aggregate. · 7b45322a
      Base fields for empty bases appear in initialization order, which may not be
      the same as layout order.  If they also show up in a CONSTRUCTOR in that
      order, output_constructor_regular_field aborts because it understandably
      doesn't want to go backwards.  I also considered making o_c_r_f more
      tolerant of the case where the out-of-order field has fieldsize 0, and so no
      actual data needs to be emitted, but we might as well avoid adding an
      element to the CONSTRUCTOR in the first place.
      
      	* typeck2.c (process_init_constructor_record): Skip trivial
      	initialization of an empty base.
      
      From-SVN: r269073
      Jason Merrill committed
    • Fix pr88850-2 test · f64629aa
      Like the pr88850.c test, also fix the pr88850-2.c testcase which
      was failing in hardfp environments.
      
      Committed as obvious.
      
          gcc/testsuite/
      	* gcc.target/arm/pr88850-2.c: Block -mfloat-abi override.
      	* gcc.target/arm/pr88850.c: Use -mfloat-abi=softfp.
      
      From-SVN: r269072
      Wilco Dijkstra committed
    • dump-parse-tree.c (debug): Implement for gfc_expr *, gfc_typespec *, gfc_typespec and gfc_symbol *. · 5ea0d4df
      2019-02-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
          * dump-parse-tree.c (debug): Implement for gfc_expr *,
          gfc_typespec *, gfc_typespec and gfc_symbol *.
      
      From-SVN: r269071
      Thomas Koenig committed
    • re PR fortran/86119 (Intrinsic len has wrong type if used within select type for a class(*) string) · 9e6644c6
      2019-02-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
          PR fortran/86119
          * class.c (gfc_get_len_component): Add argument k for kind.
          If the kind of the resulting expression is not equal to k,
          convert it.
          * gfortran.h (gfc_len_component): Adjust prototype.
          * simplify.c (gfc_simplify_len): Pass kind to
          gfc_get_len_component.
      
      2019-02-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
          PR fortran/86119
          * gfortran.dg/warn_conversion_11.f90: New test.
      
      From-SVN: r269070
      Thomas Koenig committed
    • i386: Check -mindirect-branch/-mfunction-return with -fcf-protection · eb74a883
      Issue an error when -mindirect-branch or -mfunction-return are used
      with incompatible -fcf-protection.
      
      gcc/
      
      	PR target/87412
      	* config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
      	error for -mindirect-branch/-mfunction-return with incompatible
      	-fcf-protection.
      
      gcc/testsuite/
      
      	PR target/87412
      	* gcc.target/i386/pr87412-1.c: New file.
      	* gcc.target/i386/pr87412-2.c: Likewise.
      	* gcc.target/i386/pr87412-3.c: Likewise.
      	* gcc.target/i386/pr87412-4.c: Likewise.
      
      From-SVN: r269068
      H.J. Lu committed
    • re PR bootstrap/88714 (bootstrap comparison failure on armv7l since r265398) · 8be53488
      	PR bootstrap/88714
      	* constraints.md (q): Remove.
      	* config/arm/ldrdstrd.md (*arm_ldrd, *arm_strd): Use rk constraint
      	instead of q.
      
      From-SVN: r269067
      Jakub Jelinek committed
    • [omp] Move NE_EXPR handling to omp_adjust_for_condition · 031c5c8b
      2019-02-21  Martin Jambor  <mjambor@suse.cz>
      
      	PR hsa/89302
      	* omp-general.c (omp_extract_for_data): Removed a duplicate call
      	to omp_adjust_for_condition, moved NE_EXPR code_cond processing...
      	(omp_adjust_for_condition): ...here.  Added necessary parameters.
      	* omp-general.h (omp_adjust_for_condition): Updated declaration.
      	* omp-grid.c (grid_attempt_target_gridification): Adjust to pass
      	proper values to new parameters of omp_adjust_for_condition.
      
      From-SVN: r269066
      Martin Jambor committed
    • re PR c++/89392 (ICE in bitmap_bit_p, at bitmap.c:978) · 0864e3fc
      2019-02-21  Richard Biener  <rguenther@suse.de>
      
      	PR middle-end/89392
      	cp/
      	* vtable-class-hierarchy.c (vtv_generate_init_routine): Do not
      	make symtab process new functions here.
      
      From-SVN: r269065
      Richard Biener committed
    • PR c++/87921 - wrong error with inline static data member. · 752620be
      c_parse_final_cleanups checks DECL_IN_AGGR_P to avoid trying to emit a
      static data member that has not been defined.  The inline variable patch
      changed that to exempt inline variables.  But in this case we haven't
      instantiated the variable yet, so we really don't have a definition.  This
      patch changes inline variable handling such that DECL_IN_AGGR_P is not set
      for a defined inline variable, so we can remove all the checks of
      DECL_INLINE_VAR_P after DECL_IN_AGGR_P.
      
      With that change we were failing on a static data member that had been
      instantiated due to a use before we got around to processing it in
      instantiate_class_template; we should detect that and avoid all the
      finish_static_data_member_decl processing, which assumes that it is the
      first time we're seeing the variable.
      
      	* decl2.c (finish_static_data_member_decl): Don't set DECL_IN_AGGR_P
      	for a non-template inline variable.  Do nothing for an
      	already-instantiated variable.
      	(c_parse_final_cleanups): Check DECL_IN_AGGR_P without
      	DECL_INLINE_VAR_P.
      	* decl.c (check_initializer): Likewise.
      	(make_rtl_for_nonlocal_decl): Likewise.
      	* pt.c (instantiate_decl): Likewise.
      	* typeck2.c (store_init_value): Likewise.
      
      From-SVN: r269064
      Jason Merrill committed
    • re PR go/89407 (go bootstrap failure on s390x starting with r268941) · 556bef7e
      	PR go/89407
          internal/cpu: use #ifdef __s390x__ in C code
          
          Patch by Jakub Jelinek.
          
          Fixes https://gcc.gnu.org/PR89407
          
          Reviewed-on: https://go-review.googlesource.com/c/163297
      
      From-SVN: r269063
      Ian Lance Taylor committed
    • Daily bump. · a9977ffb
      From-SVN: r269062
      GCC Administrator committed
    • re PR c++/89403 (ICE in maybe_clone_body, at cp/optimize.c:693) · e843f189
      	PR c++/89403
      	* decl2.c (c_parse_final_cleanups): Move TREE_ASM_WRITTEN setting
      	for flag_syntax_only from here...
      	* semantics.c (expand_or_defer_fn_1): ... here.
      
      	* g++.dg/cpp0x/pr89403.C: New test.
      
      From-SVN: r269059
      Jakub Jelinek committed
    • re PR c++/89405 (ICE in import_export_decl, at cp/decl2.c:2959) · 73ab3eb7
      	PR c++/89405
      	* decl.c (maybe_commonize_var): When clearing TREE_PUBLIC and
      	DECL_COMMON, set DECL_INTERFACE_KNOWN.
      
      	* g++.dg/cpp1z/inline-var5.C: New test.
      
      From-SVN: r269058
      Jakub Jelinek committed
  3. 20 Feb, 2019 17 commits