diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-08 06:28:41 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-08 06:28:41 +0000 |
commit | 3f73d66e38658de2fb5277e5ad8e0a49222ea41a (patch) | |
tree | 2bbcfee69dbbc562c058ffd1078f6f90732ef100 /gcc/fortran/dump-parse-tree.c | |
parent | eadf7d4bf5c2895313824a857bd9d4b77205b6a7 (diff) | |
download | gcc-3f73d66e38658de2fb5277e5ad8e0a49222ea41a.tar.gz |
2011-06-08 Tobias Burnus <burnus@net-b.de>
PR fortran/18918
* gfortran.h (gfc_statement): Add ST_LOCK and ST_UNLOCK.
(gfc_exec_op): Add EXEC_LOCK and EXEC_UNLOCK.
(gfc_code): Add expr4.
* match.h (gfc_match_lock, gfc_match_unlock): New prototypes.
* match.c (gfc_match_lock, gfc_match_unlock,
lock_unlock_statement): New functions.
(sync_statement): Bug fix, avoiding double freeing.
(gfc_match_if): Handle LOCK/UNLOCK statement.
* parse.c (decode_statement, next_statement,
gfc_ascii_statement): Ditto.
* st.c (gfc_free_statement): Handle LOCK and UNLOCK.
* resolve.c (resolve_lock_unlock): New function.
(resolve_code): Call it.
* dump-parse-tree.c (show_code_node): Handle LOCK/UNLOCK.
* frontend-passes.c (gfc_code_walker): Optimize gfc_code's expr4.
2011-06-08 Tobias Burnus <burnus@net-b.de>
PR fortran/18918
* gfortran.dg/coarray_lock_1.f90: New.
* gfortran.dg/coarray_lock_2.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174796 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/dump-parse-tree.c')
-rw-r--r-- | gcc/fortran/dump-parse-tree.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c index c80706272ad..87b8b68408f 100644 --- a/gcc/fortran/dump-parse-tree.c +++ b/gcc/fortran/dump-parse-tree.c @@ -1396,6 +1396,33 @@ show_code_node (int level, gfc_code *c) } break; + case EXEC_LOCK: + case EXEC_UNLOCK: + if (c->op == EXEC_LOCK) + fputs ("LOCK ", dumpfile); + else + fputs ("UNLOCK ", dumpfile); + + fputs ("lock-variable=", dumpfile); + if (c->expr1 != NULL) + show_expr (c->expr1); + if (c->expr4 != NULL) + { + fputs (" acquired_lock=", dumpfile); + show_expr (c->expr4); + } + if (c->expr2 != NULL) + { + fputs (" stat=", dumpfile); + show_expr (c->expr2); + } + if (c->expr3 != NULL) + { + fputs (" errmsg=", dumpfile); + show_expr (c->expr3); + } + break; + case EXEC_ARITHMETIC_IF: fputs ("IF ", dumpfile); show_expr (c->expr1); |