OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.benjamin/] [16567.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do assemble  }
2
// 981203 bkoz
3
// g++/16567
4
 
5
typedef bool Bool;
6
typedef unsigned char           Uint8;
7
typedef unsigned short          Uint16;
8
typedef unsigned int            Uint32;
9
 
10
enum e_ms  { third = 3, fourth = 4 };
11
 
12
struct bitmask {
13
  Uint8* anon1;
14
  Uint32 anon2;
15
  Uint8 anon3;
16
  Uint8 here: 2;
17
  Uint8 anon4: 2;
18
  Uint8 anon5: 4;
19
};
20
 
21
struct control {
22
  Uint8 foo_1();
23
};
24
 
25
inline Uint8 foo_2(bitmask* p) {
26
   return p->here;
27
}
28
 
29
inline Uint8 control::foo_1() {
30
   return foo_2((bitmask*) this);
31
}
32
 
33
void foo(void) {
34
  control obj;
35
  control *fp = &obj;
36
  e_ms result;
37
 
38
  result = (e_ms) fp->foo_1; // { dg-error "" } // ERROR -
39
}
40
 
41
 
42
 
43
 
44
 

powered by: WebSVN 2.1.0

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