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
2007-09-21 Paul Thomas <pault@gcc.gnu.org>
*trans-expr.c (gfc_trans_pointer_assignment): Convert array
descriptor for subref pointer assignements, rather than using
the loop info version.
From-SVN: r128651
2007-09-21 Olivier Hainque <hainque@adacore.com>
ada/
* utils.c (type_for_nonaliased_component_p): Return false for
all AGGREGATE_TYPEs.
testsuite/
* gnat.dg/nested_subtype_byref.ad[bs]: Part of new test.
* gnat.dg/test_nested_subtype_byref.adb: New test.
From-SVN: r128650
2007-09-21 Richard Guenther <rguenther@suse.de>
PR tree-optimization/33508
* tree-ssa-alias.c (mark_aliases_call_clobbered): Avoid
quadratic loop by keeping a bitmap of variables we have
to clobber all subvariables for.
(set_initial_properties): Likewise.
From-SVN: r128645
* c-decl.c (finish_declspecs): When _Sat is used without
_Fract or _Accum, set the default type to cts_fract.
This avoids a warning of "type defaults to int".
Co-Authored-By: Chao-ying Fu <fu@mips.com>
From-SVN: r128642
PR libfortran/23272
* io/unix.c (id_from_handle, id_from_path, id_from_fd): New
functions.
(compare_file_filename, find_file, find_file0): Use the new
functions above.
* gfortran.dg/inquire_10.f90: New test.
From-SVN: r128636