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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.dg/] [opt/] [pr7503-5.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// 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++;
13
  if (A != 4 || B != 5)
14
    abort ();
15
}
16
 
17
void test1b()
18
{
19
  int A = 3;
20
  int B = 5;
21
 
22
  A >?= B++;
23
  if (A != 5 || B != 6)
24
    abort ();
25
}
26
 
27
void test1c()
28
{
29
  int A = 5;
30
  int B = 3;
31
 
32
  A >?= B++;
33
  if (A != 5 || B != 4)
34
    abort ();
35
}
36
 
37
 
38
void test2a()
39
{
40
  int A = 4;
41
  int B = 4;
42
 
43
  A 
44
  if (A != 4 || B != 5)
45
    abort ();
46
}
47
 
48
void test2b()
49
{
50
  int A = 3;
51
  int B = 5;
52
 
53
  A 
54
  if (A != 3 || B != 6)
55
    abort ();
56
}
57
 
58
void test2c()
59
{
60
  int A = 5;
61
  int B = 3;
62
 
63
  A 
64
  if (A != 3 || B != 4)
65
    abort ();
66
}
67
 
68
 
69
int main()
70
{
71
  test1a();
72
  test1b();
73
  test1c();
74
 
75
  test2a();
76
  test2b();
77
  test2c();
78
 
79
  return 0;
80
}
81
 

powered by: WebSVN 2.1.0

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