Hi Michael,
On Tue, Oct 14, 2014 at 04:24:13PM +0200, Michael Matz wrote:
> Hi,
>
> On Tue, 14 Oct 2014, Jamie Iles wrote:
>
> > int foo(void)
> > {
> > if (getreturn() != 0)
> > return -1;
> >
> > return 0;
> > }
>
> So if getreturn(
Hi,
On Tue, 14 Oct 2014, Jamie Iles wrote:
> int foo(void)
> {
> if (getreturn() != 0)
> return -1;
>
> return 0;
> }
So if getreturn() returns zero it can simply reuse that return value ...
> but at -O1 I get
>
> 10:
Hi folks,
I'm retargetting GCC to a custom architecture
(https://github.com/jamieiles/gcc-oldland is the retarget) and have an
odd problem with function return values near the end of a function being
eliminated. For example:
extern int getreturn(void);
int foo(void)