Created attachment 52327 [details] Requested source files I originally found this error compiling for STM32F4, using both ravenscar-sfp-stm32f4 and my cortex-gnat-rts equivalent. However, it also shows up in a native compilation. Neither option on its own caused a problem. Compiling from the attached source with gnatmake stm32-spi-dma.adb -c -u -f -gnata -fcallgraph-info=su gives gcc -c -gnata -fcallgraph-info=su stm32-spi-dma.adb targetname: "+===========================GNAT BUG DETECTED==============================+ | 12.0.1 20220128 (experimental) (x86_64-apple-darwin15) Assert_Failure exp_cg.adb:484| | No source file position information available | | Compiling stm32-spi-dma.adb | | Please submit a bug report; see https://gcc.gnu.org/bugs/ . | | Use a subject line meaningful to you and us to track the bug. | | Include the entire contents of this bug box in the report. | | Include the exact command that you entered. | | Also include sources listed below. | +==========================================================================+ Please include these source files with error report Note that list may not be accurate in some cases, so please double check that the problem can still be reproduced with the set of files listed. Consider also -gnatd.n switch (see debug.adb). stm32-spi-dma.adb stm32-spi-dma.ads stm32-spi.ads stm32.ads hal.ads stm32_svd.ads stm32_svd-spi.ads hal-spi.ads stm32-dma.ads stm32_svd-dma.ads stm32-dma-interrupts.ads
Indeed, best not to mix both options for now.
This doesn’t occur in 12.2.0 or 13.1.0, but has reappeared in gcc version 14.0.1 20240218 (experimental) (GCC). New reproducer uploaded (same files, new content). gcc -c -gnata -fcallgraph-info=su stm32-spi-dma.adb targetname: "+===========================GNAT BUG DETECTED==============================+ | 14.0.1 20240218 (experimental) (x86_64-apple-darwin21) Assert_Failure exp_cg.adb:484| | No source file position information available | | Compiling stm32-spi-dma.adb | | Please submit a bug report; see https://gcc.gnu.org/bugs/ . | | Use a subject line meaningful to you and us to track the bug. | | Include the entire contents of this bug box in the report. | | Include the exact command that you entered. | | Also include sources listed below. | +==========================================================================+ Please include these source files with error report Note that list may not be accurate in some cases, so please double check that the problem can still be reproduced with the set of files listed. Consider also -gnatd.n switch (see debug.adb). stm32-spi-dma.adb stm32-spi-dma.ads stm32-spi.ads stm32.ads hal.ads stm32_svd.ads stm32_svd-spi.ads hal-spi.ads stm32-dma.ads stm32_svd-dma.ads stm32-dma-interrupts.ads compilation abandoned gnatmake: "stm32-spi-dma.adb" compilation error
Created attachment 57530 [details] Reproducer (14.0.1)
Release branches simply do not have assertions enabled.
That thought occurred to me, but does that mean that if this code is compiled with a release branch Bad Things will happen? (I guess the code would probably have to get executed for that to occur)
> That thought occurred to me, but does that mean that if this code is > compiled with a release branch Bad Things will happen? (I guess the code > would probably have to get executed for that to occur) It's related to -fcallgraph-info=su and this doesn't affect the generated code.