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
PR fortran/33288
* arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
reduce_binary_aa): Call ourselves recursively if an element of
the constructor is itself a constant array.
* gfortran.dg/array_constructor_19.f90: New test.
From-SVN: r128632
gcc/testsuite/
* lib/target-supports.exp (check_effective_target_mips64): New
procedure.
* gcc.dg/lower-subreg-1.c: Require !mips64.
* gcc.dg/sibcall-3.c (ATTR): New macro.
(recurser_void1, recurser_void2): Use it.
* gcc.dg/sibcall-4.c: As for gcc.dg/sibcall-3.c.
* gcc.dg/tree-ssa/ssa-fre-3.c: Require !mips64.
From-SVN: r128626
fortran/
* io.c (resolve_tag_format): New function using code split out
and simplified from ...
(resolve_tag): ... this function. Simplify logic. Unify
IOSTAT, IOLENGTH and SIZE handling.
testsuite/
* gfortran.dg/g77/19981216-0.f: Remove dg-warning annotation.
* gfortran.dg/io_constraints_1.f90: Make a -std=f95 test. Add
warning annotation.
* gfortran.dg/iostat_3.f90: Make a -std=f95 test.
From-SVN: r128623