Age | Commit message (Collapse) | Author | Files | Lines |
|
2016-01-14 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/68773
* c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
set force_output.
* parser.c (cp_parser_oacc_declare, cp_parser_omp_declare_target): Don't
set force_output.
* omp-low.c (expand_omp_target): Don't set force_output.
* varpool.c (varpool_node::get_create): Same.
* lto-cgraph.c (input_offload_tables): Mark entries in offload_vars and
offload_funcs with force_output.
From-SVN: r232384
|
|
work reliably)
PR c++/69261
* constexpr.c (find_array_ctor_elt): Handle splitting RANGE_EXPR.
From-SVN: r232370
|
|
PR c/66208
* c-common.c (check_function_nonnull): Remove unnecessary declaration.
Add new arg loc and pass it down as context.
(check_nonnull_arg): Don't mark ctx arg as unused. Use it as a pointer
to the location to use for the warning.
(check_function_arguments): New arg loc. All callers changed. Pass
it to check_function_nonnull.
* c-common.h (check_function_arguments): Adjust declaration.
testsuite/
PR c/66208
* c-c++-common/pr66208.c: New file.
From-SVN: r232345
|
|
negative)
PR c++/68979
* constexpr.c (cxx_eval_check_shift_p): Use permerror rather than
error_at and adjust the return value.
* g++.dg/warn/permissive-1.C: New test.
From-SVN: r232280
|
|
(test for errors, line 51,56,59))
PR objc++/68511
PR c++/69213
* cp-gimplify.c (cp_gimplify_expr) <case INIT_EXPR>: Don't return
GS_ERROR whenever seen_error (), only if *expr_p contains
cilk spawn stmt, but cilk_detect_spawn_and_unwrap failed.
* g++.dg/opt/pr69213.C: New test.
From-SVN: r232278
|
|
PR c++/66808
PR c++/69000
* pt.c (tsubst_decl): If not local_p, clear DECL_TEMPLATE_INFO.
* g++.dg/tls/pr66808.C: New test.
* g++.dg/tls/pr69000.C: New test.
From-SVN: r232259
|
|
PR c++/69131
* method.c (walk_field_subobs): Add dtor_from_ctor parm.
(process_subob_fn): Likewise. Don't consider triviality if true.
(synthesize_method_walk): Pass it.
From-SVN: r232243
|
|
gcc/cp/ChangeLog:
PR c++/68795
* parser.c (cp_parser_postfix_expression): Initialize
close_paren_loc to UNKNOWN_LOCATION; only use it if
it has been written to by
cp_parser_parenthesized_expression_list.
(cp_parser_parenthesized_expression_list): Document the behavior
with respect to the CLOSE_PAREN_LOC param.
From-SVN: r232238
|
|
PR c++/69211
* cp-gimplify.c (cp_fold): If COMPOUND_EXPR or MODIFY_EXPR
folded operands have side-effects, but folding changed any of them,
build a new tree with the folded operands instead of returning the
unfolded tree.
* g++.dg/opt/pr69211.C: New test.
From-SVN: r232237
|
|
PR c++/69113
* decl2.c (comdat_linkage): Only set DECL_COMDAT if TREE_PUBLIC is set.
* g++.dg/pr69113.C: New test.
From-SVN: r232189
|
|
PR c++/69164
* class.c (layout_class_type): Use copy_node to copy FIELD_DECLs.
* g++.dg/opt/pr69164.C: New test.
From-SVN: r232187
|
|
PR c++/69158
* constexpr.c (cxx_fold_indirect_ref): Handle array type differing
in completion.
From-SVN: r232186
|
|
PR c++/68449
* constexpr.c (cxx_eval_constant_expression): Handle NULL initializer.
* g++.dg/pr68449.C: New.
From-SVN: r232176
|
|
* constexpr.c (cxx_eval_call_expression): Remove convert_to_void
workaround.
From-SVN: r232168
|
|
PR c++/67557
gcc/
* function.c (assign_temp): Guard against TREE_ADDRESSABLE types here.
* expr.c (store_field): Not here.
* tree-cfgcleanup.c (fixup_noreturn_call): Don't clear LHS of a
call with TREE_ADDRESSABLE type.
* tree-cfg.c (verify_gimple_call): Adjust.
gcc/cp/
* cvt.c (convert_to_void): Don't strip a TARGET_EXPR of
TREE_ADDRESSABLE type.
From-SVN: r232167
|
|
PR c++/67557
* call.c (unsafe_copy_elision_p): Look through COMPOUND_EXPR.
From-SVN: r232166
|
|
initialization in template)
gcc/cp/
PR c++/58583
* pt.c (build_non_dependent_expr): Don't try a checking fold when
parsing an nsdmi.
gcc/testsuite/
PR c++/58583
* g++.dg/cpp0x/nsdmi-template14.C: Adjust test & errors.
From-SVN: r232075
|
|
From-SVN: r232055
|
|
PR c++/69005
* call.c (add_template_candidate_real): Don't try to deduce X(X).
From-SVN: r231952
|
|
gcc/c/
* c-parser.c (c_parser_oacc_clause_use_device): Merge function
into...
(c_parser_omp_clause_use_device_ptr): ... this function. Adjust
all users.
gcc/
* tree-core.h (enum omp_clause_code): Merge OMP_CLAUSE_USE_DEVICE
into OMP_CLAUSE_USE_DEVICE_PTR. Adjust all users.
From-SVN: r231926
|
|
nested within a templated class)
PR c++/66921
* decl.c (cp_complete_array_type): Allow an initializer that
already has array type.
From-SVN: r231914
|
|
PR c++/67257
* parser.c (cp_parser_single_declaration): Reject a class template
that also declares a variable.
From-SVN: r231913
|
|
PR c++/67339
* parser.c (cp_parser_elaborated_type_specifier): Use CLASS_TYPE_P
rather than check for RECORD_TYPE.
From-SVN: r231912
|
|
gcc/cp/ChangeLog:
* pt.c (make_pack_expansion): Make sure to initialize
ppd.type_pack_expansion_p.
From-SVN: r231904
|
|
gcc/c-family/ChangeLog:
* c-common.c (binary_op_error): Convert first param from
location_t to rich_location * and use it when emitting an error.
* c-common.h (binary_op_error): Convert first param from
location_t to rich_location *.
gcc/c/ChangeLog:
* c-typeck.c: Include "gcc-rich-location.h".
(build_binary_op): In the two places that call binary_op_error,
create a gcc_rich_location and populate it with the location of
the binary op and its two operands.
gcc/cp/ChangeLog:
* typeck.c (cp_build_binary_op): Update for change in signature
of build_binary_op. Use error_at to replace an implicit use
of input_location with param "location" in "invalid operands"
error.
(cp_build_binary_op): Replace an error with an error_at, using
"location", rather than implicitly using input_location.
gcc/testsuite/ChangeLog:
* g++.dg/diagnostic/bad-binary-ops.C: New test case.
* gcc.dg/bad-binary-ops.c: New test case.
gcc.dg/plugin/diagnostic_plugin_show_trees.c (get_range_for_expr):
Remove material copied from gcc-rich-location.c
(gcc_rich_location::add_expr): Likewise.
From-SVN: r231884
|
|
PR c++/67411
* decl2.c (decl_maybe_constant_var_p): Use DECL_HAS_VALUE_EXPR_P.
From-SVN: r231869
|
|
PR c++/67411
* lambda.c (generic_lambda_fn_p): Split out from...
(maybe_add_lambda_conv_op): ...here.
* semantics.c (process_outer_var_ref): Don't defer maybe-constant
variables in a generic lambda.
* pt.c (instantiate_non_dependent_or_null): New.
* init.c (constant_value_1): Use it.
* cp-tree.h: Declare it and generic_lambda_fn_p.
From-SVN: r231863
|
|
PR c++/67411
* decl2.c (decl_maybe_constant_var_p): A proxy isn't constant.
From-SVN: r231862
|
|
gcc/cp/ChangeLog:
PR c++/68978
* tree.c (lvalue_kind) [MODOP_EXPR]: New case.
gcc/testsuite/ChangeLog:
PR c++/68978
* g++.dg/template/pr68978.C: New test.
From-SVN: r231841
|
|
trigger a diagnostic)
/cp
2015-12-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/67592
* decl.c (grokdeclarator): Reject constexpr virtual member functions;
in error messages, prefer %<virtual%> and %<constexpr%> to virtual
and constexpr, respectively.
/testsuite
2015-12-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/67592
* g++.dg/cpp0x/constexpr-virtual5.C: New.
* g++.dg/cpp0x/pr51463.C: Adjust dg-error string.
* g++.dg/inherit/pure1.C: Likewise.
From-SVN: r231824
|
|
gcc/cp/ChangeLog:
PR c++/68831
* init.c (build_delete): Use a warning sentinel to disable
-Waddress warnings when building the conditional that tests
if the operand is NULL.
gcc/testsuite/ChangeLog:
PR c++/68831
* g++.dg/pr68831.C: New test.
From-SVN: r231798
|
|
global array yields zeros instead of initializer values)
PR c++/67550
* init.c (constant_value_1): Don't return a CONSTRUCTOR missing
non-constant elements.
From-SVN: r231777
|
|
PR c++/67576
PR c++/25466
* rtti.c (build_typeid): Use save_expr, not stabilize_reference.
From-SVN: r231776
|
|
PR c++/59878 -> PR c++/59879
From-SVN: r231755
|
|
gcc/cp/ChangeLog:
PR c++/16333
PR c++/41426
PR c++/59878
PR c++/66895
* typeck.c (convert_for_initialization): Don't perform an early
decaying conversion if converting to a class type.
gcc/testsuite/ChangeLog:
PR c++/16333
PR c++/41426
PR c++/59878
PR c++/66895
* g++.dg/conversion/pr16333.C: New test.
* g++.dg/conversion/pr41426.C: New test.
* g++.dg/conversion/pr59878.C: New test.
* g++.dg/conversion/pr66895.C: New test.
From-SVN: r231736
|
|
gcc/cp/ChangeLog:
* tree.c (cp_tree_operand_length): Define in terms of
cp_tree_code_length.
From-SVN: r231735
|
|
From-SVN: r231734
|
|
PR objc++/68932 - FAIL: obj-c++.dg/property/at-property-23.mm -fgnu-runtime
(internal compiler error)
cp/
* decl.c (grokdeclarator): Avoid assuming ctype is non-null when
checking the validity of a flexible array member.
testsuite/
* obj-c++.dg/property/at-property-23.mm: Remove check for
an error message.
From-SVN: r231726
|
|
2015-12-16 Paolo Carlini <paolo.carlini@oracle.com>
* pt.c (comp_template_args): Remove.
(comp_template_args_with_info): Rename to comp_template_args;
not static.
(add_pending_template): Adjust call.
* cp-tree.h (comp_template_args): Add default arguments.
From-SVN: r231723
|
|
PR c++/68309
* pt.c (instantiate_decl): Revert earlier change.
From-SVN: r231714
|
|
PR c++/63628
* pt.c (tsubst_pack_expansion): Also make dummy decls if
retrieve_local_specialization fails.
From-SVN: r231713
|
|
gcc/c-family/ChangeLog:
* c-common.h (conflict_marker_get_final_tok_kind): New prototype.
* c-lex.c (conflict_marker_get_final_tok_kind): New function.
gcc/c/ChangeLog:
* c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
to 4.
(c_parser_peek_nth_token): New function.
(c_parser_peek_conflict_marker): New function.
(c_parser_error): Detect conflict markers and report them as such.
gcc/cp/ChangeLog:
* parser.c (cp_lexer_peek_conflict_marker): New function.
(cp_parser_error): Detect conflict markers and report them as
such.
gcc/testsuite/ChangeLog:
* c-c++-common/conflict-markers-1.c: New testcase.
* c-c++-common/conflict-markers-2.c: Likewise.
* c-c++-common/conflict-markers-3.c: Likewise.
* c-c++-common/conflict-markers-4.c: Likewise.
* c-c++-common/conflict-markers-5.c: Likewise.
* c-c++-common/conflict-markers-6.c: Likewise.
* c-c++-common/conflict-markers-7.c: Likewise.
* c-c++-common/conflict-markers-8.c: Likewise.
* c-c++-common/conflict-markers-9.c: Likewise.
* c-c++-common/conflict-markers-10.c: Likewise.
* c-c++-common/conflict-markers-11.c: Likewise.
* g++.dg/conflict-markers-1.C: Likewise.
From-SVN: r231712
|
|
flexible array member.
gcc/testsuite/ChangeLog:
2015-12-15 Martin Sebor <msebor@redhat.com>
c++/42121
c++/68478
c++/68613
c++/68689
c++/68710
* g++.dg/compat/struct-layout-1_generate.c: Avoid generating
further fields after the first flexible array member.
* g++.dg/ext/flexary2.C: Expect a sole flexible array member
to be rejected. Add a test case exercising zero-length array.
* g++.dg/ext/flexary3.C: Expect a sole flexible array member
to be rejected.
* g++.dg/ext/flexary.h: New file.
* g++.dg/ext/flexary4.C: New file.
* g++.dg/ext/flexary5.C: New file.
* g++.dg/ext/flexary6.C: New file.
* g++.dg/ext/flexary7.C: New file.
* g++.dg/ext/flexary8.C: New file.
* g++.dg/other/dump-ada-spec-2.C: Adjust to reflect flexible
array members.
* g++.dg/parse/pr43765.C: Add a member to make a struct with
a flexible array member valid. Adjust expected error message.
* g++.dg/torture/pr64280.C: Expect a sole flexible array member
to be rejected.
* g++.dg/torture/pr64312.C: Add a member to make a struct with
a flexible array member valid.
* g++.dg/ubsan/object-size-1.C: Adjust expected diagnostic.
gcc/cp/ChangeLog:
2015-12-15 Martin Sebor <msebor@redhat.com>
c++/42121
c++/68478
c++/68613
c++/68689
c++/68710
* class.c (walk_subobject_offsets): Avoid assuming type domain
is non-null or has an upper bound.
(layout_class_type): Include type size in error message.
(flexmems_t): New type.
(field_nonempty_p, find_flexarrays, diagnose_flexarrays)
(check_flexarrays): New functions.
(finish_struct_1): Call check_flexarrays.
* decl.c (compute_array_index_type): Distinguish flexible array
members from zero-length arrays.
(grokdeclarator): Reject flexible array members in unions. Avoid
rejecting members of incomplete types that are flexible array members.
* error.c (dump_type_suffix): Handle flexible array members with null
upper bound.
* init.c (perform_member_init): Same.
* pt.c (instantiate_class_template_1): Allow flexible array members.
(tsubst): Handle flexible array members with null upper bound.
* typeck2.c (digest_init_r): Warn for initialization of flexible
array members.
(process_init_constructor_record): Handle flexible array members.
gcc/ChangeLog:
2015-12-15 Martin Sebor <msebor@redhat.com>
c++/42121
* tree-chkp.c (chkp_find_bound_slots_1): Handle flexible array
members.
* tree.c (type_contains_placeholder_1): Avoid assuming type has
a non-null domain or an upper bound to handle flexible array
members.
* varasm.c (output_constructor_regular_field): Same.
(output_constructor): Set min_index to integer_zero_node rather
than null when a type has no domain to avoid crashing later.
From-SVN: r231665
|
|
gcc/cp/ChangeLog:
PR c++/21802
PR c++/53223
* cp-tree.h (cp_tree_code_length): Declare.
(build_min_non_dep_op_overload): Declare.
* tree.c (cp_tree_code_length): Define.
(build_min_non_dep_op_overload): Define.
(build_win_non_dep_call_vec): Copy the KOENIG_LOOKUP_P flag.
* typeck.c (build_x_indirect_ref): Use
build_min_non_dep_op_overload when the given expression
has been resolved to an operator overload.
(build_x_binary_op): Likewise.
(build_x_array_ref): Likewise.
(build_x_unary_op): Likewise.
(build_x_compound_expr): Likewise.
(build_x_modify_expr): Likewise.
* decl2.c (grok_array_decl): Likewise.
* call.c (build_new_op_1): If during template processing we
chose an operator overload that is a hidden friend function, set
the call's KOENIG_LOOKUP_P flag to 1.
gcc/testsuite/ChangeLog:
PR c++/21802
PR c++/53223
* g++.dg/cpp0x/pr53223.C: New test.
* g++.dg/lookup/pr21802.C: New test.
* g++.dg/lookup/two-stage4.C: Remove XFAIL.
From-SVN: r231640
|
|
PR c++/68309
gcc/
* hash-table.h: Add copy constructor.
* hash-map.h: Add copy constructor.
gcc/cp/
* pt.c (instantiate_decl): Copy local_specializations for nested
function.
From-SVN: r231632
|
|
/cp
2015-12-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60218
* semantics.c (calculate_bases_helper): Don't call dfs_walk_all
when TYPE_BINFO (type) is null.
(calculate_bases): Handle gracefully a null vector->length ().
/testsuite
2015-12-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60218
* g++.dg/ext/bases2.C: New.
From-SVN: r231460
|
|
2015-12-09 Chung-Lin Tang <cltang@codesourcery.com>
* c-family/c-omp.c (c_finish_oacc_wait): Remove add_stmt() call.
* c/c-parser.c (c_parser_oacc_wait): Add add_stmt() call.
* cp/parser.c (cp_parser_oacc_wait): Add finish_expr_stmt() call.
From-SVN: r231441
|
|
of a virtual base.
gcc/testsuite/ChangeLog:
* g++.dg/other/offsetof8.C: New test.
gcc/cp/ChangeLog:
* typeck.c (build_class_member_access_expr): Strip NOPs before
testing a potentially null operand for equality to zero.
From-SVN: r231437
|
|
PR c++/68760
* error.c (dump_global_iord): Use DECL_SOURCE_FILE (t)
instead of LOCATION_FILE (input_location).
* g++.dg/tree-ssa/pr68760.C: New test.
From-SVN: r231386
|
|
modifies a type tree node but leaves TYPE_CANONICAL unchanged)
PR c++/68683
* constraint.cc (satisfy_argument_deduction_constraint): Set
TYPE_CANONICAL to NULL_TREE if PLACEHOLDER_TYPE_CONSTRAINTS are
changed.
From-SVN: r231385
|