URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 338 |
// { dg-do assemble }
|
// { dg-do assemble }
|
// g++ 1.37.1 bug 900404_03
|
// g++ 1.37.1 bug 900404_03
|
|
|
// g++ fails to be able to properly flag errors for even simple cases of
|
// g++ fails to be able to properly flag errors for even simple cases of
|
// ambiguous overload resolution (such as the one shown below).
|
// ambiguous overload resolution (such as the one shown below).
|
|
|
// Cfront 2.0 passes this test.
|
// Cfront 2.0 passes this test.
|
|
|
// keywords: overloading, ambiguity, resolution
|
// keywords: overloading, ambiguity, resolution
|
|
|
void function0 (int i, char c) // { dg-message "function0" }
|
void function0 (int i, char c) // { dg-message "function0" }
|
{
|
{
|
i = c;
|
i = c;
|
}
|
}
|
|
|
void function0 (char c, int i) // { dg-message "function0" }
|
void function0 (char c, int i) // { dg-message "function0" }
|
{
|
{
|
i = c;
|
i = c;
|
}
|
}
|
|
|
char c;
|
char c;
|
|
|
void test ()
|
void test ()
|
{
|
{
|
function0 (c,c); // { dg-error "ambiguous" }
|
function0 (c,c); // { dg-error "ambiguous" }
|
}
|
}
|
|
|
int main () { return 0; }
|
int main () { return 0; }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.