This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/5118: c4x-g++ Fails on Templates
- From: jeffaxelrodjunk at email dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 14 Dec 2001 17:09:42 -0000
- Subject: c++/5118: c4x-g++ Fails on Templates
- Reply-to: jeffaxelrodjunk at email dot com
>Number: 5118
>Category: c++
>Synopsis: c4x-g++ Fails on Templates
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Dec 14 09:16:02 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Jeff Axelrod
>Release: 3.0.2
>Organization:
>Environment:
cygwin
>Description:
To: Jake Dawley-Carr/DIL/Teradyne@Teradyne
cc:
Subject: GCC Bug
If you try to compile the following code fragment that uses templates, it generates bad assembly code if the -gcoff switch is used. What's weird is if I get rid of the virtual keyword on the destructor, it assembles fine. Any ideas?
FAILS: c4x-g++ -c -gcoff test.cc
PASSES: c4x-g++ -c test.cc
prompt> c4x-g++ -c -g test2.cc
/tmp/ccMHRRGe.s: Assembler messages:
/tmp/ccMHRRGe.s:11: Error: Rest of line ignored. First ignored character is `<'.
prompt>
Offending assembly line:
.sdef __vptr$d<5>
test.cc:
template <int Count>
class d
{
public:
d()
{
myInt = Count;
}
int myInt;
virtual ~d() {}
};
volatile d<5> instD;
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: