From ff0ad4b5e16b8828a6147ae2d5fec8068ef0778e Mon Sep 17 00:00:00 2001 From: Harald Anlauf Date: Mon, 20 Dec 2021 22:12:33 +0100 Subject: Fortran: BOZ literal constants are not interoperable gcc/fortran/ChangeLog: PR fortran/103778 * check.c (is_c_interoperable): A BOZ literal constant is not interoperable. gcc/testsuite/ChangeLog: PR fortran/103778 * gfortran.dg/illegal_boz_arg_3.f90: New test. --- gcc/fortran/check.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/fortran') diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index 625473c..b4db933 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -5185,6 +5185,12 @@ is_c_interoperable (gfc_expr *expr, const char **msg, bool c_loc, bool c_f_ptr) return false; } + if (expr->ts.type == BT_BOZ) + { + *msg = "BOZ literal constant"; + return false; + } + if (expr->ts.type == BT_CLASS) { *msg = "Expression is polymorphic"; -- cgit v1.1