2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/37004
cp/
* typeck.c (cp_common_type): New. The same as
type_after_usual_arithmetic_conversions but without promotions.
(type_after_usual_arithmetic_conversions): Do the promotions and
call cp_common_type.
(common_type): Make it behave like the C version of this
function. Do not handle pointer types.
(common_pointer_type): Move handling of pointer types from
common_type to here.
(cp_build_binary_op): Use common_pointer_type instead of
common_type in call to pointer_diff.
Use cp_common_type instead of common_type.
* cp-tree.h (common_pointer_type): Declare.
testsuite/
* g++.dg/warn/Wconversion-pr34389.C: Remove XFAIL.
From-SVN: r141233
2008-10-19 Jerry DeLisle <jvdelisle@gcc.gnu.org
PR libfortran/37834
* io/write_float.def (output_float): Emit '0.' for special case of
format specifier 'f0.0' and value of zero. Likewise emit '0' for 'f1.0'.
From-SVN: r141231
2008-10-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/37723
* dependency.c (gfc_dep_resolver ): If we find equal array
element references, go on to the next reference.
2008-10-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/37723
* gfortran.dg/dependency_22.f90: New test.
From-SVN: r141221
2008-10-18 Douglas Gregor <doug.gregor@gmail.com>
* include/bits/stl_pair.h (__may_be_null_pointer_init): New.
(pair::pair): Eliminate the redundant pair(U1&&, U2&&) constructor.
Add lvalue pair<U1, U2> constructor to handle non-const pair lvalues.
Remove the old variadic constructor, and instead provide several
variadic constructors that avoid failing when attempting to
initialize a pointer from a null pointer constant.
* testsuite/20_util/pair/moveable.cc (test3): Add new tests with
initialization of pointers from the null pointer constant.
From-SVN: r141214
* config/i386/i386.md (unnamed peephole2): Do not force memory
operands of arith or logical instructions into registers for
non-TARGET_READ_MODIFY targets.
(ffs_cmove): Change operand 0 predicate to register_operand.
Change operand 1 predicate to nonimmediate_operand.
(ffsdi2): Ditto.
(*ffs_no_cmove): Change operand 0 predicate to register_operand.
From-SVN: r141213
2008-10-18 Richard Guenther <rguenther@suse.de>
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Guard
VIEW_CONVERT_EXPR case against invalid gimple.
From-SVN: r141212
* gcc-interface/trans.c (gnat_to_gnu) <N_Slice>: Simplify expansion
to use only a single check instead of three, and avoid unnecessary
COMPOUND_EXPR.
(emit_check): Avoid useless COMPOUND_EXPRs and SAVE_EXPRs, sometimes
creating more opportunities for optimizations.
From-SVN: r141198
2008-10-16 Edward Smith-Rowland <3dw4rd@verizon.net>
* include/bits/forward_list.h: Factor list construction to dispatch
routines.
* include/bits/forward_list.tcc: Likewise.
* testsuite/23_containers/forward_list/modifiers/2.cc:
From-SVN: r141189
2008-10-16 Thomas Koenig <tkoenig@gcc.gnu.org>
* io/file_pos.c (unformatted_backspace): Normal case is
GFC_CONVERT_NATIVE.
* io/transfer.c (read_sf): Mark paths leading to generate_error()
as unlikely.
(readl_block_form): Likewise.
(read_block_direct): Likewise.
(write_block): Likewise.
(write_buf): Likewise.
(us_read): Likewise. Normal case is GFC_CONVERT_NATIVE.
(next_record_w_unf): Mark paths leading to generate_error()
as unlikely.
From-SVN: r141179
PR c/33192
* c-typeck.c (build_unary_op): Use omit_one_operand for
IMAGPART_EXPR of real argument.
testsuite:
* gcc.dg/imag-1.c: New test.
From-SVN: r141176
2008-10-16 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/forward_list.h (_Fwd_list_base<>::_M_insert_after):
Move out of line, tweak to return _Fwd_list_node_base*.
(forward_list<>::insert_after(const_iterator, const _Tp&),
forward_list<>::insert_after(const_iterator, _Tp&&)): Use it.
* include/bits/forward_list.tcc (_Fwd_list_base<>::_M_insert_after):
Define.
* include/bits/forward_list.h (forward_list<>): Consistently qualify
calls of base class functions with this->.
* include/bits/forward_list.tcc (forward_list<>): Likewise.
* include/bits/forward_list.h: Move some functions out of line...
* include/bits/forward_list.tcc: ... here.
* include/bits/forward_list.h (forward_list<>::resize(size_type)): Fix.
From-SVN: r141168
2008-10-16 Joseph Myers <joseph@codesourcery.com>
Richard Guenther <rguenther@suse.de>
PR middle-end/37418
* tree-ssa.c (useless_type_conversion_p_1): Do not treat
volatile qualified functions or methods as relevant.
* gcc.c-torture/compile/pr37418-1.c,
gcc.c-torture/compile/pr37418-2.c,
gcc.c-torture/compile/pr37418-3.c,
gcc.c-torture/compile/pr37418-4.c: New tests.
From-SVN: r141165
PR tree-optimization/37525
* tree.c (int_fits_type_p): Rewrite using double_int. Zero extend
sizetype unsigned constants, both in the case of C and bounds.
From-SVN: r141164
2008-10-15 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/37535
* ira-lives.c (mark_early_clobbers): Remove.
(make_pseudo_conflict, check_and_make_def_use_conflicts,
check_and_make_def_conflicts,
make_early_clobber_and_input_conflicts,
mark_hard_reg_early_clobbers): New functions.
(process_bb_node_lives): Call
make_early_clobber_and_input_conflicts and
mark_hard_reg_early_clobbers. Make hard register inputs live
again.
* doc/rtl.texi (clobber): Change descriotion of RA behaviour for
early clobbers of pseudo-registers.
From-SVN: r141160
2008-10-15 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/37674
* ira-build.c (ira_flattening): Recalculate
ALLOCNO_TOTAL_NO_STACK_REG_P and ALLOCNO_TOTAL_CONFLICT_HARD_REGS
from the scratch instead of the propagation.
From-SVN: r141159