PR c++/49045
Core 1321
* tree.c (dependent_name): New.
(cp_tree_equal): Two calls with the same dependent name are
equivalent even if the overload sets are different.
From-SVN: r177998
* tree.c (build_target_expr): Set TREE_CONSTANT on
literal TARGET_EXPR if the value is constant.
* typeck2.c (build_functional_cast): Don't set it here.
From-SVN: r177997
PR c++/50158
* typeck.c (cp_build_modify_expr): Call mark_rvalue_use on rhs
if it has side-effects and needs to be preevaluated.
* g++.dg/warn/Wunused-var-16.C: New test.
From-SVN: r177992
PR middle-end/50161
* simplify-rtx.c (simplify_const_unary_operation): If
op is CONST_INT, don't look at op_mode, but use instead
mode.
* optabs.c (add_equal_note): For FFS, CLZ, CTZ,
CLRSB, POPCOUNT, PARITY and BSWAP use operand mode for
operation and TRUNCATE/ZERO_EXTEND if needed.
* doc/rtl.texi (ffs, clrsb, clz, ctz, popcount, parity, bswap):
Document that operand mode must be same as operation mode,
or VOIDmode.
* config/avr/avr.md (paritysi2, *parityqihi2.libgcc,
*paritysihi2.libgcc, popcountsi2, *popcountsi2.libgcc,
*popcountqihi2.libgcc, clzsi2, *clzsihi2.libgcc, ctzsi2,
*ctzsihi2.libgcc, ffssi2, *ffssihi2.libgcc): For unary ops
use the mode of operand for the operation and add truncate
or zero_extend around if needed.
* config/c6x/c6x.md (ctzdi2): Likewise.
* config/bfin/bfin.md (clrsbsi2, signbitssi2): Likewise.
* gcc.dg/pr50161.c: New test.
From-SVN: r177991
PR c++/46862
* class.c (finish_struct_1): If TYPE_TRANSPARENT_AGGR is set on a type
which doesn't have any fields, clear it and diagnose.
* g++.dg/dfp/nofields.C: New test.
From-SVN: r177987
2011-08-23 Richard Guenther <rguenther@suse.de>
* tree-data-ref.c (dr_analyze_indices): Add comments, handle
REALPART_EXPR and IMAGPART_EXPR similar to ARRAY_REFs.
(create_data_ref): Also dump access functions for the created
data-ref.
From-SVN: r177983
* config/i386/64/sfp-machine.h (ASM_INVALID): New define.
(ASM_DIVZERO): Ditto.
(FP_HANLDE_EXCEPTIONS): Use ASM_INVALID and ASM_DIVZERO.
From-SVN: r177978
Use it to force BUILTINS_LOCATION when declaring builtins instead of creating a <built-in> entry in the line_table which is wrong.
* c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
defined in cpp_init_builtins and c_cpp_builtins.
gcc/fortran/ChangeLog
* cpp.c (gfc_cpp_init): Force BUILTINS_LOCATION for tokens
defined in cpp_define_builtins.
libcpp/ChangeLog
* init.c (cpp_create_reader): Inititalize forced_token_location_p.
* internal.h (struct cpp_reader): Add field forced_token_location_p.
* lex.c (_cpp_lex_direct): Use forced_token_location_p.
(cpp_force_token_locations): New.
(cpp_stop_forcing_token_locations): New.
From-SVN: r177973
* config/m32c/m32c.h (CLASS_MAX_NREGS): Remove macro.
* config/m32c/m32c-protos.h (m32c_class_max_nregs): Remove.
* config/m32c/m32c.c (m32c_class_max_nregs): Make static. Change
regclass argument type to reg_class_t. Change 'max' and 'v' vars
and return types to unsigned char. Use reg_class_contents instead
of class_contents.
(TARGET_CLASS_MAX_NREGS): Define.
From-SVN: r177971
PR tree-optimization/50133
* tree-vect-stmts.c (vect_finish_stmt_generation): Copy location
from stmt instead of some statement around gsi.
* gcc.dg/pr50133.c: New test.
From-SVN: r177958
PR middle-end/50141
* expr.c (get_bit_range): Only use DECL_THREAD_LOCAL_P if
innerdecl is a VAR_DECL.
* c-c++-common/cxxbitfields-6.c: New test.
From-SVN: r177957
2011-08-22 Richard Guenther <rguenther@suse.de>
PR testsuite/50145
* gcc.dg/torture/pr50067-1.c: Run on little-endian systems only.
* gcc.dg/torture/pr50067-2.c: Likewise.
From-SVN: r177952
2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/47659
* expr.c (gfc_check_assign): Check for type conversions when the
right-hand side is a constant REAL/COMPLEX contstant the left-hand
side is also REAL/COMPLEX. Don't warn when a narrowing conversion
for REAL does not change the value of the constant.
2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/47659
* gfortran.dg/warn_conversion_2.f90: Also warn about conversion
of a constant resulting from simplification.
* gfortran.dg/warn_conversion_3.f90: New test.
From-SVN: r177942
2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/50130
* resolve.c (resolve_array_ref): Don't calculate upper bound
if the stride is zero.
2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/50130
* gfortran.dg/zero_stride_1.f90: New test.
From-SVN: r177940
2011-08-20 Vladimir Makarov <vmakarov@redhat.com>
* ira-lives.c (mark_pseudo_regno_subword_live): Use allocno class
for ira_reg_class_max_nregs. Increase pressure by 1.
(mark_pseudo_regno_subword_dead): Use allocno class
for ira_reg_class_max_nregs.
From-SVN: r177939
gcc/
* config/mips/mips.c (mips_class_max_nregs): Check that the mode is
OK for ST_REGS and FP_REGS before taking those classes into account.
From-SVN: r177931