🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by James Clark Wed, 10 May 1989 23:38
1.35.0- double alignment problems
#1976
Author: James Clark
Date: Wed, 10 May 1989 23:38
44 lines
1933 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads