From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 29FBD38293FE for ; Fri, 27 May 2022 09:32:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 29FBD38293FE Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.91,255,1647331200"; d="scan'208";a="79111862" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 27 May 2022 01:32:54 -0800 IronPort-SDR: SP4EizGHVxUUiCsUtwSUv+ShWlucXVo/YDYIeE6MNVmx4jt5AzfKx+sGZdTM8C0iZIj1MZt/4g CoLPmdrxVACJ1iwCJjNcdcTfsc/SOugJFVsKcnMLZNCdgky1Aou2KNTkhp1d0RFk0HosA7NQGS d6/5YANUG1XvcIZuK3V8cKqlpP0w9Y00kKjXmuk8H0pGtQkcUY7jGAvHKe23MsUftCUBUJ7OGC gYCCcUT0lSPNdpY8MZySDe1Tmdqcajl2Be6A8OnaZwbBUbgskv27QzysY2ZdV8hBXmnpOKDZec vtk= From: Thomas Schwinge To: Arnaud Charlet CC: , Subject: Re: [gcc r12-6398] [Ada] Reduce runtime dependencies on stage1 In-Reply-To: <20220118104648.GA1421174@adacore.com> References: <20220110094108.2755D3891C1E@sourceware.org> <87ee5574t8.fsf@euler.schwinge.homeip.net> <20220118104129.GA1409907@adacore.com> <20220118104648.GA1421174@adacore.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Fri, 27 May 2022 11:32:42 +0200 Message-ID: <87wne7mibp.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-08.mgc.mentorg.com (139.181.222.8) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_ASCII_DIVIDERS, KAM_DMARC_STATUS, KAM_NUMSUBJECT, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2022 09:32:57 -0000 Hi! (Before the GCC 12 release) I had reported that commit r12-6398-ga6eae6a9bbf83ada3aab7f5a2a74e7024889d237 "[Ada] Reduce runtime dependencies on stage1" has broken GCC/Ada build with GCC 4.8. That's unfortunate, as I understand that GCC 4.8 is generally the prerequisite compiler for GCC. (..., and I like to do certain build using that old version, to make sure that this still works.) (The issue later also got repoted by Bernd Edlinger in "Ada-Bootstrap fails with gcc-4.8.4".) I thus had suggested a patch to 'Revert parts of "[Ada] Reduce runtime dependencies on stage1"', but: On 2022-01-18T10:46:48+0000, Arnaud Charlet via Gcc-patches wrote: >> Unfortunately it's not OK, these are the most annoying/delicate dependen= cies, so >> we'd rather not reintroduce them. I'll instead update prerequisites to >> document that GCC 5.1 or later is required to build GNAT. > > Now pushed on master: > > Update prerequisites for GNAT > > * doc/install.texi: Update prerequisites for GNAT > > diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi > index 54ad7c7..96b4dfc 100644 > --- a/gcc/doc/install.texi > +++ b/gcc/doc/install.texi > @@ -263,7 +263,7 @@ name of the package depends on your distro) or you mu= st build GCC as a > @item @anchor{GNAT-prerequisite}GNAT > > In order to build GNAT, the Ada compiler, you need a working GNAT > -compiler (GCC version 4.7 or later). > +compiler (GCC version 5.1 or later). > > This includes GNAT tools such as @command{gnatmake} and > @command{gnatlink}, since the Ada front end is written in Ada and I've now tested that, but find that it doesn't work: [...] gcc -c -g -gnatpg -gnatwns -gnata -W -Wall -I- -I. -Iada/generated -Ia= da -I[...]/source-gcc/gcc/ada [...]/source-gcc/gcc/ada/contracts.adb -o ada= /contracts.o +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3DGNAT BUG DETECTED=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+ | 5.1.0 (x86_64-unknown-linux-gnu) Assert_Failure sinfo.adb:616 = | | Error detected at contracts.adb:2231:22 = | | Please submit a bug report; see http://gcc.gnu.org/bugs.html. = | | Use a subject line meaningful to you and us to track the bug. = | | Include the entire contents of this bug box in the report. = | | Include the exact command that you entered. = | | Also include sources listed below. = | +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D+ Please include these source files with error report Note that list may not be accurate in some cases, so please double check that the problem can still be reproduced with the set of files listed. Consider also -gnatd.n switch (see debug.adb). [...]/source-gcc/gcc/ada/contracts.adb [...]/source-gcc/gcc/ada/contracts.ads [...]/source-gcc/gcc/ada/types.ads [...]/source-gcc/gcc/ada/aspects.ads [...]/source-gcc/gcc/ada/namet.ads [...]/source-gcc/gcc/ada/alloc.ads [...]/source-gcc/gcc/ada/hostparm.ads [...]/source-gcc/gcc/ada/table.ads ada/snames.ads [...]/source-gcc/gcc/ada/atree.ads [...]/source-gcc/gcc/ada/sinfo.ads [...]/source-gcc/gcc/ada/uintp.ads [...]/source-gcc/gcc/ada/urealp.ads ada/sinfo-nodes.ads ada/seinfo.ads [...]/source-gcc/gcc/ada/output.ads [...]/source-gcc/gcc/ada/einfo.ads [...]/source-gcc/gcc/ada/stand.ads ada/einfo-entities.ads [...]/source-gcc/gcc/ada/einfo-utils.ads [...]/source-gcc/gcc/ada/elists.ads [...]/source-gcc/gcc/ada/errout.ads [...]/source-gcc/gcc/ada/err_vars.ads [...]/source-gcc/gcc/ada/erroutc.ads [...]/source-gcc/gcc/ada/exp_prag.ads [...]/source-gcc/gcc/ada/exp_tss.ads [...]/source-gcc/gcc/ada/exp_util.ads [...]/source-gcc/gcc/ada/rtsfind.ads [...]/source-gcc/gcc/ada/freeze.ads [...]/source-gcc/gcc/ada/lib.ads ada/gnat.ads [...]/source-gcc/gcc/ada/nlists.ads ada/nmake.ads [...]/source-gcc/gcc/ada/opt.ads [...]/source-gcc/gcc/ada/sem.ads [...]/source-gcc/gcc/ada/sem_aux.ads [...]/source-gcc/gcc/ada/sem_ch6.ads [...]/source-gcc/gcc/ada/sem_ch8.ads [...]/source-gcc/gcc/ada/sem_ch12.ads [...]/source-gcc/gcc/ada/inline.ads [...]/source-gcc/gcc/ada/warnsw.ads [...]/source-gcc/gcc/ada/sem_ch13.ads [...]/source-gcc/gcc/ada/sem_disp.ads [...]/source-gcc/gcc/ada/sem_prag.ads [...]/source-gcc/gcc/ada/sem_res.ads [...]/source-gcc/gcc/ada/sem_type.ads [...]/source-gcc/gcc/ada/sem_util.ads [...]/source-gcc/gcc/ada/sinfo-utils.ads [...]/source-gcc/gcc/ada/sinput.ads [...]/source-gcc/gcc/ada/casing.ads [...]/source-gcc/gcc/ada/stringt.ads [...]/source-gcc/gcc/ada/tbuild.ads compilation abandoned make[3]: *** [ada/contracts.o] Error 1 make[3]: Target `all' not remade because of errors. make[3]: Leaving directory `[...]/build-gcc/gcc' make[2]: *** [all-stage1-gcc] Error 2 [...] That 'Assert_Failure sinfo.adb:616' is in 'gcc/ada/sinfo.adb': 613 function Controlling_Argument 614 (N : Node_Id) return Node_Id is 615 begin 616 pragma Assert (False 617 or else NT (N).Nkind =3D N_Function_Call 618 or else NT (N).Nkind =3D N_Procedure_Call_Statement); 619 return Node1 (N); 620 end Controlling_Argument; ..., which is unchanged over all of the GCC 5 releases; the same 'Assert_Failure' appears for all GCC 5 releases. The offending 'contracts.adb:2231:22' code is in 'gcc/ada/contracts.adb': 2226 elsif Scope (Type_Of_Formal) =3D Scope (Subp_Id) then 2227 declare 2228 Ignored : Boolean range False .. False; 2229 2230 Typ_Property_Funcs : constant Subprogram_List := =3D 2231 Stable_Properties (Type_Of_Formal, Negated =3D= > Ignored); 2232 2233 function Excluded_By_Aspect_Spec_Of_Subp 2234 (SPF_Id : Entity_Id) return Boolean; ..., which got added in commit r11-5477-g23e3e22105723fde2a9161757611544f180ba805 "[Ada] Implement AI12-0187 (Stable properties of abstract data types)". So, what is actually the prerequisite GCC/Ada compiler version to be able to build GCC 12+ GCC/Ada? Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955