]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix LTO bootstrap failure with -Werror=lto-type-mismatch
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 9 Oct 2024 19:31:13 +0000 (21:31 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Wed, 9 Oct 2024 21:44:23 +0000 (23:44 +0200)
commit7ac96b05cfa7478706dce175e7c7b09cbf559451
treeef09a908b6b64bc46ce0fe76049cb402112573c3
parent820cd5266e714750888dd2cdf4793cde8741c1db
Fix LTO bootstrap failure with -Werror=lto-type-mismatch

In GNAT's implementation model, using convention C (or C_Pass_By_Copy) has
no effect on the internal representation of types since the representation
is identical to that of C by default.  It's even counter-productive given
the implementation advice listed in B.3(63-71) so the interface between the
front-end and gigi does not use it and instead uses structurally identical
types on both sides.

gcc/ada
PR ada/117038
* fe.h (struct c_array): Add 'const' to declaration of pointer.
(C_Source_Buffer): Use consistent formatting.
* par-ch3.adb (P_Component_Items): Properly set Aliased_Present on
access definition.
* sinput.ads: Remove clause for Interfaces.C.
(C_Array): Change type of Length to Integer and make both components
aliased.  Remove Convention aspect.
(C_Source_Buffer): Remove all aspects.
* sinput.adb (C_Source_Buffer): Adjust to above change.
gcc/ada/fe.h
gcc/ada/par-ch3.adb
gcc/ada/sinput.adb
gcc/ada/sinput.ads