Article View: gnu.g++.bug
Article #212Gcc 2.2.2, Irix 4.0.1, templates
From: Antti Miettinen
Date: Sat, 08 Aug 1992 14:07
Date: Sat, 08 Aug 1992 14:07
58 lines
2573 bytes
2573 bytes
With gcc version 2.2.2 on Irix 4.0.1 the following code:
---clip---clip---clip---clip---clip---clip---clip---clip---clip---
template <class T, int num>
class foo_c
{
public:
T elem[num];
};
foo_c<float,3> foo;
---clip---clip---clip---clip---clip---clip---clip---clip---clip---
when compiled with debuggin information enabled, produces the
following error messages:
---clip---clip---clip---clip---clip---clip---clip---clip---clip---
gcc -c -g foo.cc
mips-tfile, /usr/tmp/cca13804.s:12 compiler error, badly formed #.def (internal line # = 2917)
line: #.def foo_c<float ,3>; .scl 10; .type 0x8; .size 12; .endef
mips-tfile, /usr/tmp/cca13804.s:14 compiler error, badly formed #.def (internal line # = 2983)
line: #.def .eos; .val 12; .scl 102; .tag foo_c<float ,3>; .size 12; .endef
mips-tfile, /usr/tmp/cca13804.s:15 compiler error, badly formed #.def (internal line # = 2917)
line: #.def foo_c<float ,3>; .scl 13; .tag foo_c<float ,3>; .size 12; .type 0x8; .endef
mips-tfile, /usr/tmp/cca13804.s:16 compiler error, badly formed #.def (internal line # = 2983)
line: #.def foo; .val foo; .scl 2; .tag foo_c<float ,3>; .size 12; .type 0x8; .endef
---clip---clip---clip---clip---clip---clip---clip---clip---clip---
The assembly produced by the compiler is:
---clip---clip---clip---clip---clip---clip---clip---clip---clip---
.file 1 "foo.cc"
# GNU C++ 2.2.2 [AL 1.1, MM 19] Silicon Graphics Mips compiled by GNU C
# Cc1 defaults:
# Cc1 arguments (-G value = 8, Cpu = default, ISA = 1):
# -quiet -dumpbase -g -o
gcc2_compiled.:
.text
#.def foo_c<float ,3>; .scl 10; .type 0x8; .size 12; .endef
#.def elem; .val 0; .scl 8; .dim 3; .size 12; .type 0x36; .endef
#.def .eos; .val 12; .scl 102; .tag foo_c<float ,3>; .size 12; .endef
#.def foo_c<float ,3>; .scl 13; .tag foo_c<float ,3>; .size 12; .type 0x8; .endef
#.def foo; .val foo; .scl 2; .tag foo_c<float ,3>; .size 12; .type 0x8; .endef
.comm foo,16
---clip---clip---clip---clip---clip---clip---clip---clip---clip---
By the way, if I don't see my reports in the newsgroup, should I
mail them again or is this an indication that the problem is already
fixed?
Technical Details
Message-ID:
<9208080807.AA13826@kikka.hut.fi>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!kikka.hut.fi!apmShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!kikka.hut.fi!apm From: apm@kikka.hut.fi (Antti Miettinen) Subject: Gcc 2.2.2, Irix 4.0.1, templates Message-ID: <9208080807.AA13826@kikka.hut.fi> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Sat, 8 Aug 1992 14:07:29 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 61