blob: 5d67fc7cb7177ecc73dd510c54c576e62b3bb420 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only %s -verify -pedantic
Daniel Dunbarae3f4912008-10-02 23:30:31 +00002
3// Math stuff
4
5float g0 = __builtin_huge_val();
6double g1 = __builtin_huge_valf();
7long double g2 = __builtin_huge_vall();
8float g3 = __builtin_inf();
9double g4 = __builtin_inff();
10long double g5 = __builtin_infl();
11
12// GCC misc stuff
13
14extern int f();
15
Eli Friedmaneb32fde2009-04-28 03:13:54 +000016int h0 = __builtin_types_compatible_p(int,float);
Daniel Dunbarae3f4912008-10-02 23:30:31 +000017//int h1 = __builtin_choose_expr(1, 10, f());
18//int h2 = __builtin_expect(0, 0);
Chris Lattner46cfefa2008-10-06 05:42:39 +000019
20short somefunc();
21
Anders Carlsson9e09f5d2008-12-05 05:09:56 +000022short t = __builtin_constant_p(5353) ? 42 : somefunc();
23
Chris Lattner46cfefa2008-10-06 05:42:39 +000024