AdaCore / ada_language_server

Server implementing the Microsoft Language Protocol for Ada and SPARK
GNU General Public License v3.0
226 stars 54 forks source link

[Bug]: GNAT BUG DETECTED with lsp-ada_execute_command.adb #1198

Closed Blady-Com closed 3 weeks ago

Blady-Com commented 4 weeks ago

Environment

Bug Summary and Reproducer

Bug Summary: Provoque a compiler error. Steps to reproduce: Get ALS source from GNATStudio 25.0w. 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_driver.adb
   [Ada]          lsp-ada_commands.adb
   [Ada]          lsp-ada_declaration.adb
   [Ada]          lsp-ada_definition.adb
   [Ada]          lsp-ada_did_change_configurations.adb
   [Ada]          lsp-ada_did_change_document.adb
   [Ada]          lsp-ada_document_symbol.adb
   [Ada]          lsp-ada_execute_command.adb
   [Ada]          lsp-ada_folding_range.adb
   [Ada]          lsp-ada_handlers.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                      |

Expected behavior: Compilation is correct.

Configuration and Logs

none

Other VS Code Extensions

No response

Additional context

No response

AnthonyLeonardoGracio commented 4 weeks ago

Hello @Blady-Com,

This looks like a compiler bug to me: I think you should report it to the Darwin's toolchain maintainer.

Regards,

Blady-Com commented 4 weeks ago

Hello @AnthonyLeonardoGracio,

Thanks for your quick answer. Bug 115376 reported on GCC Bugzilla.

Regards, Pascal.

reznikmm commented 1 week ago

You can cherry-pick 6642c60 commit as a workaround.

Blady-Com commented 6 days ago

Thanks for the fix!