This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/5118: c4x-g++ Fails on Templates



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]