// "../../cfa-cpp -nc Members.c"

char ?=?( char*, char );
int ?=?( int*, int );
float ?=?( float*, float );
forall( dtype DT ) DT * ?=?( DT**, DT* );
forall(type T) lvalue T *?( T* );
char *__builtin_memcpy();

void a( char );
void b( int );
void c( int* );
void d( float* );

struct a_struct
{
  int a;
  char a;
  float a;
};

union b_struct
{
  int *a;
  char *a;
  float *a;
};

void f()
{
  struct a_struct the_struct;
  union b_struct the_struct;
  
  a( the_struct.a );
  b( the_struct.a );
  c( the_struct.a );
  d( the_struct.a );
}

struct c_struct
{
  int;
  char;
  float;
};

union d_struct
{
  int*;
  char*;
  float*;
};

void g()
{
  unsigned short x;
  struct c_struct x;
  union d_struct x;
  
  a( x );	// the 'a' and 'b' calls resolve to the ushort
  b( x );	// it's debatable whether this is good
  c( x );
  d( x );
}

// make sure that forward declarations work

struct forward;

struct forward *q;

struct forward { int y; };

void h()
{
	q->y;
}
