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 typo
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
20000807-1.c
blob
f654764948320ed2bba0b49bafd342f3484e98d4
1
/* { dg-do compile { target i?86-*-* } } */
2
/* { dg-options "-Os -fpic" } */
3
4
#include <string.h>
5
6
typedef
struct
7
{
8
char
*
a
;
9
char
*
b
;
10
} *
foo
;
11
12
void
13
bar
(
foo x
)
14
{
15
char
*
c
=
x
->
b
;
16
char
*
d
= (
void
*)
0
;
17
unsigned int
e
=
0
,
f
=
0
,
g
;
18
while
(*
c
!=
':'
)
19
if
(*
c
==
'%'
)
20
{
21
++
c
;
22
switch
(*
c
++)
23
{
24
case
'N'
:
25
g
=
strlen
(
x
->
a
);
26
if
(
e
+
g
>=
f
) {
27
char
*
h
=
d
;
28
f
+=
256
+
g
;
29
d
= (
char
*)
__builtin_alloca
(
f
);
30
memcpy
(
d
,
h
,
e
);
31
};
32
memcpy
(&
d
[
e
],
x
->
a
,
g
);
33
e
+=
g
;
34
break
;
35
}
36
}
37
}