2007-11-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29389
*resolve.c (resolve_ordinary_assign): Use find_sym_in_expr to
test if a temporary should be written for a vector subscript
on the lhs.
PR fortran/33850
* restore.c (pure_stmt_function): Add prototype and new
function. Calls impure_stmt_fcn.
(pure_function): Call it.
(impure_stmt_fcn): New function.
* expr.c (gfc_traverse_expr): Call *func for all expression
types, not just variables. Add traversal of character lengths,
iterators and component character lengths and arrayspecs.
(expr_set_symbols_referenced): Return false if not a variable.
* trans-stmt.c (forall_replace, forall_restore): Ditto.
* resolve.c (forall_index): Ditto.
(sym_in_expr): New function.
(find_sym_in_expr): Rewrite to traverse expression calling
sym_in_expr.
*trans-decl.c (expr_decls): New function.
(generate_expr_decls): Rewrite to traverse expression calling
expr_decls.
*match.c (check_stmt_fcn): New function.
(recursive_stmt_fcn): Rewrite to traverse expression calling
check_stmt_fcn.
2007-11-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29389
* gfortran.dg/stfunc_6.f90: New test.
PR fortran/33850
* gfortran.dg/assign_10.f90: New test.
From-SVN: r130472
2007-11-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/33541
*interface.c (compare_actual_formal): Exclude assumed size
arrays from the possibility of scalar to array mapping.
* decl.c (get_proc_name): Fix whitespace problem.
PR fortran/34231
* gfortran.h : Add 'use_rename' bit to symbol_attribute.
* module.c : Add 'renamed' field to pointer_info.u.rsym.
(load_generic_interfaces): Add 'renamed' that is set after the
number_use_names is called. This is used to set the attribute
use_rename, which, in its turn identifies those symbols that
have not been renamed.
(load_needed): If pointer_info.u.rsym->renamed is set, then
set the use_rename attribute of the symbol.
(read_module): Correct an erroneous use of use_flag. Use the
renamed flag and the use_rename attribute to determine which
symbols are not renamed.
2007-11-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/33541
* gfortran.dg/use_11.f90: New test.
PR fortran/34231
* gfortran.dg/generic_15.f90: New test.
From-SVN: r130471
PR target/34225
* config/rs6000/rs6000.c (adjacent_mem_locations): Don't assume
MEM_SIZE is set on all MEMs.
* gcc.dg/pr34225.c: New test.
From-SVN: r130470
2007-11-27 Andreas Krebbel <krebbel1@de.ibm.com>
* config/s390/s390.opt (mhard-float): Add the option to be
overridden. That was missing in my last patch.
From-SVN: r130469
2007-11-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34241
* tree-ssa-forwprop.c (forward_propagate_addr_expr): Make sure
to only delete real conversion chains.
* g++.dg/torture/pr34241.C: New testcase.
From-SVN: r130468
2007-11-27 Richard Guenther <rguenther@suse.de>
* builtins.c (fold_builtin_1): Verify the argument types
of BUILT_IN_ISNORMAL.
(fold_builtin_n): Verify the number of arguments to variadic
built-in functions.
* gcc.dg/builtins-error.c: New testcase.
From-SVN: r130465
PR c++/34213
* tree.c (decl_linkage): Static data members and static member
functions in anonymous ns classes are lk_external.
* g++.dg/ext/visibility/anon8.C: New test.
From-SVN: r130463
2007-11-26 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (num_put<>::_M_insert_int): When
ios_base::showpos and the type is signed and the value is zero,
prepend +.
* testsuite/22_locale/num_put/put/char/12.cc: New.
* testsuite/22_locale/num_put/put/wchar_t/12.cc: Likewise.
From-SVN: r130460
2007-11-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c/23722
* c-parser.c (struct c_parser): New bit in_if_block.
(c_parser_compound_statement_nostart): Handle unexpected 'else'
keyword.
(c_parser_statement_after_labels): Set in_if_block to false while
parsing.
(c_parser_if_body): Don't call c_parser_statement_after_labels if
a semicolon is found, just consume it. Don't call
c_parser_statement_after_labels if an open brace is found, call
c_parser_compound_statement instead.
(c_parser_else_body): New.
(c_parser_if_statement): Set in_if_block to true when parsing the
body of the 'if' statement. Use c_parser_else_body.
testsuite/
* gcc.dg/cpp/19990413-1.c: Update.
* gcc.dg/parse-else-error.c: New.
* gcc.dg/parse-else-error-2.c: New.
* gcc.dg/parse-else-error-3.c: New.
* gcc.dg/parse-else-error-4.c: New.
From-SVN: r130446
2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
PR 34081/C++
* c-decl.c (store_parm_decls): Pass 'false' for the new
allocate_struct_function parameter.
* cgraphunit.c (cgraph_build_static_cdtor): Likewise.
* tree-parloops.c (create_loop_fn): Likewise.
* function.c (push_function_context_to, push_struct_function,
init_function_start): Likewise.
(allocate_struct_function): Add boolean parameter.
* tree.h (allocate_struct_function): Add boolean parameter.
* function.h (struct function): Move returns_struct and
returns_pcc_struct to the end of the structure definiton.
2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
PR 34081/C++
* trans.c (Subprogram_Body_to_gnu, Compilation_Unit_to_gnu):
Pass 'false' for the new allocate_struct_function parameter.
* utils.c (build_function_stub): Likewise.
2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
PR 34081/C++
* decl.c (finish_method): Pass 'false' for the new
allocate_struct_function parameter.
2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
PR 34081/C++
* treetree.c (tree_code_create_function_wrapup): Pass 'false'
for the new allocate_struct_function parameter.
2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
PR 34081/C++
* decl.c (start_preparsed_function): Pass
processing_template_decl for the new allocate_struct_function
parameter.
2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
PR 34081/C++
* g++.dg/template/dependent-expr6.C: New testcase.
From-SVN: r130441
* config/mn10300/mn10300.md: (call_internal): Remove mode on
operand 0 in order to match UNPSEC'ed calls generated in PIC mode.
(call_value_internal): Remove mode on operands 0 and 1 in order to
match UNPSEC'ed calls generated in PIC mode.
(GOTaddr2picreg): Use copy_rtx to prevent sharing an rtx between
two insns.
From-SVN: r130437
2007-11-26 Richard Guenther <rguenther@suse.de>
PR middle-end/34233
* builtins.c (expand_builtin_pow): Use expand_expr to expand
the result of build_call_expr.
* gcc.dg/pr34233.c: New testcase.
From-SVN: r130436
* tree-ssa-live.c (remove_unused_scope_block_p): Drop
declarations and blocks only after inlining. Check that
non-empty blocks are not dropped.
* tree-inline.c (expand_call_inline): Check that functions are
not inlined too late.
From-SVN: r130424
2007-11-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/33152
* decl.c (add_init_expr_to_sym): Remove error message.
* resolve.c (check_data_variable): Add new check for a data variable
that has an array spec, but no ref and issue an error.
* match.c (gfc_match_common): Remove error message.
From-SVN: r130415
2007-11-25 Andreas Tobler <a.tobler@schweiz.org>
* src/closures.c: Move defintion of MAYBE_UNUSED from here to ...
* include/ffi_common.h: ... here.
Update copyright.
From-SVN: r130413
2007-11-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/34175
* gfortran.texi: Document default forms assumed for various file
extensions.
From-SVN: r130411