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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [bool2.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
// { dg-options "" }
3
class A {
4
public:
5
  operator bool () {
6
    return true;
7
  }
8
} a;
9
class A1 {
10
public:
11
  operator int () {
12
    return true;
13
  }
14
} a1;
15
class A2 {
16
public:
17
  operator const char * () {
18
    return "";
19
  }
20
} a2;
21
class A3 {
22
public:
23
  operator unsigned long long int () {
24
    return true;
25
  }
26
} a3;
27
class A4 {
28
public:
29
  operator const char * () {
30
    return "";
31
  }
32
  operator unsigned long long int () {
33
    return true;
34
  }
35
} a4;
36
class A5 {
37
public:
38
  operator double () {
39
    return 256.0e0*256.0e0*256.0e0*256.0e0*256.0e0*256.0e0*256.0e0*256.0e0
40
      *256.0e0*256.0e0*256.0e0*256.0e0*256.0e0*256.0e0*256.0e0*256.0e0
41
        *256.0e0*256.0e0*256.0e0*256.0e0*256.0e0*256.0e0*256.0e0*256.0e0
42
          *256.0e0*256.0e0*256.0e0*256.0e0*256.0e0*256.0e0*256.0e0*256.0e0;
43
  }
44
} a5;
45
int i = true;
46
bool b = true;
47
bool c = (bool)(void (A::*)())0;
48
bool d = 256;
49
main() {
50
  if (!d) return 1;
51
  if (!a) return 1;
52
  if (!(bool)a) return 1;
53
  //  if (!(long long)a) return 1;
54
  if (!a1) return 1;
55
  if (!a2) return 1;
56
  if (!a3) return 1;
57
  if (!a5) return 1;
58
}

powered by: WebSVN 2.1.0

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