re PR c++/21087 (ICE in do_nonmember_using_decl)
[gcc.git] / gcc / testsuite / g++.dg / lookup / builtin2.C
1 /* { dg-do compile } */
2
3 /* PR c++/21087 */
4
5 /* We used to overload the template function with the built-in
6 declaration, instead of replacing it as we should, and then barf at
7 the using decl because of a test that none of the overload set
8 members were anticipated built-ins. */
9
10 extern "C" signed int toupper(signed int __c) throw();
11 namespace std
12 {
13 template< typename a > a toupper(a,int){}
14 using ::toupper;
15 }
16
17 int f () {
18 std::toupper((signed int)'a');
19 }