https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108340
Bug ID: 108340 Summary: compiler segfault Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: julien.staub at se dot com Target Milestone: --- Created attachment 54216 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54216&action=edit minimal file to reproduce To reproduce : 1. Downloaded arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi.zip from https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads 2. In attached zip, modify and run compilerBug.bat (will just compile 1 faulty file known to work) 3. observe segmentation fault in compiler Actual Results: What happened after performing the above steps. ``` C:\FW>"C:\GIT\FW_Toolchain\GNU Tools ARM Embedded\12.2.rel1\bin\arm-none-eabi-gcc.exe" -DSTM32U575xx=1 -IC:/FW/minimalInc -O3 -DNDEBUG -freport-bug -mcpu=cortex-m33 -mthumb -mfpu=fpv5-sp-d16 -mfloat-abi=hard --specs=nano.specs -ffunction-sections -fdata-sections -fno-builtin -Wall -Wfatal-errors -O3 -std=gnu17 -o stm32u5xx_hal_dma_ex.c.obj -c C:/FW/minimalInc/stm32u5xx_hal_dma_ex.c during GIMPLE pass: evrp C:/FW/minimalInc/stm32u5xx_hal_dma_ex.c: In function 'HAL_DMAEx_List_ReplaceNode_Head': C:/FW/minimalInc/stm32u5xx_hal_dma_ex.c:4689:1: internal compiler error: Segmentation fault 4689 | } | ^ Please submit a full bug report, with preprocessed source. See <https://bugs.linaro.org/> for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. ``` It's possible to reproduce issue with only godbolt : https://godbolt.org/z/oG8rGfG4E and GCC 11.x to 12.2 seem affected. -O0 will not show the bug. I also opened the bug on Linaro for arm-none-aebi-gcc build but it seems this is a GCC issue and I did not find it bug list. https://bugs.linaro.org/show_bug.cgi?id=5924