Article View: gnu.gcc.bug
Article #384G++ V2.1 PROBLEMS?
From: Ian Macpherson
Date: Tue, 14 Apr 1992 09:15
Date: Tue, 14 Apr 1992 09:15
90 lines
2224 bytes
2224 bytes
Hello,
We've just got gcc-2.1. I've installed it on a number of sun4
machines and used it to successfully build programs such as libg++
and groff.
However, on a sun3 (a SUN 3/50) the C++ compiler has problems
building groff and libg++. The SUN assembler objects to the .stabs
directive generated by the compiler. The details of the system
are:
Host: SUN 3/50
OS: SUNOS 4.1
Host compiler: GCC 1.40
Host assembler: Sun as
Configuration: sun3-sunos4.1 --nfp
Linked `config.h' to `./config/xm-m68k.h'
Linked `tm.h' to `./config/sun3n.h'
Linked `md' to `./config/m68k.md'
Linked `aux-output.c' to `./config/m68k.c'
Linked `tconfig.h' to `./config/xm-m68k.h'
As an example, here is the assembler output and errors from
compiling the groff 1.05 c++test.c program:
====================== C++ source =============================
#include <stdio.h>
struct A {
A() { fputs("A\n", stdout); }
~A() { fputs("~A\n", stdout); }
};
A a;
main()
{
return 0;
}
====================== assembler code & errors ================
#NO_APP
gcc2_compiled.:
.text
LC0:
.ascii "A\12\0"
LC1:
.ascii "~A\12\0"
.globl _a
.data
.even
_a:
.skip 1
.text
.even
.globl _main
_main:
link a6,#0
jbsr ___main
clrl d0
unlk a6
rts
.even
.globl __GLOBAL_$D$a
__GLOBAL_$D$a:
link a6,#0
pea __iob+20
pea LC1
jbsr _fputs
unlk a6
rts
.stabs "___DTOR_LIST__",22,0,0,__GLOBAL_$D$a
as: error (c++test.s:31): Invalid operand
.even
.globl __GLOBAL_$I$a
__GLOBAL_$I$a:
link a6,#0
pea __iob+20
pea LC0
jbsr _fputs
unlk a6
rts
.stabs "___CTOR_LIST__",22,0,0,__GLOBAL_$I$a
as: error (c++test.s:41): Invalid operand
--
Ian Macpherson
Phone: +44 (923) 258229
Email: uknet!case!ian or ian@case.co.uk
--
Technical Details
Message-ID:
<9204140915.AA01055@trillian.case.uucp>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!case.co.UK!ianShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!case.co.UK!ian From: ian@case.co.UK (Ian Macpherson) Subject: G++ V2.1 PROBLEMS? Message-ID: <9204140915.AA01055@trillian.case.uucp> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Tue, 14 Apr 1992 09:15:28 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 91