diff options
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/symbol.cc | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index f764113..1ca82cd 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2022-10-26 Harald Anlauf <anlauf@gmx.de> + + PR fortran/103413 + * symbol.cc (gfc_type_compatible): A boz-literal-constant has no type + and thus is not considered compatible to any type. + 2022-10-21 José Rui Faustino de Sousa <jrfsousa@gmail.com> PR fortran/100097 diff --git a/gcc/fortran/symbol.cc b/gcc/fortran/symbol.cc index 6050359..49fb378 100644 --- a/gcc/fortran/symbol.cc +++ b/gcc/fortran/symbol.cc @@ -5139,6 +5139,10 @@ gfc_type_compatible (gfc_typespec *ts1, gfc_typespec *ts2) bool is_union1 = (ts1->type == BT_UNION); bool is_union2 = (ts2->type == BT_UNION); + /* A boz-literal-constant has no type. */ + if (ts1->type == BT_BOZ || ts2->type == BT_BOZ) + return false; + if (is_class1 && ts1->u.derived->components && ((ts1->u.derived->attr.is_class |