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
c++: Implement for namespace statics CWG 2867 - Order of initialization for structure...
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
enum-alias-2.c
blob
f107968435cf2eee1f75681cf5720705e01a3ef6
1
/* { dg-do run } */
2
/* { dg-options "-O2" } */
3
4
typedef
int
A
;
5
6
void
*
foo
(
void
*
a
,
void
*
b
,
void
*
c
,
void
*
d
)
7
{
8
*(
A
**)
a
=
c
;
9
10
{
11
typedef
enum
E B
;
12
enum
E
{
E1
= -
1
,
E2
=
0
,
E3
=
1
,
MAX
=
__INT_MAX__
};
13
*(
B
**)
b
=
d
;
14
}
15
16
return
*(
A
**)
a
;
17
}
18
19
int
main
()
20
{
21
A
*
a
,
b
,
c
;
22
if
(&
c
!= (
A
*)
foo
(&
a
, &
a
, &
b
, &
c
))
23
__builtin_abort
();
24
}
25