From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0D13438B97C3; Thu, 6 Jun 2024 20:01:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D13438B97C3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717704104; bh=REtGEXNUkHwuIJnvHdGTB3zPDVfOLZo5+KV5F3WLRIE=; h=From:To:Subject:Date:From; b=Tm8kzu5dlaEkdzaleVZ720BdGqYW6C9bkt843H4VgGrubycClUNKPWyuLxdANZNG8 xcwQY1TgJbnfFM19MHqV4DkYx4f0LRV7IT+I3FhsDf5J9g5msd4/qFSGSSOMSdbzVJ TryYV10JFKWYyIfZ5CPmRYf0MlqhfANdi/yqGEBw= From: "p.p11 at orange dot fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/115376] New: ICE with if expression in value setting of a constant declaration Date: Thu, 06 Jun 2024 20:01:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: p.p11 at orange dot fr X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115376 Bug ID: 115376 Summary: ICE with if expression in value setting of a constant declaration Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: p.p11 at orange dot fr CC: dkm at gcc dot gnu.org Target Milestone: --- Steps to reproduce: Get ALS source from als-25.0w-20240506-162AE-src. Launch make: % make BUILD_MODE=3Dprod ... gprbuild -m -j4 -XSUPERPROJECT=3D -P gnat/lsp_server.gpr -p -XBUILD_MODE= =3Dprod -XOS=3Dosx -XLIBRARY_TYPE=3Drelocatable -XXMLADA_BUILD=3Drelocatable -XGPR_BUILD=3Drelocatable \ -XVERSION=3D -XBUILD_DATE=3D lsp_server.gpr:28:09: warning: there are no sources of language "C++" in th= is project Compile ... [Ada] lsp-ada_execute_command.adb +=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+ | 13.2.0 (x86_64-apple-darwin21.6.0) GCC error: | | in gnat_to_gnu_entity, at ada/gcc-interface/decl.cc:475 | | Error detected at lsp-ada_execute_command.adb:88:13=20=20=20=20=20 Command : constant Command_Access :=3D (if Tag =3D Ada.Tags.No_Tag then null else new LSP.Ada_Commands.Command'Class' (Create_Command (Tag, Params.arguments'Unrestricted_Access)));= -- line 88 Compilation is correct if I change into: Command : Command_Access; ... if Tag =3D Ada.Tags.No_Tag then Command :=3D null; else Command :=3D new LSP.Ada_Commands.Command'Class' (Create_Command (Tag, Params.arguments'Unrestricted_Access)); end if;=