aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr104992-1.C
blob: 02b288216feaac2898d17aeeb6d46667f8011f59 (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
29
30
/* PR tree-optimization/104992 */
/* { dg-do run } */
/* { dg-options "-O2 -Wno-psabi" } */

#include "../gcc.dg/pr104992.c"

int main () {

    /* Should be true.  */
    if (!foo(6, 3)
        || !bar(12, 2)
        || !baz(34, 17)
        || !qux(50, 10)
        || !fred(16, 8)
        || !baz(-9, 3)
        || !baz(9, -3)
        || !baz(-9, -3)
        ) {
            __builtin_abort();
         }
    
    /* Should be false.  */
    if (foo(5, 30)
        || bar(72, 27)
        || baz(42, 15)) {
            __builtin_abort();
        }
    
    return 0;
}