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] - Rev 693

Compare with Previous | Blame | View Log

// Test whether __func__ works for namespace-scope C++ functions.

// Copyright (C) 2003 Free Software Foundation, Inc.
// Contributed by Matt Austern <austern@apple.com>, 3 Aug 2003
// { dg-do run }

namespace xyzzy
{
  const char* ab6(double, void*)
  {
    return __func__;
  }
}

int main()
{
  const char* s = xyzzy::ab6(2.3, (void*) 0);
  bool ok = true;

  ok = ok && s[0] == 'a';
  ok = ok && s[1] == 'b';
  ok = ok && s[2] == '6';
  ok = ok && s[3] == '\0';

  return ok ? 0 : 1;
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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