summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/overload3.C
blob: 3cca3147eecfbf20b45a7dd3cc45088ead229dc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// { dg-do assemble  }
// Bug: bar is considered to be overloaded (i.e. its
//   IDENTIFIER_GLOBAL_VALUES are TREE_LISTs) even though it isn't,
//   so default_conversion thinks it can't resolve the name.

void foo ();
void bar ();

void baz ()
{
  void (*p)() = 1 ? (void (*)()) &foo : bar;
}