https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103576

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #1)
> I suppose it should be:
> expr->ts.type != foo && expr->ts.type != bar ...

Rather the following. There are some more fixes I should do in this area; I
added this patch on top of it. (Remaining: some more testcase writing and
testcase cleanup.)

--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -7555,4 +7555,4 @@ is_scalar_intrinsic_expr (gfc_expr *expr, bool
must_be_var, bool
-         && (expr->ts.type != BT_INTEGER
-             || expr->ts.type != BT_REAL
-             || expr->ts.type != BT_COMPLEX
-             || expr->ts.type != BT_LOGICAL));
+         && (expr->ts.type == BT_INTEGER
+             || expr->ts.type == BT_REAL
+             || expr->ts.type == BT_COMPLEX
+             || expr->ts.type == BT_LOGICAL));

Reply via email to