This is the mail archive of the gcc-prs@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++/9108: Illeagal instuction code generation for operator=


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


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