Bug 9108 - [sparc] Illegal instruction code generation for operator=
Summary: [sparc] Illegal instruction code generation for operator=
Status: RESOLVED DUPLICATE of bug 10067
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.2.1
: P3 normal
Target Milestone: ---
Assignee: Eric Botcazou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-30 06:36 UTC by komiyama
Modified: 2003-06-12 00:15 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description komiyama 2002-12-30 06:36:01 UTC
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 
    ^^^^^

Release:
3.2.1

Environment:
sparcv9-sun-solaris2.8

How-To-Repeat:
Compile above sample with
 -O2 -mv8 

( without -O2, this error does not happen )
Comment 1 Eric Botcazou 2003-03-27 10:46:00 UTC
*** This bug has been marked as a duplicate of 10067 ***