To reproduce
$ cat >dut.ads
package DUT is
procedure Dummy
with Test_Case => ("Test_Dummy", Nominal);
end DUT;
$ cat >dut.gpr
project DUT is
for Source_Dirs use ("./");
end DUT;
And then:
$ gnattest -P dut.gpr
$ gnatformat -P dut.gpr --verbose gnattest/tests/dut-test_data-tests.adb
[GNATFORMAT] GNATformat 26.0.0 976b276ba6
[GNATFORMAT] Elaborating GPR2
[GNATFORMAT] Resolving project file
[GNATFORMAT] Using the default unparsing configuration
[GNATFORMAT] Successfully loaded project "dut.gpr"
[GNATFORMAT] Getting command line sources
[GNATFORMAT] Resolving gnattest/tests/dut-test_data-tests.adb
[GNATFORMAT] Project does not have a Format package
[GNATFORMAT] Processing project source dut-test_data-tests.adb
Failed to format gnattest/tests/dut-test_data-tests.adb
Original source does not contain the same amount of markers as the formatted source
[GNATFORMAT] raised GNATFORMAT.FORMATTING.INTERNAL_ERROR_OFF_ON_INVALID_MARKER : Original source does not contain the same amount of markers as the formatted source
_GNATFORMAT_ Load address: 0x564469dca000
_GNATFORMAT_ Call stack traceback locations:
_GNATFORMAT_ 0x56446a7ba9a2 0x56446a7bad4a 0x56446a7bae5c 0x56446a7471c0 0x56446a749b28 0x56446a6a09c6 0x56446a69990c 0x7f42f3d61ca6 0x7f42f3d61d63 0x56446a69f54f 0xfffffffffffffffe
[GNATFORMAT] Load address: 0x564469dca000
_GNATFORMAT_ [/home/jq/.alire/bin/gnatformat]
_GNATFORMAT_ 0x56446a7ba9a2 Gnatformat.Formatting.Restore_Off_On_Sections at gnatformat-formatting.adb:509
_GNATFORMAT_ 0x56446a7bad4a Gnatformat.Formatting.Format.Localalias at gnatformat-formatting.adb:606
_GNATFORMAT_ 0x56446a7bae5c Gnatformat.Formatting.Format.2.Localalias at gnatformat-formatting.adb:42
_GNATFORMAT_ 0x56446a7471c0 Gnatformat.Full_Format.Full_Format.Process_Project_Source at gnatformat-full_format.adb:186
_GNATFORMAT_ 0x56446a749b28 Gnatformat.Full_Format.Full_Format at gnatformat-full_format.adb:461
_GNATFORMAT_ 0x56446a6a09c6 Gnatformat.Ada_Driver at gnatformat-ada_driver.adb:197
_GNATFORMAT_ 0x56446a69990c Main at b__gnatformat-ada_driver.adb:4168
_GNATFORMAT_ [/lib/x86_64-linux-gnu/libc.so.6]
_GNATFORMAT_ 0x7f42f3d61ca6
_GNATFORMAT_ 0x7f42f3d61d63
_GNATFORMAT_ [/home/jq/.alire/bin/gnatformat]
_GNATFORMAT_ 0x56446a69f54f _start at ???
_GNATFORMAT_ 0xfffffffffffffffe
This error was an internal bug, please consider reporting it with the --verbose traces
Versions
gnatformat from Alire:
$ gnatformat --version
GNATformat 26.0.0 (976b276ba6)
gnattest from Alire
$ gnattest --version
GNATTEST Pro dev
Copyright (C) 2004-unknown, AdaCore.
This is free software; see the source for copying conditions.
See your AdaCore support agreement for details of warranty and support.
If you do not have a current support agreement, then there is absolutely
no warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
To reproduce
And then:
Versions
gnatformatfrom Alire:gnattestfrom Alire