OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [ext/] [fnname2.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// Test whether __func__ works for ordinary member functions.
2
 
3
// Copyright (C) 2003 Free Software Foundation, Inc.
4
// Contributed by Matt Austern , 3 Aug 2003
5
// { dg-do run }
6
 
7
struct y8a
8
{
9
  const char* zqjx(int, char);
10
};
11
 
12
const char* y8a::zqjx(int, char)
13
{
14
  return __func__;
15
}
16
 
17
 
18
int main()
19
{
20
  y8a tmp;
21
  const char* s = tmp.zqjx(16, 'x');
22
  bool ok = true;
23
 
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';
29
 
30
  return ok ? 0 : 1;
31
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.