OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.bugs/] [900324_06.C] - Diff between revs 305 and 338

Only display areas with differences | Details | Blame | View Log

Rev 305 Rev 338
// { dg-do run  }
// { dg-do run  }
// g++ 1.37.1 bug 900324_06
// g++ 1.37.1 bug 900324_06
// g++ is unable to use context information (i.e. the required type of the
// g++ is unable to use context information (i.e. the required type of the
// expression) to disambiguate a possibly overloaded function name when that
// expression) to disambiguate a possibly overloaded function name when that
// name is used as either the second or the third operand of a ?: operator.
// name is used as either the second or the third operand of a ?: operator.
// It is also unable to use the fact that the given name is not in fact
// It is also unable to use the fact that the given name is not in fact
// overloaded (and has only one possible interpretation).
// overloaded (and has only one possible interpretation).
// This results in improper errors being generated.
// This results in improper errors being generated.
// keywords: overloading, function pointers, disambiguation, operator?:
// keywords: overloading, function pointers, disambiguation, operator?:
int i;
int i;
void (*p)();
void (*p)();
void function_0 ()
void function_0 ()
{
{
}
}
void function_1 ()
void function_1 ()
{
{
  p = i ? function_0 : 0;               // { dg-bogus "" }
  p = i ? function_0 : 0;               // { dg-bogus "" }
  p = i ? 0 : function_0;               // { dg-bogus "" }
  p = i ? 0 : function_0;               // { dg-bogus "" }
  p = i ? function_1 : function_0;      // { dg-bogus "" }
  p = i ? function_1 : function_0;      // { dg-bogus "" }
}
}
int main () { return 0; }
int main () { return 0; }
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.