From 81c5baa0b36f7ded676caef89aec55edc0774d14 Mon Sep 17 00:00:00 2001 From: Craig Burley Date: Sat, 24 Apr 1999 09:24:13 +0000 Subject: fix INTEGER*2 in DATA implied-DO From-SVN: r26613 --- gcc/f/expr.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'gcc/f/expr.c') diff --git a/gcc/f/expr.c b/gcc/f/expr.c index 72a6264..83838c7 100644 --- a/gcc/f/expr.c +++ b/gcc/f/expr.c @@ -12680,11 +12680,12 @@ again: /* :::::::::::::::::::: */ switch (ffeinfo_basictype (info)) { case FFEINFO_basictypeLOGICAL: - error = error && !ffe_is_ugly_logint (); - if (!ffeexpr_stack_->is_rhs) - break; /* Don't convert lhs variable. */ + if (! ffe_is_ugly_logint ()) + error = TRUE; + if (! ffeexpr_stack_->is_rhs) + break; expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - ffeinfo_kindtype (ffebld_info (expr)), 0, + ffeinfo_kindtype (info), 0, FFETARGET_charactersizeNONE, FFEEXPR_contextLET); break; @@ -12728,18 +12729,21 @@ again: /* :::::::::::::::::::: */ switch (ffeinfo_basictype (info)) { case FFEINFO_basictypeLOGICAL: - error = error - && (ffeinfo_kindtype (info) != FFEINFO_kindtypeLOGICALDEFAULT); - if (!ffeexpr_stack_->is_rhs) - break; /* Don't convert lhs variable. */ + if (! ffeexpr_stack_->is_rhs) + break; expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, + ffeinfo_kindtype (info), 0, + FFETARGET_charactersizeNONE, FFEEXPR_contextLET); - break; - + /* Fall through. */ case FFEINFO_basictypeINTEGER: - error = error && - (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT); + if (ffeexpr_stack_->is_rhs + && (ffeinfo_kindtype (ffebld_info (expr)) + != FFEINFO_kindtypeINTEGERDEFAULT)) + expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, + FFEINFO_kindtypeINTEGERDEFAULT, 0, + FFETARGET_charactersizeNONE, + FFEEXPR_contextLET); break; case FFEINFO_basictypeHOLLERITH: -- cgit v1.1