c++/5118: c4x-g++ Fails on Templates
jeffaxelrodjunk@email.com
jeffaxelrodjunk@email.com
Fri Dec 14 09:16:00 GMT 2001
>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:
More information about the Gcc-prs
mailing list