public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3746] [Ada] Crash on build of Initialization procedure for derived container
@ 2021-09-21 15:27 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-09-21 15:27 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:dbea36c6bde7bd32ad645b0d472c5674e2db744d
commit r12-3746-gdbea36c6bde7bd32ad645b0d472c5674e2db744d
Author: Ed Schonberg <schonberg@adacore.com>
Date: Wed Jul 7 10:56:48 2021 -0400
[Ada] Crash on build of Initialization procedure for derived container
gcc/ada/
* exp_ch7.adb (Make_Init_Call): Add guard to protect against a
missing initialization procedure for a type.
Diff:
---
gcc/ada/exp_ch7.adb | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb
index 33e4f3a4ab3..8d08ff12ed5 100644
--- a/gcc/ada/exp_ch7.adb
+++ b/gcc/ada/exp_ch7.adb
@@ -9555,8 +9555,11 @@ package body Exp_Ch7 is
-- If initialization procedure for an array of controlled objects is
-- trivial, do not generate a useless call to it.
+ -- The initialization procedure may be missing altogether in the case
+ -- of a derived container whose components have trivial initialization.
- if (Is_Array_Type (Utyp) and then Is_Trivial_Subprogram (Proc))
+ if No (Proc)
+ or else (Is_Array_Type (Utyp) and then Is_Trivial_Subprogram (Proc))
or else
(not Comes_From_Source (Proc)
and then Present (Alias (Proc))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-21 15:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-21 15:27 [gcc r12-3746] [Ada] Crash on build of Initialization procedure for derived container Pierre-Marie de Rodat
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).