]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Do not set Global_Discard_Names in GNATprove_Mode
authorAndres Toom <toom@adacore.com>
Mon, 16 Mar 2026 09:55:09 +0000 (11:55 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 29 May 2026 08:49:50 +0000 (10:49 +0200)
GNATprove now supports the Image attribute of enumerated types. Hence,
it is important to keep the names of the enumeration literals to be able
to properly reason about them.

gcc/ada/ChangeLog:

* gnat1drv.adb (Adjust_Global_Switches): Do not set
Global_Discard_Names in GNATprove_Mode.

gcc/ada/gnat1drv.adb

index cbad1e0f19e8c56a0b33708089eaca529a94d9b8..03cbb30b5f591104e4fbe6d0bdf25ddec8ca5888 100644 (file)
@@ -527,12 +527,6 @@ procedure Gnat1drv is
                Warnsw.Warning_Doc_Switch,
              others => False));
 
-         --  Suppress the generation of name tables for enumerations, which are
-         --  not needed for formal verification, and fall outside the SPARK
-         --  subset (use of pointers).
-
-         Global_Discard_Names := True;
-
          --  Suppress the expansion of tagged types and dispatching calls,
          --  which lead to the generation of non-SPARK code (use of pointers),
          --  which is more complex to formally verify than the original source.