gcc/cp/
PR c++/48320
* pt.c (template_parameter_pack_p): Support TEMPLATE_PARM_INDEX
nodes. Add a comment.
(arg_from_parm_pack_p): New static function, factorized out from
tsubst_pack_expansion and extended to support non-type parameter
packs represented with TEMPLATE_PARM_INDEX nodes.
(tsubst_pack_expansion): Use arg_from_parm_pack_p.
gcc/testsuite/
PR c++/48320
* g++.dg/cpp0x/variadic116.C: New test case.
From-SVN: r178811
PR target/50358
* config/avr/predicates.md (const_1_to_6_operand): New predicate.
* config/avr/avr.md: (extend_s): New code attribute.
(mul_r_d): New code attribute.
(*maddqihi4, *umaddqihi4): New insns.
(*msubqihi4, *umsubqihi4): New insns.
(*usmaddqihi4, *sumaddqihi4): New insns.
(*usmsubqihi4, *susubdqihi4): New insns.
(*umaddqihi4.uconst, *maddqihi4.sconst): New insn-and-splits.
(*umsubqihi4.uconst, *msubqihi4.sconst): New insn-and-splits.
(*umsubqihi4.uconst.ashift): New insn-and-split.
(*msubqihi4.sconst.ashift): New insn-and-split.
(*sumaddqihi4.uconst): New insn-and-split.
(*sumsubqihi4.uconst): New insn-and-split.
* config/avr/avr.c (avr_rtx_costs): Report costs of above in case
PLUS:HI and MINUS:HI.
From-SVN: r178806
PR bootstrap/50010
* dwarf2cfi.c (add_cfis_to_fde): Ignore non-active insns in between
NOTE_INSN_CFI notes, with the exception of
NOTE_INSN_SWITCH_TEXT_SECTIONS.
From-SVN: r178795
gcc/
2011-09-11 Bernd Schmidt <bernds@codesourcery.com>
Richard Sandiford <rdsandiford@googlemail.com>
* config/mips/mips.c (mips_epilogue): New structure.
(mips16e_save_restore_reg): Queue REG_CFA_RESTORE notes when
restoring registers.
(mips_epilogue_emit_cfa_restores): New function.
(mips_epilogue_set_cfa): Likewise.
(mips_restore_reg): Queue REG_CFA_RESTORE notes. When restoring
the current CFA register from the stack, redefine the CFA in terms
of the stack pointer.
(mips_expand_epilogue): Set up mips_epilogue. Attach CFA information
to the epilogue instructions.
gcc/testsuite/
* gcc.target/mips/mips.exp (mips_option_groups): Add debug options.
* gcc.target/mips/interrupt_handler-2.c: New test.
* gcc.target/mips/interrupt_handler-3.c: Likewise.
From-SVN: r178794
* pt.c (type_unification_real): Fix handling of DEDUCE_CONV
with no deducible template parameters.
* call.c (rejection_reason_code): Add rr_template_conversion.
(print_z_candidate): Handle it.
(template_conversion_rejection): New.
(build_user_type_conversion_1): Use it.
From-SVN: r178791
* call.c (merge_conversion_sequences): Set bad_p and user_conv_p
on all of the second conversion sequence.
(build_user_type_conversion_1): Set bad_p on the ck_user conv.
(convert_like_real): Handle bad ck_ref_bind with user_conv_p in the
first section. Fix loop logic.
(initialize_reference): Call convert_like for diagnostics when
we have a (bad) conversion.
From-SVN: r178790
PR rtl-optimization/50212
* bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges):
Skip also lps with NULL landing_pad or non-LABEL_P landing_pad.
* g++.dg/other/pr50212.C: New test.
From-SVN: r178785
PR debug/50299
* calls.c (load_register_parameters): Use use_reg_mode instead
of use_reg when adding a single register CALL_INSN_FUNCTION_USAGE
entry.
(expand_call): Set EXPR_LIST mode to TYPE_MODE of the argument
for stack CALL_INSN_FUNCTION_USAGE uses.
* expr.h (use_reg_mode): New prototype.
(use_reg): Changed into inline around use_reg_mode.
* expr.c (use_reg): Renamed to...
(use_reg_mode): ... this. Added MODE argument, set EXPR_LIST
mode to that mode instead of VOIDmode.
* var-tracking.c (prepare_call_arguments): Don't track parameters
whose EXPR_LIST mode is VOIDmode, BLKmode or X mode isn't convertible
to it using lowpart_subreg. Convert VALUE and REG/MEM to the
EXPR_LIST mode.
From-SVN: r178784
gcc/
PR target/43746
* config/avr/avr.c (AVR_SECTION_PROGMEM): New Define.
(progmem_section): New Variable.
(avr_asm_init_sections): Initialize it.
(TARGET_ASM_SELECT_SECTION): Define to...
(avr_asm_select_section): ... this new Function.
(avr_replace_prefix): New Function.
(avr_asm_function_rodata_section): Use it.
(avr_insert_attributes): Don't add section attribute for PROGMEM.
(avr_section_type_flags): Use avr_progmem_p instead of section
name to detect if object is in PROGMEM.
(avr_asm_named_section): Set section name prefix for objects in
PROGMEM.
testsuite/
PR target/43746
* testsuite/gcc.target/avr/torture/avr-torture.exp
(AVR_TORTURE_OPTIONS): Add test cases "-O2 -fdata-sections" and
"-O2 -fmerge-all-constants".
From-SVN: r178779
2011-09-12 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50343
* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Check
that the reduction is over an SSA name before checking its
definition.
From-SVN: r178775
2011-09-11 Daniel Krugler <daniel.kruegler@googlemail.com>
PR libstdc++/50159
* include/std/tuple (tuple_cat): Reimplement according to the
resolution of LWG 1385.
* include/std/type_traits: Define __and_ and __or_ for zero
arguments too; minor tweaks.
* testsuite/20_util/tuple/creation_functions/tuple_cat.cc: New.
* testsuite/20_util/tuple/creation_functions/constexpr.cc: Disable
for now tuple_cat test.
* testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error
line numbers.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Likewise.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
Likewise.
* doc/xml/manual/status_cxx200x.xml: Update.
From-SVN: r178770
2011-09-11 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/50327
* frontend-passes.c (dummy_expr_callback): New function.
(convert_do_while): New function.
(optimize_namespace): Call code walker to convert do while loops.
2011-09-11 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/50327
* gfortran.dg/do_while_1.f90: New test.
From-SVN: r178768
* gcc-interface/utils.c (maybe_unconstrained_array): In the reference
to unconstrained array case, deal with each branch of a COND_EXPR.
* gcc-interface/utils2.c (build_allocator): Deal with each branch of
a COND_EXPR in the initializer, if present.
From-SVN: r178766
* gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
of an addressable type.
* gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
Deal with those cases for which creating a temporary is mandatory.
From-SVN: r178764
* gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
this is a real formal parameter before testing whether it is by ref.
From-SVN: r178763
* gcc-interface/trans.c (build_return_expr): Use void_type_node for
MODIFY_EXPR.
* gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
the result type is null if ENABLE_CHECKING. Set operation_type at the
end unconditionally if not set in the previous cases.
Use build2 and void_type_node for MODIFY_EXPR.
(build_allocator): Use NULL_TREE for MODIFY_EXPR.
From-SVN: r178761