[RS6000] PR81996, __builtin_return_address(0) fails

2017-09-17 Thread Alan Modra
When -fstack-protector-all or -fsanitize=address, rs6000.h sets FRAME_GROWS_DOWNWARD. This breaks the assumption in rs6000_return_addr that the stack link is at frame_pointer+0. Bootstrapped and regression tested powerpc64le-linux and powerpc64-linux -m32/-m64. OK? PR target/81996

Re: [RS6000] PR81996, __builtin_return_address(0) fails

2017-09-17 Thread Segher Boessenkool
On Sun, Sep 17, 2017 at 10:21:23PM +0930, Alan Modra wrote: > When -fstack-protector-all or -fsanitize=address, rs6000.h sets > FRAME_GROWS_DOWNWARD. This breaks the assumption in > rs6000_return_addr that the stack link is at frame_pointer+0. Well, builtin_return_address(N) already works correct