OSDN Git Service

2011-01-08 Paul Thomas <pault@gcc.gnu.org>
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 8 Jan 2011 19:17:03 +0000 (19:17 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 8 Jan 2011 19:17:03 +0000 (19:17 +0000)
commit8b0a2e8540879c8a6aec07b5d522782657301dde
tree6cbb30f180525c7412d32456d32db59b7e9882aa
parenteb5a8b64fb814c3f48e47972647496b7dfe1ea10
2011-01-08  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/46896
* trans-expr.c (gfc_conv_procedure_call): With a non-copying
procedure argument (eg TRANSPOSE) use a temporary if there is
any chance of aliasing due to host or use association.
(arrayfunc_assign_needs_temporary): Correct logic for function
results and do not use a temporary for implicitly PURE
variables.  Use a temporary for Cray pointees.
* symbol.c (gfc_add_save): Explicit SAVE not compatible with
implicit pureness of containing procedure.
* decl.c (match_old_style_init, gfc_match_data): Where decl
would fail in PURE procedure, set implicit_pure to zero.
* gfortran.h : Add implicit_pure to structure symbol_attr and
add prototype for function gfc_implicit_pure.
* expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
Where decl would fail in PURE procedure, reset implicit_pure.
* io.c (match_vtag, gfc_match_open, gfc_match_close,
gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
* match.c (gfc_match_critical, gfc_match_stopcode,
sync_statement, gfc_match_allocate, gfc_match_deallocate): The
same.
* parse.c (decode_omp_directive): The same.
(parse_contained): If not PURE, set implicit pure attribute.
* resolve.c (resolve_formal_arglist, resolve_structure_cons,
resolve_function, resolve_ordinary_assign) : The same.
(gfc_implicit_pure): New function.
* module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
to ab_attribute enum and use it in this function.

2011-01-08  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/46896
* gfortran.dg/transpose_optimization_2.f90 : New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168600 138bc75d-0d04-0410-961f-82ee72b054a4
13 files changed:
gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/fortran/expr.c
gcc/fortran/gfortran.h
gcc/fortran/io.c
gcc/fortran/match.c
gcc/fortran/module.c
gcc/fortran/parse.c
gcc/fortran/resolve.c
gcc/fortran/symbol.c
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/transpose_optimization_2.f90 [new file with mode: 0644]