diff options
author | Thomas Schwinge <tschwinge@baylibre.com> | 2024-03-11 22:38:33 +0100 |
---|---|---|
committer | Thomas Schwinge <tschwinge@baylibre.com> | 2024-03-11 22:38:33 +0100 |
commit | 4235574518bd016f208b97f6f497978c31771e12 (patch) | |
tree | 06362f23752d180e7ce4e6407787beba9634505c /gcc/fortran/class.cc | |
parent | 2cd7fb664ce9617c90b65b399423d330e1a78068 (diff) | |
parent | 0d9b4e8647ff01c3d3a782ab26684ca5a7c2f527 (diff) | |
download | gcc-4235574518bd016f208b97f6f497978c31771e12.zip gcc-4235574518bd016f208b97f6f497978c31771e12.tar.gz gcc-4235574518bd016f208b97f6f497978c31771e12.tar.bz2 |
Merge commit '46595ce72e5855189e3c60a140c3ca5aaddfb58c^' into HEAD
Diffstat (limited to 'gcc/fortran/class.cc')
-rw-r--r-- | gcc/fortran/class.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fortran/class.cc b/gcc/fortran/class.cc index 9d0c802..5c43b77 100644 --- a/gcc/fortran/class.cc +++ b/gcc/fortran/class.cc @@ -647,6 +647,10 @@ gfc_build_class_symbol (gfc_typespec *ts, symbol_attribute *attr, gcc_assert (as); + /* We cannot build the class container now. */ + if (attr->class_ok && (!ts->u.derived || !ts->u.derived->components)) + return false; + /* Class container has already been built with same name. */ if (attr->class_ok && ts->u.derived->components->attr.dimension >= attr->dimension |