summaryrefslogtreecommitdiff
path: root/gcc/fortran/parse.h
diff options
context:
space:
mode:
authortobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-16 00:39:40 +0000
committertobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-16 00:39:40 +0000
commitaf0223a18eb85ad517c347400ee8a7a5f025783f (patch)
tree24952643edf5054848eaa39feffd49799b9beece /gcc/fortran/parse.h
parent5a242bf7af062274fdb22fd00f495ff6edd26450 (diff)
downloadgcc-af0223a18eb85ad517c347400ee8a7a5f025783f.tar.gz
PR fortran/16404
(parts ported from g95) * parse.h (gfc_state_data): New field do_variable. (gfc_check_do_variable): Add prototype. * parse.c (push_state): Initialize field 'do_variable'. (gfc_check_do_variable): New function. (parse_do_block): Remember do iterator variable. (parse_file): Initialize field 'do_variable'. * match.c (gfc_match_assignment, gfc_match_do, gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate): Add previously missing checks. (gfc_match_return): Reformat error message. * io.c (match_out_tag): New function. (match_open_element, match_close_element, match_file_element, match_dt_element): Call match_out_tag instead of match_vtag where appropriate. (match_io_iterator, match_io_element): Add missing check. (match_io): Reformat error message. (match_inquire_element): Call match_out_tag where appropriate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84793 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/parse.h')
-rw-r--r--gcc/fortran/parse.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/parse.h b/gcc/fortran/parse.h
index a6bf12a1392..c0c09654751 100644
--- a/gcc/fortran/parse.h
+++ b/gcc/fortran/parse.h
@@ -40,6 +40,8 @@ typedef struct gfc_state_data
{
gfc_compile_state state;
gfc_symbol *sym; /* Block name associated with this level */
+ gfc_symtree *do_variable; /* For DO blocks the iterator variable. */
+
struct gfc_code *head, *tail;
struct gfc_state_data *previous;
@@ -57,6 +59,7 @@ extern gfc_state_data *gfc_state_stack;
#define gfc_current_block() (gfc_state_stack->sym)
#define gfc_current_state() (gfc_state_stack->state)
+int gfc_check_do_variable (gfc_symtree *);
try gfc_find_state (gfc_compile_state);
gfc_state_data *gfc_enclosing_unit (gfc_compile_state *);
const char *gfc_ascii_statement (gfc_statement);