repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git]
/
main
/
gcc
/
testsuite
/
g++.dg
/
pr60648.C
blob
80c05616c2fd4cb01b3dcc14d8b91235cd32854b
1
/* { dg-do compile } */
2
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
3
/* { dg-options "-O3 -fPIC -m32" } */
4
5
enum component
6
{
7
Ex,
8
Ez,
9
Hy,
10
Permeability
11
};
12
enum derived_component
13
{};
14
enum direction
15
{
16
X,
17
Y,
18
Z,
19
R,
20
P,
21
NO_DIRECTION
22
};
23
derived_component a;
24
component *b;
25
component c;
26
direction d;
27
inline direction fn1 (component p1)
28
{
29
switch (p1)
30
{
31
case 0:
32
return Y;
33
case 1:
34
return Z;
35
case Permeability:
36
return NO_DIRECTION;
37
}
38
return X;
39
}
40
41
inline component fn2 (direction p1)
42
{
43
switch (p1)
44
{
45
case 0:
46
case 1:
47
return component ();
48
case Z:
49
case R:
50
return component (1);
51
case P:
52
return component (3);
53
}
54
}
55
56
void fn3 ()
57
{
58
direction e;
59
switch (0)
60
case 0:
61
switch (a)
62
{
63
case 0:
64
c = Ex;
65
b[1] = Hy;
66
}
67
e = fn1 (b[1]);
68
b[1] = fn2 (e);
69
d = fn1 (c);
70
}
71
72
73