2007-09-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
* config.gcc (powerpc*-*-*): --with-cpu=cell is a 64bit CPU.
Allow --with-tune=cell and --with-cpu=cell.
From-SVN: r128721
2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33185
* tree.c (cp_build_qualified_type_real): Build a canonical
ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
From-SVN: r128717
2007-09-24 Pranav Bhandarkar <pranav.bhandarkar@celunite.com>
Ramana Radhakrishnan <ramana@hercules.pun.celunite.com>
* tree-inline.h (eni_weights): Add field target_builtin_cost to
reflect the cost per call to a target specific builtin.
* tree-inline.c (estimate_num_insns_1): If it is a CALL_EXPR for
* a
call to a target specific builtin, then use
target_builtin_call_cost.
(init_inline_once): Initialize target_builtin_call_cost field.
Co-Authored-By: Ramana Radhakrishnan <ramana@hercules.pun.celunite.com>
From-SVN: r128714
2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33112
PR c++/33185
* tree.c (cplus_array_compare): Compare pointers, not types.
(build_cplus_array_type_1): Store new array type into the hash
table before building the canonical type; build the canonical type
correctly.
(cp_build_qualified_type_real): Put all of the array types with
cv-qualified element types into the C++ array hash table, built as
variants of the unqualified versions.
From-SVN: r128711
gcc/
fold-const.c (fold_binary): Fold BIT_AND_EXPR's with a pointer operand.
(get_pointer_modulus_and_residue): New function.
gcc/testsuite/
gcc.dg/fold-bitand-1.c: New test.
gcc.dg/fold-bitand-2.c: New test.
gcc.dg/fold-bitand-3.c: New test.
gcc.dg/fold-bitand-4.c: New test.
From-SVN: r128701
gcc/
* function.c (assign_parm_setup_block): Explicitly convert BLKmode
parameters from word_mode to the subword type if such a truncation
is not a no-op.
From-SVN: r128696
* expr.c (expand_expr_real_1) <case CALL_EXPR>: Use get_callee_fndecl
instead of checking CALL_EXPR_FN directly to test for builtins.
If error or warning attributes are present, print
error resp. warning.
* c-common.c (handle_error_attribute): New function.
(c_common_attribute_table): Add error and warning
attributes.
* doc/extend.texi: Document error and warning attributes.
* gcc.dg/va-arg-pack-len-1.c: Use error and warning
attributes.
* gcc.dg/va-arg-pack-len-2.c: New test.
* g++.dg/ext/va-arg-pack-len-1.C: Use error and warning
attributes.
* g++.dg/ext/va-arg-pack-len-2.C: New test.
From-SVN: r128687
PR middle-end/28755
* expr.c (expand_constructor): New function.
(expand_expr_real_1) <case CONSTRUCTOR>: Call it.
(expand_expr_real_1) <case ARRAY_REF>: Call it if VALUE is
CONSTRUCTOR.
* gcc.dg/pr28755.c: New test.
From-SVN: r128685
PR c++/19407
* cp/cp-tree.h (ATTR_IS_DEPENDENT): New macro.
(MAYBE_TAGGED_TYPE_P): Remove.
* cp/pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
instead of calling is_late_template_attribute again.
(tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
(tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
Don't crash on typedefs from non-template classes.
* cp/decl2.c (grokfield): Don't sorry about attrs on template parms.
(is_late_template_attribute): All attributes applied to template
parms or typename types are dependent. Static, take decl.
(splice_template_attributes): Pass decl through.
(save_template_attributes): Likewise.
* attribs.c (lookup_attribute_spec): Split out...
(decl_attributes): From here.
* tree.h: Declare it.
From-SVN: r128681
2007-09-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/33337
PR fortran/33376
* trans-decl.c (gfc_create_module_variable): Output
derived type parameters.
* arith.c (gfc_parentheses): Return the argument if
it is a constant expression.
* primary.c (gfc_match_rvalue): Remove the clearing of
the module name and the use_assoc attribute for derived
type parameter expressions.
2007-09-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/33337
* gfortran.dg/derived_comp_array_ref_3.f90: New test.
PR fortran/33376
* gfortran.dg/derived_comp_array_ref_4.f90: New test.
From-SVN: r128672
PR fortran/33502
* scanner.c (gfc_advance_line): Call debug_hooks->start_source_file
and debug_hooks->end_source_file when entering and exiting
included files.
(gfc_define_undef_line): New function.
(load_file): Ignore #define and #undef preprocessor lines
while reading source files.
* parse.c (next_statement): Handle #define and #undef
preprocessor lines.
(gfc_parse_file): Call debug_hooks->start_source_file and
debug_hooks->end_source_file for the main source file if
requested by the debug format.
* gfortran.h (gfc_define_undef_line): Add prototype.
From-SVN: r128671
2007-09-22 Richard Guenther <rguenther@suse.de>
PR tree-optimization/33146
* fold-const.c (fold_binary): Use the original tree
for negating.
* tree.h (STRIP_SIGN_NOPS): Converting from or to pointer
also changes "sign".
* gcc.c-torture/compile/pr33146.c: New testcase.
From-SVN: r128666
PR target/32325
* except.c (finish_eh_generation): Call commit_edge_insertions if
there are insns queued on the entry edge.
* config/alpha/alpha.c (alpha_gp_save_rtx): Insert the insns on
the entry edge.
From-SVN: r128665