view gcc/testsuite/g++.dg/opt/reload2.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR 10352
// { dg-do compile }
// { dg-options -O2 }

extern double fabs(double x);

typedef struct { float x, y; } S;
typedef struct _T T;

extern void fT( T *p );
extern T *h();
extern S g( );

static
int f(void)
{
    T *t=0;
    int c=0;
    S s;

    const S exp_s = {0.,0.};

    if(!(t = h()))
    {
        c++;
    }

    if(!c)
    {
        s = g();
        if( (fabs( (s.x) - (exp_s.x) ) > 1 )
            || (fabs( (s.y) - (exp_s.y) ) > 1 ) )
        {
            c++;
        }
    }

    if(t)
        fT(t);

    return c;
}