🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #1788

Problem with static double array

#1788
From: ELDER%VAX.OXFORD.AC.UK
Date: Fri, 24 Mar 1989 14:28
31 lines
1065 bytes
Version: 1.34.0
System:  Sun-4110 running SunOS 4.0.1
Files:   tm.h -> tm-sparc.h   md -> sparc.md

Source file:

static double s[16];

main()
$
    s[0] = 0;


Problem: compiling and running using
    g++ -o try try.cc
    try

provokes the message
    Bus error (core dumped)

Replacing double by float causes the problem to go away.
The original source file seems to work OK with gcc 1.34.0


PS A second general problem is that I cannot get g++ to produce
   dynamically linked executables, although gcc will do so.
   Is this a problem with ld++ ?

John Elder
Department of Biochemistry
University of Oxford
Technical Details
Message-ID: <8903241420.AA08915@prep.ai.mit.edu>
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!MITVMA.MIT.EDU!ELDER%VAX.OXFORD.AC.UK

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!MITVMA.MIT.EDU!ELDER%VAX.OXFORD.AC.UK
From: ELDER%VAX.OXFORD.AC.UK@MITVMA.MIT.EDU
Newsgroups: gnu.g++.bug
Subject: Problem with static double array
Message-ID: <8903241420.AA08915@prep.ai.mit.edu>
Date: 24 Mar 89 14:28:30 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 31