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]

Re: Linux/PPC gcc 2.95.2 - bad access generated when using inline func



I get the following code for rtl_soft_cli with -O2 and gcc 2.95.2:

rtl_soft_cli:
        lis 10,rtl_local@ha
        lwz 0,rtl_local@l(10)
        la 8,rtl_local@l(10)
        andi. 9,0,2
        bc 12,2,.L1240
        lwz 9,-16(1)
        lis 11,last_cli@ha
        lwz 0,4(9)
        stw 0,last_cli@l(11)
.L1240:
        li 0,2
        1:      lwarx   9,0,8
        andc    9,9,0
        stwcx.  9,0,8
        bne     1b
        blr

I don't see that register 8 has the wrong value.  It looks like it
contains the address of the global variable rtl_local.  Could you be
more specific about what compiler flags you used, what assembler
output you got, and what is wong with it?

-- 
- Geoffrey Keating <geoffk@cygnus.com>

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