From: Eric Botcazou Date: Wed, 21 Apr 2021 09:18:21 +0000 (+0200) Subject: Add stopgap fix for PR ada/99360 X-Git-Tag: releases/gcc-11.1.0~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53e85b38aaa10f5f8fe35eeea454a92c293cbc67;p=thirdparty%2Fgcc.git Add stopgap fix for PR ada/99360 gcc/ada/ PR ada/99360 * exp_ch6.adb (Might_Have_Tasks): Return False when the type is the class-wide type of a predefined iterator type. --- diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 2cd40e42f47a..c1dc371786d2 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -9616,7 +9616,15 @@ package body Exp_Ch6 is and then not No_Run_Time_Mode and then (Has_Task (Typ) or else (Is_Class_Wide_Type (Typ) - and then Is_Limited_Record (Typ))); + and then Is_Limited_Record (Typ))) + + -- Predefined iterator types do not contain tasks, even when + -- class-wide. + + and then not (In_Predefined_Unit (Typ) + and then Chars (Typ) in + Name_Find ("Tforward_iteratorC") | + Name_Find ("Treversible_iteratorC")); end Might_Have_Tasks; ----------------------------