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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [fnname1.C] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Test whether __func__ works for namespace-scope C++ functions.
2
 
3
// Copyright (C) 2003 Free Software Foundation, Inc.
4
// Contributed by Matt Austern , 3 Aug 2003
5
// { dg-do run }
6
 
7
namespace xyzzy
8
{
9
  const char* ab6(double, void*)
10
  {
11
    return __func__;
12
  }
13
}
14
 
15
int main()
16
{
17
  const char* s = xyzzy::ab6(2.3, (void*) 0);
18
  bool ok = true;
19
 
20
  ok = ok && s[0] == 'a';
21
  ok = ok && s[1] == 'b';
22
  ok = ok && s[2] == '6';
23
  ok = ok && s[3] == '\0';
24
 
25
  return ok ? 0 : 1;
26
}

powered by: WebSVN 2.1.0

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