fenix
fenix copied to clipboard
aarch64-none-linux-gnu-gcc unable to compile float expressions
I am building branch khadas-linux-6.1.y with fenix tool using docker and got errors related to preprocessing floating expressions.
Related issue https://bugs.launchpad.net/gcc-arm-embedded/+bug/1969997
To reproduce issue we can use the following code
int main()
{
float a=10000.0;
return a/111;
}
Now if try to compile it I am getting the following issue
khadas@9e20d77e1e56:~/fenix$ /home/khadas/fenix/build/toolchains/gcc-arm-aarch64-none-linux-gnu-mainline/bin/aarch64-none-linux-gnu-gcc -O0 -c a.c
a.c: In function ‘main’:
a.c:9:5: internal compiler error: Illegal instruction
9 | float a=10000.0;
| ^~~~~
0x1732310 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1], diagnostic_t)
???:0
0x1732f96 internal_error(char const*, ...)
???:0
0xc24faf crash_signal(int)
???:0
0x1935b09 __gmpn_mul_basecase
???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://bugs.linaro.org/> for instructions.
Same issues happens when building linux kernel
UPD: Same code building well with toolchain gcc-arm-aarch64-none-linux-gnu
(without mainline
suffix). So version 11.2-2022.02
(mainline) seems broken, but 10.3-2021.07
work well
khadas@9e20d77e1e56:~/fenix$ /home/khadas/fenix/build/toolchains/gcc-arm-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc -O0 -c a.c