2006-10-19 Paul Thomas <pault@gcc.gnu.org> PR fortran/29216 PR fortran/29314 * gfortran.h : Add EXEC_INIT_ASSIGN. * dump-parse-tree.c (gfc_show_code_node): The same. * trans-openmp.c (gfc_trans_omp_array_reduction): Set new argument for gfc_trans_assignment to false. * trans-stmt.c (gfc_trans_forall_1): The same. * trans-expr.c (gfc_conv_function_call, gfc_trans_assign, gfc_trans_arrayfunc_assign, gfc_trans_assignment): The same. In the latter function, use the new flag to stop the checking of the lhs for deallocation. (gfc_trans_init_assign): New function. * trans-stmt.h : Add prototype for gfc_trans_init_assign. * trans.c (gfc_trans_code): Implement EXEC_INIT_ASSIGN. * trans.h : Add new boolean argument to the prototype of gfc_trans_assignment. * resolve.c (resolve_allocate_exp): Replace EXEC_ASSIGN by EXEC_INIT_ASSIGN. (resolve_code): EXEC_INIT_ASSIGN does not need resolution. (apply_default_init): New function. (resolve_symbol): Call it for derived types that become defined but which do not already have an initialization expression.. * st.c (gfc_free_statement): Include EXEC_INIT_ASSIGN. 2006-10-19 Paul Thomas <pault@gcc.gnu.org> PR fortran/29216 * gfortran.dg/result_default_init_1.f90: New test. PR fortran/29314 * gfortran.dg/automatic_default_init_1.f90: New test. * gfortran.dg/alloc_comp_basics_1.f90: Reduce deallocate count from 38 to 33. From-SVN: r117879
72 lines
2.4 KiB
C
72 lines
2.4 KiB
C
/* Header for statement translation functions
|
|
Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
|
|
Contributed by Paul Brook
|
|
|
|
This file is part of GCC.
|
|
|
|
GCC is free software; you can redistribute it and/or modify it under
|
|
the terms of the GNU General Public License as published by the Free
|
|
Software Foundation; either version 2, or (at your option) any later
|
|
version.
|
|
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with GCC; see the file COPYING. If not, write to the Free
|
|
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
|
02110-1301, USA. */
|
|
|
|
/* Statement translators (gfc_trans_*) return a fully translated tree.
|
|
Calls gfc_trans_*. */
|
|
tree gfc_trans_code (gfc_code *);
|
|
|
|
/* All other gfc_trans_* should only need be called by gfc_trans_code */
|
|
|
|
/* trans-expr.c */
|
|
tree gfc_trans_assign (gfc_code *);
|
|
tree gfc_trans_pointer_assign (gfc_code *);
|
|
tree gfc_trans_init_assign (gfc_code *);
|
|
|
|
/* trans-stmt.c */
|
|
tree gfc_trans_cycle (gfc_code *);
|
|
tree gfc_trans_exit (gfc_code *);
|
|
tree gfc_trans_label_assign (gfc_code *);
|
|
tree gfc_trans_label_here (gfc_code *);
|
|
tree gfc_trans_goto (gfc_code *);
|
|
tree gfc_trans_entry (gfc_code *);
|
|
tree gfc_trans_pause (gfc_code *);
|
|
tree gfc_trans_stop (gfc_code *);
|
|
tree gfc_trans_call (gfc_code *, bool);
|
|
tree gfc_trans_return (gfc_code *);
|
|
tree gfc_trans_if (gfc_code *);
|
|
tree gfc_trans_arithmetic_if (gfc_code *);
|
|
tree gfc_trans_do (gfc_code *);
|
|
tree gfc_trans_do_while (gfc_code *);
|
|
tree gfc_trans_select (gfc_code *);
|
|
tree gfc_trans_forall (gfc_code *);
|
|
tree gfc_trans_where (gfc_code *);
|
|
tree gfc_trans_allocate (gfc_code *);
|
|
tree gfc_trans_deallocate (gfc_code *);
|
|
tree gfc_trans_deallocate_array (tree);
|
|
|
|
/* trans-openmp.c */
|
|
tree gfc_trans_omp_directive (gfc_code *);
|
|
|
|
/* trans-io.c */
|
|
tree gfc_trans_open (gfc_code *);
|
|
tree gfc_trans_close (gfc_code *);
|
|
tree gfc_trans_read (gfc_code *);
|
|
tree gfc_trans_write (gfc_code *);
|
|
tree gfc_trans_iolength (gfc_code *);
|
|
tree gfc_trans_backspace (gfc_code *);
|
|
tree gfc_trans_endfile (gfc_code *);
|
|
tree gfc_trans_inquire (gfc_code *);
|
|
tree gfc_trans_rewind (gfc_code *);
|
|
tree gfc_trans_flush (gfc_code *);
|
|
|
|
tree gfc_trans_transfer (gfc_code *);
|
|
tree gfc_trans_dt_end (gfc_code *);
|