DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
Ulrich Weigand
weigand@immd1.informatik.uni-erlangen.de
Thu Apr 10 16:44:00 GMT 2003
Geoff Keating wrote:
> I'd consider this a bug *somewhere*. I'd think that if the Ada
> frontend is going to do this, then in the C sources the variables need
> to be marked with the appropriate alignment.
If I use this patch in addition to the s390 backend fix,
Ada bootstrap goes through on 64-bit:
Index: gcc/ada/bindgen.adb
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/bindgen.adb,v
retrieving revision 1.9
diff -c -p -r1.9 bindgen.adb
*** gcc/ada/bindgen.adb 15 Nov 2002 01:45:29 -0000 1.9
--- gcc/ada/bindgen.adb 10 Apr 2003 02:20:56 -0000
*************** package body Bindgen is
*** 485,491 ****
begin
if U.Set_Elab_Entity then
! Set_String (" extern char ");
Get_Name_String (U.Uname);
Set_Unit_Name;
Set_String ("_E;");
--- 485,491 ----
begin
if U.Set_Elab_Entity then
! Set_String (" extern char __attribute__((__aligned__(1))) ");
Get_Name_String (U.Uname);
Set_Unit_Name;
Set_String ("_E;");
I'm not sure whether this is the preferred fix; in particular
I don't understand why those variables need to have forced
alignment in the first place ...
Bye,
Ulrich
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de
More information about the Gcc
mailing list