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
* config/mn10300/mn10300.c (mn10300_split_and_operand_count):
Return a positive value to indicate that the bits at the
bottom of the register should be cleared.
From-SVN: r178724
2011-09-09 Richard Guenther <rguenther@suse.de>
PR middle-end/50333
* tree-data-ref.c (split_constant_offset): Do not try to handle
ternary ops.
* gcc.dg/torture/pr50333.c: New testcase.
From-SVN: r178720
* gcc-interface/utils.c (unchecked_convert): Use a field of the right
precision when converting to or from an integral type whose precision
is not equal to its size.
From-SVN: r178711
2011-09-08 Andrew Stubbs <ams@codesourcery.com>
PR tree-optimization/50318
gcc/
* tree-ssa-math-opts.c (convert_plusminus_to_widen): Correct
typo in use of mult_rhs1 and mult_rhs2.
gcc/testsuite/
* gcc.target/arm/pr50318-1.c: New file.
From-SVN: r178708
2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
* trans-array.c (gfc_trans_constant_array_constructor): Remove
superfluous initialisation of DIM field.
(gfc_trans_array_constructor): Assert that DIMEN field is properly set.
(gfc_conv_expr_descriptor): Ditto.
* trans-expr.c (gfc_conv_procedure_call): Ditto.
From-SVN: r178698
gcc/
* c-decl.c (lookup_name): Use the new
maybe_record_typedef_use.
(pushdecl): Use the new
record_locally_defined_typedef.
(store_parm_decls): Allocate cfun->language.
(finish_function): Use the new maybe_warn_unused_local_typedefs,
and free cfun->language.
(c_push_function_context): Allocate cfun->language here only if
needed.
(c_pop_function_context): Likewise, mark cfun->language
for collection only when it should be done.
* c-common.c (handle_used_attribute): Don't ignore TYPE_DECL
nodes.
* c-typeck.c (c_expr_sizeof_type, c_cast_expr): Use the new
maybe_record_local_typedef_use.
gcc/c-family
* c-common.h (struct c_language_function::local_typedefs): New
field.
(record_locally_defined_typedef, maybe_record_typedef_use)
(maybe_warn_unused_local_typedefs): Declare new functions.
* c-common.c (record_locally_defined_typedef)
(maybe_record_typedef_use)
(maybe_warn_unused_local_typedefs): Define new functions.
* c.opt: Declare new -Wunused-local-typedefs flag.
gcc/cp
* name-lookup.c (pushdecl_maybe_friend_1): Use the new
record_locally_defined_typedef.
* decl.c (finish_function): Use the new
maybe_warn_unused_local_typedefs.
(grokfield): Use the new record_locally_defined_typedef.
* parser.c (lookup_name): Use the new maybe_record_typedef_use.
gcc/doc/
* invoke.texi: Update documentation for -Wunused-local-typedefs.
gcc/testsuite/
* g++.dg/warn/Wunused-local-typedefs.C: New test file.
* c-c++-common/Wunused-local-typedefs.c: Likewise.
libstdc++-v3/
* include/ext/bitmap_allocator.h
(__detail::__mini_vector::__lower_bound): Remove unused typedef.
* src/istream.cc (std::operator>>(basic_istream<char>& __in,
basic_string<char>& __str)): Likewise.
(std::getline): Likewise.
* src/valarray.cc (__valarray_product): Likewise.
From-SVN: r178692