1*08ef80f4SNico Weber // RUN: %clang_cc1 -fsyntax-only -verify -std=gnu++11 %s
2*08ef80f4SNico Weber // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
3*08ef80f4SNico Weber 
4*08ef80f4SNico Weber #if !defined(__STRICT_ANSI__)
5*08ef80f4SNico Weber __float128 f;  // expected-error {{support for type '__float128' is not yet implemented}}
6*08ef80f4SNico Weber // But this should work:
7*08ef80f4SNico Weber template<typename> struct __is_floating_point_helper {};
8*08ef80f4SNico Weber template<> struct __is_floating_point_helper<__float128> {};
9*08ef80f4SNico Weber 
10*08ef80f4SNico Weber // FIXME: This could have a better diag.
11*08ef80f4SNico Weber void g(int x, __float128 *y) {
12*08ef80f4SNico Weber   x + *y;  // expected-error {{invalid operands to binary expression ('int' and '__float128')}}
13*08ef80f4SNico Weber }
14*08ef80f4SNico Weber 
15*08ef80f4SNico Weber #else
16*08ef80f4SNico Weber __float128 f;  // expected-error {{unknown type name '__float128'}}
17*08ef80f4SNico Weber template<typename> struct __is_floating_point_helper {};
18*08ef80f4SNico Weber template<> struct __is_floating_point_helper<__float128> {};  // expected-error {{use of undeclared identifier '__float128'}}
19*08ef80f4SNico Weber 
20*08ef80f4SNico Weber void g(int x, __float128 *y) {  // expected-error {{unknown type name '__float128'}}
21*08ef80f4SNico Weber   x + *y;
22*08ef80f4SNico Weber }
23*08ef80f4SNico Weber 
24*08ef80f4SNico Weber #endif
25