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
Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
tree-ssa
/
alias-28.c
blob
c15ca0549bef5c159ab89a565905b8db0fc18300
1
/* { dg-do run } */
2
/* { dg-options "-O3" } */
3
4
extern
void
abort
(
void
);
5
extern
void
__link_error
(
void
);
6
extern
void
*
malloc
(
__SIZE_TYPE__
);
7
8
int
*
__attribute__
((
noinline
,
noclone
))
9
foo
(
int
*
p
)
10
{
11
int
*
q
= (
int
*)
malloc
(
sizeof
(
int
));
12
*
p
=
1
;
13
*
q
=
2
;
14
if
(*
p
!=
1
)
15
__link_error
();
16
*
p
=
3
;
17
return
q
;
18
}
19
20
int
main
()
21
{
22
int
i
;
23
int
*
p
=
foo
(&
i
);
24
if
(
i
!=
3
|| *
p
!=
2
)
25
abort
();
26
return
0
;
27
}