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/] [900210_03.C] - Diff between revs 305 and 338

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

Rev 305 Rev 338
// { dg-do assemble  }
// { dg-do assemble  }
// g++ 1.36.1 bug 900210_03
// g++ 1.36.1 bug 900210_03
// g++ allows void* type values to be assigned to variables of other
// g++ allows void* type values to be assigned to variables of other
// pointer types.  According to the C++ Reference Manual, this is illegal.
// pointer types.  According to the C++ Reference Manual, this is illegal.
// Cfront 2.0 passes this test.
// Cfront 2.0 passes this test.
// keywords: void pointers, pointer type conversions, implicit type conversions
// keywords: void pointers, pointer type conversions, implicit type conversions
void* vp;
void* vp;
char* cp;
char* cp;
int* ip;
int* ip;
enum E {enum_value_1} * ep;
enum E {enum_value_1} * ep;
struct S { int member; } * sp;
struct S { int member; } * sp;
void (*fp) (void);
void (*fp) (void);
void global_function ()
void global_function ()
{
{
  cp = vp;      /* { dg-error "" }  */
  cp = vp;      /* { dg-error "" }  */
  ip = vp;      /* { dg-error "" }  */
  ip = vp;      /* { dg-error "" }  */
  ep = vp;      /* { dg-error "" }  */
  ep = vp;      /* { dg-error "" }  */
  sp = vp;      /* { dg-error "" }  */
  sp = vp;      /* { dg-error "" }  */
  fp = vp;      /* { dg-error "" }  */
  fp = vp;      /* { dg-error "" }  */
}
}
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.