Closed ghost closed 2 years ago
Thanks for your report. This issue is already fixed in the development version of gnatprove, though the current/expected behavior might not be what you want:
$ gnatprove
No project file given, creating default.gpr
Phase 1 of 2: generation of Global contracts ...
Phase 2 of 2: flow analysis and proof ...
proj1.adb:11:29: error: attribute "Image" on non-scalar type is not yet supported
11 | Put_Line ("A'Image: " & A'Image);
| ~^~~~~~
warning: no bodies have been analyzed by GNATprove
enable analysis of a non-generic body using SPARK_Mode
Summary logged in /home/kanig/tickets/40/gnatprove/gnatprove.out
Running gnatprove 12.1.1 on a minimal test of using the Ada 2022 feature of 'Image attribute on an array triggers an EXCEPTION_ACCESS_VIOLATION message instructing me to report the bug.
There is no segfault when compiling and running the program normally without SPARK.
As gnatprove triggers the bug I am not sure if it should be reported to gcc.gnu.org/bugs, or here, or elsewhere.
The minimal test used:
Expected behavior: no segfault.
Observed behavior: this segfault:
I'm using Alire. Here are my gnatprove and toolchain versions. I've elided output I think irrelevant: