aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index c6b8073..2790865 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -884,6 +884,7 @@ gfc_match_type_spec (gfc_typespec * ts, int kind_flag)
char name[GFC_MAX_SYMBOL_LEN + 1];
gfc_symbol *sym;
match m;
+ int c;
gfc_clear_ts (ts);
@@ -962,6 +963,14 @@ get_kind:
if (kind_flag == 0)
return MATCH_YES;
+ if (gfc_current_form == FORM_FREE)
+ {
+ c = gfc_peek_char();
+ if (!gfc_is_whitespace(c) && c != '*' && c != '('
+ && c != ':' && c != ',')
+ return MATCH_NO;
+ }
+
m = gfc_match_kind_spec (ts);
if (m == MATCH_NO && ts->type != BT_CHARACTER)
m = gfc_match_old_kind_spec (ts);