PR c++/42061
* call.c (reference_binding): Return NULL for initializer list with
error operand inside of it.
* g++.dg/cpp0x/initlist27.C: New test.
From-SVN: r154238
PR c++/42059
* typeck.c (cp_build_modify_expr): For initializer list call
check_array_initializer to make sure lhs isn't a VLA.
* g++.dg/cpp0x/initlist26.C: New test.
From-SVN: r154237
PR c++/13950, DR 176
* search.c (lookup_field_r): Allow lookup to find the
injected-class-name from a template base.
(template_self_reference_p): Remove.
* decl.c (make_typename_type): Diagnose ambiguity. Use
maybe_get_template_decl_from_type_decl.
* parser.c (cp_parser_template_name): Pass true to is_template
rather than use maybe_get_template_decl_from_type_decl.
(cp_parser_lookup_name): Use maybe_get_template_decl_from_type_decl.
* pt.c (maybe_get_template_decl_from_type_decl): Handle ambiguity.
Use DECL_SELF_REFERENCE_P.
* parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
Avoid duplicate ambiguity error.
* error.c (dump_decl): Don't say "typedef" for injected-class-name.
* pt.c (convert_template_argument): Tweak logic.
From-SVN: r154223
* tree-cfg.c (gimple_redirect_edge_and_branch) <case GIMPLE_ASM>:
Create the decl label for the new dest block on demand. Require
a fallthrough edge if no asm labels were redirected.
From-SVN: r154213
* config/i386/i386.md (cbranchsi4): Use nonimmediate_operand for
operand 1 predicate.
(cstoresi4): Ditto for operand 2.
(cbranch<mode>4): Macroize expander from cbranch{qi,hi,si,di,ti}4
patterns using SDWIM mode iterator.
(cstore<mode>4): Macroize expander from cstore{qi,hi,si,di}4 patterns
using SWIM mode iterator.
(cmpdi_1): Rename from cmpdi_1_rex64.
(cmp<mode>_1): Macroize expander from cmp{si,di}_1 patterns using
SWI48 mode iterator.
(*cmp<mode>_1): Macroize insn from *cmp{qi,hi,si,di}_1_insn using SWI
mode iterator.
(*cmp<mode>_ccno_1): Ditto from *cmp{qi,hi,si,di}_ccno_1.
(*cmp<mode>_minus_1): Ditto from *cmp{qi,hi,si,di}_minus_1.
(*cmpqi_ext_3_insn): Make private.
(*cmpqi_ext_3_insn_rex64): Make private.
(cmpstrnsi): Update for renamed cmpdi_1_rex64.
* config/i386/predicates.md (cmpsi_operand): Remove.
From-SVN: r154212
* configure.ac: Add libelf to host_libs. Enable in-tree configury
of ppl and cloog. Fix in-tree configury of libelf, skip tests.
Fix portability of test of C++ as bootstrap language. Add
ppl/src/ppl-config.o to the bootstrap compare exclusion list.
* configure: Rebuild.
* Makefile.def: Drop host and target settings from gmp, mpfr, ppl,
and cloog. Fix in-tree ppl configuration. Introduce libelf
in-tree building.
* Makefile.tpl (POSTSTAGE1_CXX_EXPORT): New.
(POSTSTAGE1_HOST_EXPORTS): Use it.
(STAGE[+id+]_CXXFLAGS): New.
(BASE_FLAGS_TO_PASS): Pass it down.
(configure-stage[+id+]-[+prefix+][+module+]): Use it. Add
extra_exports.
(all-stage[+id+]-[+prefix+][+module+]): Likewise.
(configure-[+prefix+][+module+], all-[+prefix+][+module+]): Add
extra_exports.
* Makefile.in: Rebuild.
From-SVN: r154211
* cgraphbuild.c (compute_call_stmt_bb_frequency): Use proper ENTRY_BLOCK_PTR.
* cgraph.c (cgraph_clone_edge): Avoid freq_scale 0 to completely zero out all
callees.
* cgraphunit.c (verify_cgraph_node): Verify cgraph nodes for frequency and count match.
* ipa-inline.c (update_noncloned_frequencies): New function.
(cgraph_clone_inlined_nodes): Use it.
* tree-inline.c (copy_bb): Fix frequency scaling; output
diagnostic on frequency mismatches to dump file.
(initialize_cfun): Do not scale frequency; fix count scaling;
initialize entry and exit block frequencies; copy profile
info.
(copy_cfg_body): Use frequency_scale as argument;
fix count scaling.
(copy_body): Use frequency_scale as argument.
(expand_call_inline): Compute frequency scale and output diagnostic
to dump file.
(delete_unreachable_blocks_update_callgrah): Remove checking that
has to be done after edge redirection.
(tree_function_versioning): Update initialize_cfun and copy_body call.
From-SVN: r154205
cp/
2009-11-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/42055
* pt.c (determine_specialization): Assign to candidates the return
value of the chainon called before print_candidates.
testsuite/
2009-11-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/42055
* testsuite/g++.dg/template/crash92.C: New.
From-SVN: r154202
cp/
2009-11-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/32056
* decl.h (enum decl_context): Add TPARM enumerator.
* decl.c (grokdeclarator): Per 14.1/2, error out if a storage class
is specified in a template parameter declaration.
* parser.c (cp_parser_template_parameter): Call grokdeclarator with
TPARM as third argument.
testsuite/
2009-11-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/32056
* testsuite/g++.dg/template/error44.C: New.
From-SVN: r154198
2009-11-15 Janus Weil <janus@gcc.gnu.org>
PR fortran/42048
* match.c (gfc_match_call): If we're inside a function with derived
type return value, allow calling a TBP of the result variable.
2009-11-15 Janus Weil <janus@gcc.gnu.org>
PR fortran/42048
* gfortran.dg/typebound_call_11.f03: New test.
From-SVN: r154190
* config/i386/predicates.md (call_register_no_elim_operand):
New predicate. Reject stack register as valid call operand
for 32bit targets.
(call_insn_operand): Use call_register_no_elim_operand.
From-SVN: r154178
2009-11-13 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/forward_list.h (forward_list<>::erase_after):
Change signature per N2988, return void; simplify.
(_Fwd_list_base<>::_M_erase_after): Likewise return void.
(forward_list<>::~forward_list): Do not call _M_erase_after
unnecessarily, the base class destructor already does it.
(forward_list<>::splice_after(const_iterator position,
forward_list&&, const_iterator i): Check position != i and
position != ++i.
* include/bits/forward_list.tcc (_Fwd_list_base<>::
_M_erase_after(typename _Node_base::_Pointer): Simplify.
(_Fwd_list_base<>::_M_erase_after(typename _Node_base::_Pointer,
typename _Node_base::_Pointer): Fix (remove the correct range
of element) and simplify (update __pos->_M_next at the end).
* testsuite/23_containers/forward_list/modifiers/3.cc: Adjust
and extend.
* testsuite/23_containers/forward_list/ext_pointer/
modifiers/3.cc: Likewise.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Tweak dg-error line numbers.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Likewise.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Likewise.
From-SVN: r154174
PR middle-end/42029
* gimplify.c (gimplify_omp_atomic): Set DECL_GIMPLE_REG_P on
tmp_load if needed.
* libgomp.c/pr42029.c: New test.
From-SVN: r154161
2009-11-13 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/algorithm: Include <utility>, per UK-300.
* include/bits/stl_algobase.h: Don't do it here.
From-SVN: r154152
PR c++/11987
* parser.c (cp_parser_direct_declarator): Give helpful error about
trying to define member of a dependent typedef.
* pt.c (resolve_typename_type): Don't resolve a typedef typename.
* tree.c (typedef_variant_p): New.
* cp-tree.h: Declare it.
From-SVN: r154149