From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,8aa51189d42a66a4 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-11-09 17:48:55 PST Newsgroups: comp.sys.dec Path: gmd.de!xlink.net!howland.reston.ans.net!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!csn!news.sinet.slb.com!rag.austin.nam.slb.com!aspen!lovell From: lovell@sdr.slb.com (John Lovell) Subject: Re: HELP!! : Unaligned access error on DEC Message-ID: Sender: news@sdr.slb.com Reply-To: lovell@sdr.slb.com Organization: Schlumberger-Doll Research References: <2boime$fs4@skates.gsfc.nasa.gov> Date: Tue, 9 Nov 1993 23:06:32 GMT In article fs4@skates.gsfc.nasa.gov, oneel@athena.gsfc.nasa.gov (Bruce O'Neel) writes: > >We have code in both fortran and C, and when we call a c routine from >fortran we get exactly this message. I figured it was a pointer >alignment problem (since we pass pointers to the C routine, fortran >remember?) but is there a way to solve this? > >Thanks for any and all help! > >bruce > Calling C from FORTRAN and vice versa should not necessarily cause you problems on the Alpha. One possibility could be that you are mixing floating point and double precision addresses. Recall that with ANSI C, given void test(x) float x; { } then x must be aligned on a double word boundary but with void test(float x) { } then x can be aligned on a single word boundary. (To my mind this is a screw-up with ANSI C, but that's a different issue...) Regards, John Lovell, Schlumberger-Doll, Ridgefield, CT 06877 lovell@sdr.slb.com, 203-431-5560