Path: utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!UUNET.UU.NET!jclark!jjc From: jclark!jjc@UUNET.UU.NET (James Clark) Newsgroups: gnu.g++.bug Subject: 1.35.0- double alignment problems Message-ID: <8905102338.AA24275@jclark.uucp> Date: 10 May 89 23:38:57 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 44 g++ 1.35.0- on the sparc fails to align doubles on an 8 byte boundary: Script started on Thu May 11 00:32:04 1989 jclark% cat test.c double d; main() { d = 0.0; } jclark% make test /u/local/g++/g++ -B/u/local/g++/ -g -v -sun4 -o test test.c g++ version 1.35.0- /usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ test.c /tmp/cca24267.cpp GNU CPP version 1.35 /u/local/g++/cc1plus /tmp/cca24267.cpp -quiet -dumpbase test.c -noreg -version -G -o /tmp/cca24267.s GNU C++ version 1.35.0- (sparc) compiled by GNU C version 1.35. as /tmp/cca24267.s -o test.o /u/local/g++/ld++ -o test -C -C /u/local/g++/crt0+.o test.o -lg++ /usr/local/lib/gcc-gnulib -lg -lc /u/local/g++/g++: unrecognized option `-sun4' jclark% test Bus error (core dumped) jclark% gdb test core GDB 3.1, Copyright (C) 1988 Free Software Foundation, Inc. There is ABSOLUTELY NO WARRANTY for GDB; type "info warranty" for details. GDB is free software and you are welcome to distribute copies of it under certain conditions; type "info copying" to see the conditions. Reading symbol data from /u/jjc/test/test...done. Core file is from "test". Program terminated with signal 10, Bus error. Type "help" for a list of commands. (gdb) where #0 0x2128 in main () (test.c line 5) (gdb) print &d $1 = (double *) 0x660c (gdb) quit jclark% exit jclark% script done on Thu May 11 00:32:47 1989 This won't cause a core dump on a Sun 4 unless an FPU is installed. James Clark jjc@jclark.uucp