diff options
author | Marc Poulhiès <poulhies@adacore.com> | 2023-11-06 11:16:40 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-11-28 10:35:48 +0100 |
commit | 60123b134bf3d925c5d696b5fcd9adfc8f4b54e7 (patch) | |
tree | 1040597ed0138124d207fa8d8d687515c6f9d055 /gcc/ada | |
parent | 348cb1c0158fd4c54cd4176be97f5ab9bec3afb9 (diff) | |
download | gcc-60123b134bf3d925c5d696b5fcd9adfc8f4b54e7.zip gcc-60123b134bf3d925c5d696b5fcd9adfc8f4b54e7.tar.gz gcc-60123b134bf3d925c5d696b5fcd9adfc8f4b54e7.tar.bz2 |
ada: Add comment for assertion
Add possible cause for a failed assertion.
gcc/ada/
* gcc-interface/utils2.cc (build_simple_component_ref): Add
comment on assertion.
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/gcc-interface/utils2.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ada/gcc-interface/utils2.cc b/gcc/ada/gcc-interface/utils2.cc index 95bbce2..6a95109 100644 --- a/gcc/ada/gcc-interface/utils2.cc +++ b/gcc/ada/gcc-interface/utils2.cc @@ -2021,7 +2021,10 @@ build_simple_component_ref (tree record, tree field, bool no_fold) /* The failure of this assertion will very likely come from a missing insertion of an explicit dereference. */ - gcc_assert (RECORD_OR_UNION_TYPE_P (type) && COMPLETE_TYPE_P (type)); + gcc_assert (RECORD_OR_UNION_TYPE_P (type)); + + /* The type must be frozen at this point. */ + gcc_assert (COMPLETE_TYPE_P (type)); /* Try to fold a conversion from another record or union type unless the type contains a placeholder as it might be needed for a later substitution. */ |