Summary: | dev-lang/erlang-26.2.1 fails to compile on x86 with gcc-14: erl_bits.c:551:9: error: invalid conversion from type _Float16 without option -msse2] | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Agostino Sarubbo <ago> |
Component: | Current packages | Assignee: | Matthew Smith <matthew> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | matthew, toolchain |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 914580 | ||
Attachments: | build.log |
Description
Agostino Sarubbo
2024-02-12 10:38:48 UTC
Created attachment 884795 [details]
build.log
build log and emerge --info
I think that this may be a regression in GCC 14. If the target doesn't support _Float16, GCC 13 errors on sizeof(_Float16), while GCC 14 returns 2. Making the configure script detect that _Float16 is supported. Test files: > $ cat sizeof.c > #include <stdio.h> > > int main() { printf("%lu\n", sizeof(_Float16)); } > $ cat cast.c > int main() { > _Float16 a = 0; > double b = (double) a; > } GCC 13 behaviour: > $ gcc-13 -mno-sse2 sizeof.c > sizeof.c: In function ‘main’: > sizeof.c:3:37: error: ‘_Float16’ is not supported on this target > 3 | int main() { printf("%lu\n", sizeof(_Float16)); } > | ^~~~~~~~ > $ gcc-13 -mno-sse2 cast.c > cast.c: In function ‘main’: > cast.c:2:3: error: ‘_Float16’ is not supported on this target > 2 | _Float16 a = 0; > | ^~~~~~~~ GCC 14 behaviour: > $ gcc-14 -mno-sse2 sizeof.c > $ ./a.out > 2 > $ gcc-14 -mno-sse2 cast.c > cast.c: In function ‘main’: > cast.c:2:3: error: invalid conversion to type ‘_Float16’ without option ‘-msse2’ > 2 | _Float16 a = 0; > | ^~~~~~~~ > cast.c:3:3: error: invalid conversion from type ‘_Float16’ without option ‘-msse2’ > 3 | double b = (double) a; > | ^~~~~~ |