summaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-13 14:52:54 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-13 14:52:54 +0000
commit9286e713e866eaa77e48c9ce49e97c51b4fbb261 (patch)
treec7d77d5b3f969373e3d1ee3b00b09bd0a6efe6bf /gcc/fortran
parent16669ccd8d89f69fe3b57bfae0a82911673d0e74 (diff)
downloadgcc-9286e713e866eaa77e48c9ce49e97c51b4fbb261.tar.gz
2009-05-13 Tobias Burnus <burnus@net-b.de>
PR fortran/34153 * gfortran.h (gfc_exec_op): Add EXEC_END_PROCEDURE. * dump-parse-tree.c (show_code_node): Use EXEC_END_PROCEDURE. * trans.c (gfc_trans_code): Ditto. * resolve.c (resolve_code): Ditto. * st.c (gfc_free_statement): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147477 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog10
-rw-r--r--gcc/fortran/dump-parse-tree.c3
-rw-r--r--gcc/fortran/gfortran.h2
-rw-r--r--gcc/fortran/parse.c5
-rw-r--r--gcc/fortran/resolve.c1
-rw-r--r--gcc/fortran/st.c1
-rw-r--r--gcc/fortran/trans.c1
7 files changed, 22 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 2994acf2189..1ca8b68276b 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,13 @@
+2009-05-13 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/34153
+ * gfortran.h (gfc_exec_op): Add EXEC_END_PROCEDURE.
+ * dump-parse-tree.c (show_code_node): Use EXEC_END_PROCEDURE.
+ * trans.c (gfc_trans_code): Ditto.
+ * resolve.c (resolve_code): Ditto.
+ * st.c (gfc_free_statement): Ditto.
+ * parse.c (accept_statement): Ditto.
+
2009-05-12 Tobias Burnus <burnus@net-b.de>
PR fortran/40110
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c
index e007a54aea0..51d76f0503e 100644
--- a/gcc/fortran/dump-parse-tree.c
+++ b/gcc/fortran/dump-parse-tree.c
@@ -1148,6 +1148,9 @@ show_code_node (int level, gfc_code *c)
switch (c->op)
{
+ case EXEC_END_PROCEDURE:
+ break;
+
case EXEC_NOP:
fputs ("NOP", dumpfile);
break;
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index fad49c4e7cd..73b21781760 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -1893,7 +1893,7 @@ typedef enum
EXEC_ENTRY, EXEC_PAUSE, EXEC_STOP, EXEC_CONTINUE, EXEC_INIT_ASSIGN,
EXEC_IF, EXEC_ARITHMETIC_IF, EXEC_DO, EXEC_DO_WHILE, EXEC_SELECT,
EXEC_FORALL, EXEC_WHERE, EXEC_CYCLE, EXEC_EXIT, EXEC_CALL_PPC,
- EXEC_ALLOCATE, EXEC_DEALLOCATE,
+ EXEC_ALLOCATE, EXEC_DEALLOCATE, EXEC_END_PROCEDURE,
EXEC_OPEN, EXEC_CLOSE, EXEC_WAIT,
EXEC_READ, EXEC_WRITE, EXEC_IOLENGTH, EXEC_TRANSFER, EXEC_DT_END,
EXEC_BACKSPACE, EXEC_ENDFILE, EXEC_INQUIRE, EXEC_REWIND, EXEC_FLUSH,
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c
index d387f543c94..3c54c4670ed 100644
--- a/gcc/fortran/parse.c
+++ b/gcc/fortran/parse.c
@@ -1496,6 +1496,11 @@ accept_statement (gfc_statement st)
new_st.op = EXEC_RETURN;
add_statement ();
}
+ else
+ {
+ new_st.op = EXEC_END_PROCEDURE;
+ add_statement ();
+ }
break;
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index b7550f5780e..43044efc175 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -6938,6 +6938,7 @@ resolve_code (gfc_code *code, gfc_namespace *ns)
break;
case EXEC_INIT_ASSIGN:
+ case EXEC_END_PROCEDURE:
break;
case EXEC_ASSIGN:
diff --git a/gcc/fortran/st.c b/gcc/fortran/st.c
index d0cdb0e868c..866f9bfbdf2 100644
--- a/gcc/fortran/st.c
+++ b/gcc/fortran/st.c
@@ -94,6 +94,7 @@ gfc_free_statement (gfc_code *p)
case EXEC_GOTO:
case EXEC_CYCLE:
case EXEC_RETURN:
+ case EXEC_END_PROCEDURE:
case EXEC_IF:
case EXEC_PAUSE:
case EXEC_STOP:
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index 28cb60ab2ef..c842ea8dcb0 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -1056,6 +1056,7 @@ gfc_trans_code (gfc_code * code)
{
case EXEC_NOP:
case EXEC_END_BLOCK:
+ case EXEC_END_PROCEDURE:
res = NULL_TREE;
break;