diff options
author | Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> | 2004-07-16 02:39:40 +0200 |
---|---|---|
committer | Tobias Schlüter <tobi@gcc.gnu.org> | 2004-07-16 02:39:40 +0200 |
commit | c9583ed23d6fc2706bfaf403c4c3ba41f92b9b50 (patch) | |
tree | 24952643edf5054848eaa39feffd49799b9beece /gcc/fortran/parse.h | |
parent | e94f3b4f2bc52f378923e08e9f7b2684a9ef6c7c (diff) | |
download | gcc-c9583ed23d6fc2706bfaf403c4c3ba41f92b9b50.zip gcc-c9583ed23d6fc2706bfaf403c4c3ba41f92b9b50.tar.gz gcc-c9583ed23d6fc2706bfaf403c4c3ba41f92b9b50.tar.bz2 |
re PR fortran/16404 (should reject invalid code with -pedantic -std=f95 ? (x8))
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.
From-SVN: r84793
Diffstat (limited to 'gcc/fortran/parse.h')
-rw-r--r-- | gcc/fortran/parse.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/parse.h b/gcc/fortran/parse.h index a6bf12a..c0c0965 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); |