public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "p.p11 at orange dot fr" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-115376-4@http.gcc.gnu.org/bugzilla/> (raw)

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;

             reply	other threads:[~2024-06-06 20:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06 20:01 p.p11 at orange dot fr [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-115376-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).