OSDN Git Service

2007-07-24 Paul Thomas <pault@gcc.gnu.org>
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 Jul 2007 19:16:36 +0000 (19:16 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 Jul 2007 19:16:36 +0000 (19:16 +0000)
commit26e7468d21d2693cb887bde8efcd4ded76ee053b
treeb9d7a81ed4436258359f8fd5b4bfab4cd86b6c24
parent1e853e89b0d27d166ff492cfc1a2b2964e905728
2007-07-24 Paul Thomas <pault@gcc.gnu.org>

PR fortran/31205
PR fortran/32842
* trans-expr.c (gfc_conv_function_call): Remove the default
initialization of intent(out) derived types.
* symbol.c (gfc_lval_expr_from_sym): New function.
* matchexp.c (gfc_get_parentheses): Return argument, if it is
character and posseses a ref.
* gfortran.h : Add prototype for gfc_lval_expr_from_sym.
* resolve.c (has_default_initializer): Move higher up in file.
(resolve_code): On detecting an interface assignment, check
if the rhs and the lhs are the same symbol.  If this is so,
enclose the rhs in parenetheses to generate a temporary and
prevent any possible aliasing.
(apply_default_init): Remove code making the lval and call
gfc_lval_expr_from_sym instead.
(resolve_operator): Give a parentheses expression a type-
spec if it has no type.
* trans-decl.c (gfc_trans_deferred_vars): Apply the a default
initializer, if any, to an intent(out) derived type, using
gfc_lval_expr_from_sym and gfc_trans_assignment.  Check if
the dummy is present.

2007-07-24 Paul Thomas <pault@gcc.gnu.org>

PR fortran/31205
* gfortran.dg/alloc_comp_basics_1.f90 : Restore number of
"deallocates" to 24, since patch has code rid of much spurious
code.
* gfortran.dg/interface_assignment_1.f90 : New test.

PR fortran/32842
* gfortran.dg/interface_assignment_2.f90 : New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126886 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/testsuite/gfortran.dg/interface_assignment_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/interface_assignment_2.f90 [new file with mode: 0644]