Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 924361 - 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]
Summary: dev-lang/erlang-26.2.1 fails to compile on x86 with gcc-14: erl_bits.c:551:9:...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Matthew Smith
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-14 gcc-14-stable
  Show dependency tree
 
Reported: 2024-02-12 10:38 UTC by Agostino Sarubbo
Modified: 2024-11-01 17:47 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,400.80 KB, text/plain)
2024-02-12 10:38 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-02-12 10:38:48 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-lang/erlang-26.2.1 fails to compile.
Discovered on: x86 (internal ref: tinderbox_x86)
System: GCC-14-SYSTEM (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#GCC-14)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0014
Comment 1 Agostino Sarubbo gentoo-dev 2024-02-12 10:38:51 UTC
Created attachment 884795 [details]
build.log

build log and emerge --info
Comment 2 Matthew Smith gentoo-dev 2024-02-25 14:35:42 UTC
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;
>       |   ^~~~~~