DR 587
PR c++/51317
* call.c (build_conditional_expr_1, conditional_conversion): Handle
non-class lvalues and xvalues that differ only in cv-qualifiers.
From-SVN: r210285
PR c++/22434
* call.c (build_conditional_expr_1): Don't try to pool cv-quals
if we didn't find a conversion.
Don't accept a bad conversion too early.
From-SVN: r210281
PR c/61096
* c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
(c_parser_initelt): Pass location to set_init_label. Pass array index
location to set_init_index.
* c-tree.h (push_init_level): Update declaration.
(pop_init_level): Likewise.
(set_init_index): Likewise.
(set_init_label): Likewise.
* c-typeck.c (error_init): Add location parameter. Call error_at
instead of error.
(digest_init): Pass init_loc to error_init.
(really_start_incremental_init):
(push_init_level): Add location parameter. Pass loc to pop_init_level
and error_init.
(pop_init_level): Likewise.
(set_designator): Add location parameter. Pass loc to pop_init_level,
push_init_level, and error_init.
(set_init_index): Add location parameter. Pass loc to error_init and
set_designator.
(set_init_label): Likewise.
(output_init_element): Pass loc to error_init.
(process_init_element): Pass loc to error_init, pop_init_level,
pedwarn_init, and push_init_level.
* gcc.dg/pr61096-1.c: New test.
* gcc.dg/pr61096-2.c: New test.
From-SVN: r210280
This patch fixes a loophole in the -fstack-protector-strong protection.
If a function call uses a return slot, the caller needs stack protector
instrumentation because the return slot is addressable.
gcc/
2014-05-09 Florian Weimer <fweimer@redhat.com>
* cfgexpand.c (stack_protect_decl_p): New function, extracted from
expand_used_vars.
(stack_protect_return_slot_p): New function.
(expand_used_vars): Call stack_protect_decl_p and
stack_protect_return_slot_p for -fstack-protector-strong.
gcc/testsuite/
2014-05-09 Florian Weimer <fweimer@redhat.com>
* gcc.dg/fstack-protector-strong.c: Add coverage for return slots.
* g++.dg/fstack-protector-strong.C: Likewise.
* gcc.target/i386/ssp-strong-reg.c: New file.
From-SVN: r210275
gcc/config/avr
PR target/61055
* config/avr/avr.md (cc): Add new attribute set_vzn.
(addqi3, addqq3, adduqq3, subqi3, subqq3, subuqq3, negqi2) [cc]:
Set cc insn attribute to set_vzn instead of set_zn for alternatives
with INC, DEC or NEG.
* config/avr/avr.c (avr_notice_update_cc): Handle SET_VZN.
(avr_out_plus_1): ADIW sets cc0 to CC_SET_CZN.
INC, DEC and ADD+ADC set cc0 to CC_CLOBBER.
gcc/testsuite/
PR target/61055
* gcc.target/avr/torture/pr61055.c: New test.
From-SVN: r210267
2014-05-09 Joey Ye <joey.ye@arm.com>
* files.c (find_file_in_dir): Always try to shorten for DOS
non-system headers.
* init.c (ENABLE_CANONICAL_SYSTEM_HEADERS): Default enabled for DOS.
From-SVN: r210264
PR c/50459
c-family/
* c-common.c (check_user_alignment): Return -1 if alignment is error
node.
(handle_aligned_attribute): Don't call default_conversion on
FUNCTION_DECLs.
(handle_vector_size_attribute): Likewise.
(handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
(handle_sentinel_attribute): Call default_conversion and allow even
integral types as an argument.
c/
* c-parser.c (c_parser_attributes): Parse the arguments as an
expression-list if the attribute takes identifier.
testsuite/
* c-c++-common/attributes-1.c: Move test line to a new test.
* c-c++-common/attributes-2.c: New test.
* c-c++-common/pr50459.c: New test.
* c-c++-common/pr59280.c: Add "undeclared" to dg-error.
* gcc.dg/nonnull-2.c: Likewise.
* gcc.dg/pr55570.c: Modify dg-error.
* gcc.dg/tm/wrap-2.c: Likewise.
From-SVN: r210262
2014-05-09 Richard Biener <rguenther@suse.de>
* Makefile.in (GTFILES): Remove tree-ssa-propagate.c.
* tree-ssa-propagate.c: Do not include gt-tree-ssa-propagate.h.
(interesting_ssa_edges, varying_ssa_edges): Move out of GC space.
(add_ssa_edge, process_ssa_edge_worklist, ssa_prop_init,
ssa_propagate): Adjust.
From-SVN: r210261
* mmap.c (backtrace_free): If freeing a large aligned block of
memory, call munmap rather than holding onto it.
(backtrace_vector_grow): When growing a vector, double the number
of pages requested. When releasing the old version of a grown
vector, pass the correct size to backtrace_free.
From-SVN: r210256
2014-05-08 Jeff Law <law@redhat.com>
PR tree-optimization/61009
* tree-ssa-threadedge.c (thread_through_normal_block): Return a
tri-state rather than a boolean. When a block is too big to
thread through, inform caller via negative return value.
(thread_across_edge): If a block was too big for normal threading,
then it's too big for a joiner too, so remove temporary equivalences
and return immediately.
PR tree-optimization/61009
* g++.dg/tree-ssa/pr61009.C: New test.
From-SVN: r210254
PR c/61077
c-family/
* c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
parameter type of main.
c/
* c-decl.c (start_function): Warn for _Atomic-qualified return type
of main.
testsuite/
* gcc.dg/pr61077.c: New test.
From-SVN: r210229
2014-05-08 Tobias Burnus <burnus@net-b.de>
* gfortran.h (gfc_isym_id): Add GFC_ISYM_CAF_GET
and GFC_ISYM_CAF_SEND.
* intrinsic.c (add_functions): Add only internally
accessible caf_get and caf_send functions.
* resolve.c (add_caf_get_intrinsic,
remove_caf_get_intrinsic): New functions.
(resolve_variable): Resolve expression rank and
prepare for add_caf_get_intrinsic call.
(gfc_resolve_expr): For variables, remove rank
resolution.
(resolve_ordinary_assign): Prepare call to
GFC_ISYM_CAF_SEND.
(resolve_code): Avoid call to GFC_ISYM_CAF_GET for
the LHS of an assignment.
From-SVN: r210225
/cp
2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/13981
* typeck.c (convert_for_assignment): Provide an inform for pointers
to incomplete class types.
/testsuite
2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/13981
* g++.dg/diagnostic/pr13981.C: New.
From-SVN: r210217
2014-05-08 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (vn_get_expr_for): Valueize operands before
folding the expression.
(valueize_expr): Remove.
(visit_reference_op_load): Do not valueize the result of
vn_get_expr_for.
(simplify_binary_expression): Likewise.
(simplify_unary_expression): Likewise.
From-SVN: r210211