URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.bugs/] [900127_01.C] - Rev 700
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do assemble }
// g++ 1.36.1 bug 900127_01
// g++ often fails to detect (and issue errors for) ambiguous overload
// situations. In such cases, one of the possibilities is chosen
// (apparently arbitrarily). Errors should be issued instead.
// Cfront 2.0 passes this test.
// keywords: function overloading, ambiguity
void foo (int);
int foo (void);
typedef int (*f_ptr_t1) (void);
typedef void (*f_ptr_t2) (int);
void bar (f_ptr_t1); // { dg-message "note" }
void bar (f_ptr_t2); // { dg-message "note" }
void function ()
{
bar (foo); // { dg-error "ambiguous" }
// { dg-message "candidate" "candidate note" { target *-*-* } 23 }
}
int main () { return 0; }
Go to most recent revision | Compare with Previous | Blame | View Log