https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38644

--- Comment #73 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Satish M from comment #72)
> This bug still exists in GCC 4.8.2 ARM. It can reproduced by adding one more
> argument in 'doStreamReadBlock' function in test case.
> 
> /x86_64-unknown-linux-gnu/bin/gcc -B /x86_64-unknown-linux-gnu/bin
> -msoft-float -marm -mcpu=cortex-a9 -march=armv7-a -mno-thumb-interwork
> -mlong-calls -mno-unaligned-access -O2 test.c
> 
> extern int doStreamReadBlock (int *, char *, int size, int, int);
> 
> char readStream (int *s)
> {
>        char c = 0;
>        doStreamReadBlock (s, &c, 1, *s, 22);
>        return c;
> }
> 
> 00000000 <readStream>:
>    0: e1a0c00d        mov     ip, sp
>    4: e3a02000        mov     r2, #0
>    8: e92dd800        push    {fp, ip, lr, pc}
>    c: e24cb004        sub     fp, ip, #4
>   10: e24dd008        sub     sp, sp, #8
>   14: e24b100c        sub     r1, fp, #12
>   18: e3a0c016        mov     ip, #22
>   1c: e5612001        strb    r2, [r1, #-1]!
>   20: e3a02001        mov     r2, #1
>   24: e5903000        ldr     r3, [r0]
>   28: e58dc000        str     ip, [sp]
>   2c: e59fc00c        ldr     ip, [pc, #12]   ; 40 <readStream+0x40>
>   30: e12fff3c        blx     ip
>   34: e24bd00c        sub     sp, fp, #12        <---- Stack frame 
> de-allocated
>   38: e55b000d        ldrb    r0, [fp, #-13]     <---- Accessing stack.
>   3c: e89da800        ldm     sp, {fp, sp, pc}
>   40: 00000000        andeq   r0, r0, r0

Please open a new bugreport.

Reply via email to