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
PR tree-optimization/81384 - built-in form of strnlen missing
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
20060929-1.c
blob
76c447fd5b3c43ef04cee696903a9f693834fecd
1
/* PR c/29154 */
2
3
extern
void
abort
(
void
);
4
5
void
6
foo
(
int
**
p
,
int
*
q
)
7
{
8
*(*
p
++)++ = *
q
++;
9
}
10
11
void
12
bar
(
int
**
p
,
int
*
q
)
13
{
14
**
p
= *
q
++;
15
*(*
p
++)++;
16
}
17
18
void
19
baz
(
int
**
p
,
int
*
q
)
20
{
21
**
p
= *
q
++;
22
(*
p
++)++;
23
}
24
25
int
26
main
(
void
)
27
{
28
int
i
=
42
,
j
=
0
;
29
int
*
p
= &
i
;
30
foo
(&
p
, &
j
);
31
if
(
p
-
1
!= &
i
||
j
!=
0
||
i
!=
0
)
32
abort
();
33
i
=
43
;
34
p
= &
i
;
35
bar
(&
p
, &
j
);
36
if
(
p
-
1
!= &
i
||
j
!=
0
||
i
!=
0
)
37
abort
();
38
i
=
44
;
39
p
= &
i
;
40
baz
(&
p
, &
j
);
41
if
(
p
-
1
!= &
i
||
j
!=
0
||
i
!=
0
)
42
abort
();
43
return
0
;
44
}