URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 384 |
// Test whether __func__ works for namespace-scope C++ functions.
|
// Test whether __func__ works for namespace-scope C++ functions.
|
|
|
// Copyright (C) 2003 Free Software Foundation, Inc.
|
// Copyright (C) 2003 Free Software Foundation, Inc.
|
// Contributed by Matt Austern , 3 Aug 2003
|
// Contributed by Matt Austern , 3 Aug 2003
|
// { dg-do run }
|
// { dg-do run }
|
|
|
namespace xyzzy
|
namespace xyzzy
|
{
|
{
|
const char* ab6(double, void*)
|
const char* ab6(double, void*)
|
{
|
{
|
return __func__;
|
return __func__;
|
}
|
}
|
}
|
}
|
|
|
int main()
|
int main()
|
{
|
{
|
const char* s = xyzzy::ab6(2.3, (void*) 0);
|
const char* s = xyzzy::ab6(2.3, (void*) 0);
|
bool ok = true;
|
bool ok = true;
|
|
|
ok = ok && s[0] == 'a';
|
ok = ok && s[0] == 'a';
|
ok = ok && s[1] == 'b';
|
ok = ok && s[1] == 'b';
|
ok = ok && s[2] == '6';
|
ok = ok && s[2] == '6';
|
ok = ok && s[3] == '\0';
|
ok = ok && s[3] == '\0';
|
|
|
return ok ? 0 : 1;
|
return ok ? 0 : 1;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.