[zep fromtree] platform: stm: workaround compiler error #160
+8
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Make local function DMA_List_CheckNodesBaseAddresses() never inlined.
This fixes a build issue faced with with STM32H5 DMA HAL when building TF-M for regression tests with GCC11 and GCC12 compilers with optimization directives. The build issue is not very explicit, as reported by the build error trace message below:
during GIMPLE pass: evrp
/__w/zephyr/modules/tee/tf-m/trusted-firmware-m/platform/ext/target/stm/common/stm32h5xx/hal/Src/stm32h5xx_hal_dma_ex.c: In function 'HAL_DMAEx_List_ReplaceNode_Head': /__w/zephyr/modules/tee/tf-m/trusted-firmware-m/platform/ext/target/stm/common/stm32h5xx/hal/Src/stm32h5xx_hal_dma_ex.c:4683:1: internal compiler error: Segmentation fault
4683 | }
| ^
0x7f6e24cfb32f ???
./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x7f6e24ce01c9 __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
0x7f6e24ce028a __libc_start_main_impl
../csu/libc-start.c:360
Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See https://github.com/zephyrproject-rtos/sdk-ng/issues for instructions.
The issue was tracked in GCC [1] and has been addressed in GCC 13 and later.
This fix is equivalent to a fix already applied to HAL driver of stm32u5 and stm32wbaxx platforms, see commit 578a6f4 and ec61e69.
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106878 [1]