* [COMMITTED] ada: Add comment for assertion
@ 2023-11-28 9:40 Marc Poulhiès
0 siblings, 0 replies; only message in thread
From: Marc Poulhiès @ 2023-11-28 9:40 UTC (permalink / raw)
To: gcc-patches; +Cc: Marc Poulhiès
Add possible cause for a failed assertion.
gcc/ada/
* gcc-interface/utils2.cc (build_simple_component_ref): Add
comment on assertion.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/gcc-interface/utils2.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/ada/gcc-interface/utils2.cc b/gcc/ada/gcc-interface/utils2.cc
index 95bbce2f1b4..6a951093ff8 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. */
--
2.42.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-28 9:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-28 9:40 [COMMITTED] ada: Add comment for assertion Marc Poulhiès
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).