public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/9108: Illeagal instuction code generation for operator=
@ 2002-12-30  6:36 komiyama
  0 siblings, 0 replies; only message in thread
From: komiyama @ 2002-12-30  6:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9108
>Category:       c++
>Synopsis:       Illeagal instuction code generation for operator=
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 30 06:36:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Takeo Komiyama
>Release:        3.2.1
>Organization:
>Environment:
sparcv9-sun-solaris2.8
>Description:
class test {

public:
  test  () {}; 
  ~test () {}; 

  test operator=(const test& right );
};

int main (void) {
    test* g;
    *g = test(); // this line cause problem
}

When compile with :g++ -O2 -mv8 test.cc -c -o test.o
It complain about 

/usr/ccs/bin/as: "/var/tmp//ccDsfW1g.s", line 19: error: missing branch conditional code
/usr/ccs/bin/as: "/var/tmp//ccDsfW1g.s", line 19: error: statement syntax

Because in assembly code,

26  .LLEHB1:
27          call    _ZN3ZDDaSERKS_, 0
28          mov     %l0, %o2
29          call    _ZN3ZDDD1Ev, 0
30          mov     %i0, %o0
31  .LLEHE1:
32          ba,pt,a %xcc, .LL7     <----- Here
33  .LL10:
34          call    _ZN3ZDDD1Ev, 0

It generate "ba,pt,a %xcc, .LL7" for operator= ,
but in SparcV9 architecture, it seems that it should be
 ba,a,pt %xcc, .LL7 
    ^^^^^
>How-To-Repeat:
Compile above sample with
 -O2 -mv8 

( without -O2, this error does not happen )
 
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-12-30 14:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-30  6:36 c++/9108: Illeagal instuction code generation for operator= komiyama

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).