[Bug ada/115917] New: GNAT fails to bootstrap with LTO and -Werror=lto-type-mismatch due to C_Version_String and gnat_version_string on x86_64-pc-linux-gnu
arsen at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jul 14 14:37:03 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115917
Bug ID: 115917
Summary: GNAT fails to bootstrap with LTO and
-Werror=lto-type-mismatch due to C_Version_String and
gnat_version_string on x86_64-pc-linux-gnu
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: arsen at gcc dot gnu.org
CC: dkm at gcc dot gnu.org
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build: x86_64-pc-linux-gnu
Created attachment 58657
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58657&action=edit
possible (regression untested, but build tested) fix
$summary
I've been using the attached patch as a workaround (or potentially a fix), but
I haven't regression tested it or sent it upstream yet.
../../gcc/gcc/ada/gnatvsn.adb:51:4: warning: type of
‘gnatvsn__c_version_string’ does not match original declaration
[-Wlto-type-mismatch]
51 | C_Version_String : char_array (0 .. Ver_Len_Max - 1);
| ^
../../gcc/gcc/ada/version.c:34:6: note: array types have different bounds
34 | char gnat_version_string[] = version_string;
| ^
../../gcc/gcc/ada/version.c:34:6: note: ‘gnat_version_string’ was previously
declared here
More information about the Gcc-bugs
mailing list