summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr49799.c
blob: 61ac261be51fdf2648aeedd087cc13d6ffeccec8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* PR rtl-optimization/49799 */
/* { dg-do assemble } */
/* { dg-options "-O2 -w" } */

static __inline int bar(int a)
{
    int tmp;

    if (a <= 0) a ^= 0xFFFFFFFF;

    return tmp - 1;
}

void foo(short *K)
{
    short tmp;
    short *pptr, P[14];

    pptr = P;
    tmp = bar(*K);
    *pptr = (*K << tmp) >> 16;

    if (*P < tmp)
        *K++ = 0;
}