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 ordinary member functions.
|
// Test whether __func__ works for ordinary member 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 }
|
|
|
struct y8a
|
struct y8a
|
{
|
{
|
const char* zqjx(int, char);
|
const char* zqjx(int, char);
|
};
|
};
|
|
|
const char* y8a::zqjx(int, char)
|
const char* y8a::zqjx(int, char)
|
{
|
{
|
return __func__;
|
return __func__;
|
}
|
}
|
|
|
|
|
int main()
|
int main()
|
{
|
{
|
y8a tmp;
|
y8a tmp;
|
const char* s = tmp.zqjx(16, 'x');
|
const char* s = tmp.zqjx(16, 'x');
|
bool ok = true;
|
bool ok = true;
|
|
|
ok = ok && s[0] == 'z';
|
ok = ok && s[0] == 'z';
|
ok = ok && s[1] == 'q';
|
ok = ok && s[1] == 'q';
|
ok = ok && s[2] == 'j';
|
ok = ok && s[2] == 'j';
|
ok = ok && s[3] == 'x';
|
ok = ok && s[3] == 'x';
|
ok = ok && s[4] == '\0';
|
ok = ok && s[4] == '\0';
|
|
|
return ok ? 0 : 1;
|
return ok ? 0 : 1;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.