From c758d08fbe76d030a009ae4bc28d01f94cc3c14c Mon Sep 17 00:00:00 2001 From: toon Date: Sat, 22 Mar 2003 13:01:08 +0000 Subject: 2003-03-22 Bud Davis * com.c (ffecom_constantunion_with_type): New function. * com.h (ffecom_constantunion_with_type): Declare. * stc.c (ffestc_R810): Check for kind type. * ste.c (ffeste_R810): Use ffecom_constantunion_with_type to discern SELECT CASE variables. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64709 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/f/stc.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'gcc/f/stc.c') diff --git a/gcc/f/stc.c b/gcc/f/stc.c index a28e3a949e6..b9602c20a46 100644 --- a/gcc/f/stc.c +++ b/gcc/f/stc.c @@ -9197,11 +9197,17 @@ ffestc_R810 (ffesttCaseList cases, ffelexToken name) } if (((caseobj->expr1 != NULL) && ((ffeinfo_basictype (ffebld_info (caseobj->expr1)) - != s->type))) + != s->type) + || ((ffeinfo_kindtype (ffebld_info (caseobj->expr1)) + != s->kindtype) + && (ffeinfo_kindtype (ffebld_info (caseobj->expr1)) != FFEINFO_kindtypeINTEGER1 )) || ((caseobj->range) && (caseobj->expr2 != NULL) && ((ffeinfo_basictype (ffebld_info (caseobj->expr2)) - != s->type)))) + != s->type) + || ((ffeinfo_kindtype (ffebld_info (caseobj->expr2)) + != s->kindtype) + && (ffeinfo_kindtype (ffebld_info (caseobj->expr2)) != FFEINFO_kindtypeINTEGER1))))))) { ffebad_start (FFEBAD_CASE_TYPE_DISAGREE); ffebad_here (0, ffelex_token_where_line (caseobj->t), @@ -9212,6 +9218,8 @@ ffestc_R810 (ffesttCaseList cases, ffelexToken name) continue; } + + if ((s->type == FFEINFO_basictypeLOGICAL) && (caseobj->range)) { ffebad_start (FFEBAD_CASE_LOGICAL_RANGE); -- cgit v1.2.1