[gnu.g++.bug] bug in g++ 1.36.1 under sun3-os4 ?

tietz@gmdzi.UUCP (Christoph Tietz) (11/10/89)

I am working on a SUN3 under SUNOS4.0.3 with gcc 1.36 and g++ 1.36.1.
I tried to install libg++ 1.36.1 with the result that the sun assembler
complains of invalid operands. The minimal program with the same behavior
follows:

-------------------------

// file: dings.cc

struct foo {
  foo () {}
} bar;

-------------------------

The compiler is called via:

-------------------------

g++-1.36.1 -v -g -c dings.cc
gcc version 1.36.1 (based on GCC 1.36)
 /gmdusr/g++/lib-1.36/gcc-cpp -+ -v -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 dings.cc /usr/tmp/cca02516.cpp
GNU CPP version 1.36
 /gmdusr/g++/lib-1.36/gcc-cc1plus /usr/tmp/cca02516.cpp -quiet -dumpbase dings.cc -g -version -o /usr/tmp/cca02516.s
GNU C++ version 1.36.1 (based on GCC 1.36) (68k, MIT syntax) compiled by GNU C version 1.36.
default target switches: -m68020 -mc68020 -m68881 -mbitfield
 as -mc68020 -o dings.o /usr/tmp/cca02516.s
as: error (/usr/tmp/cca02516.s:53): Invalid operand

------------------------

The generated assembler code is:

------------------------

#NO_APP
gcc_compiled.:
	.stabs "dings.cc",100,0,0,Ltext
Ltext:
.stabs "int:t1=r1;-2147483648;2147483647;",128,0,0,0
.stabs "char:t2=r2;0;127;",128,0,0,0
.stabs "long int:t3=r1;-2147483648;2147483647;",128,0,0,0
.stabs "unsigned int:t4=r1;0;-1;",128,0,0,0
.stabs "long unsigned int:t5=r1;0;-1;",128,0,0,0
.stabs "short int:t6=r1;-32768;32767;",128,0,0,0
.stabs "long long int:t7=r1;0;-1;",128,0,0,0
.stabs "unsigned short int:t8=r1;0;65535;",128,0,0,0
.stabs "long long unsigned int:t9=r1;0;-1;",128,0,0,0
.stabs "signed char:t10=r1;-128;127;",128,0,0,0
.stabs "unsigned char:t11=r1;0;255;",128,0,0,0
.stabs "float:t12=r1;4;0;",128,0,0,0
.stabs "double:t13=r1;8;0;",128,0,0,0
.stabs "long double:t14=r1;8;0;",128,0,0,0
.stabs "void:t15=15",128,0,0,0
.stabs "$vtbl_ptr_type:t16=s8delta:/26,0,16;index:/26,16,16;\\",128,0,0,0
.stabs "pfn:/217=*15,32,32;delta2:/26,32,16;;~;",128,0,0,0
.stabs "foo:t18=s1;~+;",128,0,0,0
.stabs "foo:T18",128,0,0,0
.stabs "foo:t18",128,0,0,0
.stabs "bar:G18",32,0,0,0
.globl _bar
.data
	.even
_bar:
	.skip 1
.stabs "_init",10,0,0,0
.stabs "__GLOBAL_$I$dings_cc",4,0,0,0
.text
	.even
.globl __GLOBAL_$I$dings_cc
__GLOBAL_$I$dings_cc:
	.stabd 68,0,5
	link a6,#0
LBB2:
	.stabd 68,0,4
LBB3:
	.stabd 68,0,3
	movel #_bar,d0
	movel d0,d1
L4:
LBE3:
LBE2:
	.stabd 68,0,4
L3:
	unlk a6
	rts
.stabs "_GLOBAL_$I$dings_cc:F15",36,0,0,__GLOBAL_$I$dings_cc
.stabs "___CTOR_LIST__",22,0,0,__GLOBAL_$I$dings_cc

---------------------------

The assembler complains about the last .stabs instruction.


Does that mean that I have to use the gas assembler or is this a real bug?

                                                 Christoph Tietz
-- 
GMD,  Schloss Birlinghoven,  Postfach 1240,  D-5205 St. Augustin 1,  FRG

e-mail:  tietz@zi.gmd.dbp.de                tietz@gmdzi.uucp
         tietz%zi.gmd.dbp.de@relay.cs.net   ... !uunet!unido!gmdzi!tietz

schmidt@zola.ics.uci.edu (Doug Schmidt) (11/11/89)

In article <1676@gmdzi.UUCP>, tietz@gmdzi (Christoph Tietz) writes:
>The assembler complains about the last .stabs instruction.
>
>
>Does that mean that I have to use the gas assembler or is this a real bug?

It means you need to use the gas assember.  Luckily, gas works nicely
on the sun 3's.

  Doug
--
Master Swordsman speak of humility;             | schmidt@ics.uci.edu (ARPA)
Philosophers speak of truth;                    | office: (714) 856-4034
Saints and wisemen speak of the Tao of no doubt;
The moon, sun, and sea speaks for itself. -- Hiroshi Hamada