public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/115376] New: ICE with if expression in value setting of a constant declaration
@ 2024-06-06 20:01 p.p11 at orange dot fr
  2024-06-07  8:55 ` [Bug ada/115376] " ebotcazou at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: p.p11 at orange dot fr @ 2024-06-06 20:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115376

            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=prod
...
gprbuild -m -j4  -XSUPERPROJECT= -P gnat/lsp_server.gpr -p -XBUILD_MODE=prod
-XOS=osx -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable
-XGPR_BUILD=relocatable \
        -XVERSION= -XBUILD_DATE=
lsp_server.gpr:28:09: warning: there are no sources of language "C++" in this
project
Compile
...
   [Ada]          lsp-ada_execute_command.adb
+===========================GNAT BUG DETECTED==============================+
| 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     

      Command : constant Command_Access :=
          (if Tag = 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 = Ada.Tags.No_Tag then
        Command := null;
      else
        Command := new LSP.Ada_Commands.Command'Class'
           (Create_Command (Tag, Params.arguments'Unrestricted_Access));
      end if;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-13 12:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-06 20:01 [Bug ada/115376] New: ICE with if expression in value setting of a constant declaration p.p11 at orange dot fr
2024-06-07  8:55 ` [Bug ada/115376] " ebotcazou at gcc dot gnu.org
2024-06-12 19:09 ` p.p11 at orange dot fr
2024-06-13 12:48 ` ebotcazou at gcc dot gnu.org

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).