aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/check.c
diff options
context:
space:
mode:
authorHarald Anlauf <anlauf@gmx.de>2021-12-20 22:12:33 +0100
committerHarald Anlauf <anlauf@gmx.de>2021-12-22 19:34:20 +0100
commitff0ad4b5e16b8828a6147ae2d5fec8068ef0778e (patch)
tree06419e6c808a52a4eb4a524ad8bd4edb5cc38252 /gcc/fortran/check.c
parent5474092c9afbd76cbd457facce3757d8d2fad07b (diff)
downloadgcc-ff0ad4b5e16b8828a6147ae2d5fec8068ef0778e.zip
gcc-ff0ad4b5e16b8828a6147ae2d5fec8068ef0778e.tar.gz
gcc-ff0ad4b5e16b8828a6147ae2d5fec8068ef0778e.tar.bz2
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.
Diffstat (limited to 'gcc/fortran/check.c')
-rw-r--r--gcc/fortran/check.c6
1 files changed, 6 insertions, 0 deletions
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";