2011-06-20 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.h (gfc_check_vardef_context): Update prototype. (iso_fortran_env_symbol): Handle derived types. (symbol_attribute): Add lock_comp. * expr.c (gfc_check_vardef_context): Add LOCK_TYPE check. * interface.c (compare_parameter, gfc_procedure_use): Handle LOCK_TYPE. (compare_actual_formal): Update gfc_check_vardef_context call. * check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto. * intrinsic.c (check_arglist): Ditto. * io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire): * Ditto. * iso-fortran-env.def (ISOFORTRAN_LOCK_TYPE): Add. * intrinsic.texi (ISO_FORTRAN_ENV): Document LOCK_TYPE. * module.c (mio_symbol_attribute): Handle lock_comp. (create_derived_type): New function. (use_iso_fortran_env_module): Call it to handle LOCK_TYPE. * parse.c (parse_derived): Add constraint check for LOCK_TYPE. * resolve.c (resolve_symbol, resolve_lock_unlock): Add * constraint checks for LOCK_TYPE. (gfc_resolve_iterator, resolve_deallocate_expr, resolve_allocate_expr, resolve_code, resolve_transfer): Update gfc_check_vardef_context call. * trans-stmt.h (gfc_trans_lock_unlock): New prototype. * trans-stmt.c (gfc_trans_lock_unlock): New function. * trans.c (trans_code): Handle LOCK and UNLOCK. 2011-06-20 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.dg/coarray_lock_1.f90: Update dg-error. * gfortran.dg/coarray_lock_3.f90: New. * gfortran.dg/coarray/lock_1.f90: New. From-SVN: r175228
82 lines
2.8 KiB
C
82 lines
2.8 KiB
C
/* Header for statement translation functions
|
|
Copyright (C) 2002, 2003, 2006, 2007, 2008, 2010
|
|
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 3, 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 COPYING3. If not see
|
|
<http://www.gnu.org/licenses/>. */
|
|
|
|
/* Statement translators (gfc_trans_*) return a fully translated tree.
|
|
Calls gfc_trans_*. */
|
|
tree gfc_trans_code (gfc_code *);
|
|
|
|
/* Wrapper function used to pass a check condition for implied DO loops. */
|
|
tree gfc_trans_code_cond (gfc_code *, tree);
|
|
|
|
/* 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 *);
|
|
tree gfc_trans_class_init_assign (gfc_code *);
|
|
tree gfc_trans_class_assign (gfc_expr *, gfc_expr *, gfc_exec_op);
|
|
|
|
/* trans-stmt.c */
|
|
tree gfc_trans_cycle (gfc_code *);
|
|
tree gfc_trans_critical (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 *, bool);
|
|
tree gfc_trans_call (gfc_code *, bool, tree, tree, bool);
|
|
tree gfc_trans_return (gfc_code *);
|
|
tree gfc_trans_if (gfc_code *);
|
|
tree gfc_trans_arithmetic_if (gfc_code *);
|
|
tree gfc_trans_block_construct (gfc_code *);
|
|
tree gfc_trans_do (gfc_code *, tree);
|
|
tree gfc_trans_do_while (gfc_code *);
|
|
tree gfc_trans_select (gfc_code *);
|
|
tree gfc_trans_sync (gfc_code *, gfc_exec_op);
|
|
tree gfc_trans_lock_unlock (gfc_code *, gfc_exec_op);
|
|
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 *);
|
|
tree gfc_trans_wait (gfc_code *);
|