🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by James Clark Sun, 12 Mar 1989 09:13
g++ 1.34.0 sparc bug
#1727
Author: James Clark
Date: Sun, 12 Mar 1989 09:13
47 lines
1843 bytes
g++ 1.34.0 (test release of Mar 3) configured for the SPARC on a Sun 4/110
running Sun OS 4.0 generates code that incorrectly causes a bus error.

Script started on Sun Mar 12 09:00:33 1989
jclark% cat bug.c

struct foo {
	double x;
	foo();
};

foo::foo()
{
  x = 1.0;
}

static foo f;

main()
{
  exit(0);
}
jclark% g++ -g -v bug.c
g++ version 1.34.0
 /usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ bug.c /tmp/cca03381.cpp
GNU CPP version 1.34
 /usr/local/lib/gcc-c++ /tmp/cca03381.cpp -quiet -dumpbase bug.c -g -version -o /tmp/cca03381.s
GNU C++ version 1.34.0 (sparc) compiled by GNU C version 1.34.
 as /tmp/cca03381.s -o bug.o
 /usr/local/lib/gcc-ld++ -C -e start -dc -dp /usr/local/lib/crt0+.o bug.o -lg++ /usr/local/lib/gcc-gnulib -lg -lc
jclark% a.out
Bus error (core dumped)
jclark% gdb a.out 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/groff/a.out...done.
Core file is from "a.out".
Program terminated with signal 10, Bus error.
Type "help" for a list of commands.
(gdb) frame
#0  0x2164 in foo ($this=(struct foo *) 0x6584) (bug.c line 9)
9	  x = 1.0;
(gdb) quit
jclark% exit
jclark% 
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