1// RUN: %clang_cc1 -fsyntax-only -verify %s 2 3// floating-point overloads 4 5__typeof__(0 + 0.0L) ld0; 6long double &ldr = ld0; 7 8__typeof__(0 + 0.0) d0; 9double &dr = d0; 10 11__typeof__(0 + 0.0f) f0; 12float &fr = f0; 13 14// integral promotions 15 16signed char c0; 17__typeof__(c0 + c0) c1; 18int &cr = c1; 19 20unsigned char uc0; 21__typeof__(uc0 + uc0) uc1; 22int &ucr = uc1; 23 24short s0; 25__typeof__(s0 + s0) s1; 26int &sr = s1; 27 28unsigned short us0; 29__typeof__(us0 + us0) us1; 30int &usr = us1; 31 32// integral overloads 33 34__typeof__(0 + 0UL) ul0; 35unsigned long &ulr = ul0; 36 37template<bool T> struct selector; 38template<> struct selector<true> { typedef long type; }; 39template<> struct selector<false> {typedef unsigned long type; }; 40__typeof__(0U + 0L) ui_l0; 41selector<(sizeof(long) > sizeof(unsigned int))>::type &ui_lr = ui_l0; 42 43__typeof__(0 + 0L) l0; 44long &lr = l0; 45 46__typeof__(0 + 0U) u0; 47unsigned &ur = u0; 48 49__typeof__(0 + 0) i0; 50int &ir = i0; 51