repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
opt
/
pr7503-2.C
blob
02ce5988d703532aeb5f194f4e960cebe3111a44
1
// PR c++/7503
2
// { dg-do run }
3
// { dg-options "-O2 -Wno-deprecated" }
4
5
extern "C" void abort();
6
7
void test1a()
8
{
9
int A = 4;
10
int B = 4;
11
12
(A >? B) = 1;
13
if (A != 1 || B != 4)
14
abort ();
15
}
16
17
void test1b()
18
{
19
int A = 3;
20
int B = 5;
21
22
(A >? B) = 1;
23
if (A != 3 || B != 1)
24
abort ();
25
}
26
27
void test1c()
28
{
29
int A = 5;
30
int B = 3;
31
32
(A >? B) = 1;
33
if (A != 1 || B != 3)
34
abort ();
35
}
36
37
38
void test2a()
39
{
40
int A = 4;
41
int B = 4;
42
43
(A <? B) = 1;
44
if (A != 1 || B != 4)
45
abort ();
46
}
47
48
void test2b()
49
{
50
int A = 3;
51
int B = 5;
52
53
(A <? B) = 1;
54
if (A != 1 || B != 5)
55
abort ();
56
}
57
58
void test2c()
59
{
60
int A = 5;
61
int B = 3;
62
63
(A <? B) = 1;
64
if (A != 5 || B != 1)
65
abort ();
66
}
67
68
69
int main()
70
{
71
test1a();
72
test1b();
73
test1c();
74
test2a();
75
test2b();
76
test2c();
77
return 0;
78
}
79