From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4dd5c7301163bec5,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!r34g2000hsd.googlegroups.com!not-for-mail From: shaunpatterson@gmail.com Newsgroups: comp.lang.ada Subject: Misaligned address error Date: Fri, 07 Sep 2007 14:05:57 -0700 Organization: http://groups.google.com Message-ID: <1189199157.591747.278390@r34g2000hsd.googlegroups.com> NNTP-Posting-Host: 155.219.241.10 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1189199157 24230 127.0.0.1 (7 Sep 2007 21:05:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 7 Sep 2007 21:05:57 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20040803,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: r34g2000hsd.googlegroups.com; posting-host=155.219.241.10; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:1804 Date: 2007-09-07T14:05:57-07:00 List-Id: i'm working with some really old legacy code that seemed to be working fine with gnat pro 3.16a1. However, we decided to upgrade to gnat 5. Everything built fine - however, I'm getting a misaligned address value error at runtime: raised PROGRAM_ERROR : data_reader.2.ada:109 misaligned address value The code: subtype Data_Type is Character; type Data_Type_Array is array (Natural range <>) of Data_Type; Data_String : Data_Type_Array (1 .. 8) := (others => Data_Type (Ascii.Nul)); for Data_String'Alignment use 4; for Data_String'Size use 8 * Data_Type'Size; -- global data buffer for reading and writing to file -- quick conversion variables One_Byte_Number : One_Byte_Number_Type; for One_Byte_Number'Address use Data_String'Address; Two_Byte_Number : Two_Byte_Number_Type; for Two_Byte_Number'Address use Data_String'Address; Four_Byte_Number : Four_Byte_Number_Type; for Four_Byte_Number'Address use Data_String'Address; Four_Byte_Signed_Number : Four_Byte_Signed_Number_Type; for Four_Byte_Signed_Number'Address use Data_String'Address; Four_Byte_Float : Float_Type; for Four_Byte_Float'Address use Data_String'Address; Eight_Byte_Float : Long_Float_Type; for Eight_Byte_Float'Address use Data_String'Address; --- FAILS ON THIS LINE --- Could anyone help me make sense of this exception? thanks -- Shaun