summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-pr33142.c
blob: e0713774b851f6b9ef90cc5fba999ac0932b673c (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
26
27
28
/*
   pr33142.c from the execute part of the gcc torture tests.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

#include <stdlib.h>

int lisp_atan2(long dy, long dx) {
    if (dx <= 0)
        if (dy > 0)
            return abs(dx) <= abs(dy);
    return 0;
}

void
testTortureExecute (void)
{   
    volatile long dy = 63, dx = -77;
    if (lisp_atan2(dy, dx))
        ASSERT(0);
    return;
}