108ef80f4SNico Weber // RUN: %clang_cc1 -fsyntax-only -verify -std=gnu++11 %s
208ef80f4SNico Weber // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
308ef80f4SNico Weber 
408ef80f4SNico Weber #if !defined(__STRICT_ANSI__)
5*d7d45bf8SNemanja Ivanovic __float128 f;  // expected-error {{support for type '__float128' is not yet implemented}}
608ef80f4SNico Weber // But this should work:
708ef80f4SNico Weber template<typename> struct __is_floating_point_helper {};
8*d7d45bf8SNemanja Ivanovic template<> struct __is_floating_point_helper<__float128> {};
908ef80f4SNico Weber 
1008ef80f4SNico Weber // FIXME: This could have a better diag.
11*d7d45bf8SNemanja Ivanovic void g(int x, __float128 *y) {
12*d7d45bf8SNemanja Ivanovic   x + *y;  // expected-error {{invalid operands to binary expression ('int' and '__float128')}}
1308ef80f4SNico Weber }
1408ef80f4SNico Weber 
1508ef80f4SNico Weber #else
16*d7d45bf8SNemanja Ivanovic __float128 f;  // expected-error {{unknown type name '__float128'}}
1708ef80f4SNico Weber template<typename> struct __is_floating_point_helper {};
18*d7d45bf8SNemanja Ivanovic template<> struct __is_floating_point_helper<__float128> {};  // expected-error {{use of undeclared identifier '__float128'}}
1908ef80f4SNico Weber 
20*d7d45bf8SNemanja Ivanovic void g(int x, __float128 *y) {  // expected-error {{unknown type name '__float128'}}
21*d7d45bf8SNemanja Ivanovic   x + *y;
2208ef80f4SNico Weber }
2308ef80f4SNico Weber 
2408ef80f4SNico Weber #endif
25