From 0a0576f3f1edcfdea0122ce5190e5017e7fd73ab Mon Sep 17 00:00:00 2001 From: Hassan Aurag Date: Thu, 9 May 2002 09:11:58 +0000 Subject: [PATCH] expr.c (ffeexpr_reduced_ugly2log_): Allow logicals-as-integers under -fugly-logint as arguments of .and., .or., .xor. 2002-05-09 Hassan Aurag * expr.c (ffeexpr_reduced_ugly2log_): Allow logicals-as-integers under -fugly-logint as arguments of .and., .or., .xor. From-SVN: r53321 --- gcc/f/ChangeLog | 5 +++++ gcc/f/expr.c | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 364408f5b90..1f14f907510 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,8 @@ +2002-05-09 Hassan Aurag + + * expr.c (ffeexpr_reduced_ugly2log_): Allow logicals-as-integers + under -fugly-logint as arguments of .and., .or., .xor. + 2002-05-07 Jan Hubicka * target.h (FFETARGET_32bit_longs): Undefine for x86-64. diff --git a/gcc/f/expr.c b/gcc/f/expr.c index 1772727bd85..a63ae30424e 100644 --- a/gcc/f/expr.c +++ b/gcc/f/expr.c @@ -11501,6 +11501,24 @@ ffeexpr_reduced_ugly2log_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op, /* else Leave it alone. */ } + if (lbt == FFEINFO_basictypeLOGICAL) + { + ffebld_set_left (reduced, ffeexpr_convert (ffebld_left (reduced), + l->token, op->token, FFEINFO_basictypeINTEGER, + FFEINFO_kindtypeINTEGERDEFAULT, 0, + FFETARGET_charactersizeNONE, + FFEEXPR_contextLET)); + } + + if (rbt == FFEINFO_basictypeLOGICAL) + { + ffebld_set_right (reduced, ffeexpr_convert (ffebld_right (reduced), + r->token, op->token, FFEINFO_basictypeINTEGER, + FFEINFO_kindtypeINTEGERDEFAULT, 0, + FFETARGET_charactersizeNONE, + FFEEXPR_contextLET)); + } + return reduced; } -- 2.30.2