2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / ext / fnname2.C
blobea0c1826f45a6d60841e5edf76c92bec7aa4b5e9
1 // Test whether __func__ works for ordinary member functions.
3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Matt Austern <austern@apple.com>, 3 Aug 2003
5 // { dg-do run }
7 struct y8a
9   const char* zqjx(int, char);
12 const char* y8a::zqjx(int, char)
14   return __func__;
18 int main()
20   y8a tmp;
21   const char* s = tmp.zqjx(16, 'x');
22   bool ok = true;
24   ok = ok && s[0] == 'z';
25   ok = ok && s[1] == 'q';
26   ok = ok && s[2] == 'j';
27   ok = ok && s[3] == 'x';
28   ok = ok && s[4] == '\0';
30   return ok ? 0 : 1;