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
2017-11-15 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
pr18928-1.c
blob
406b2fcabbd21a997e21fa593b45c65c7df47486
1
/* PR rtl-optimization/18928 */
2
/* { dg-do compile { target fpic } } */
3
/* { dg-options "-O2 -fPIC" } */
4
5
const char
*
toHex
(
unsigned short
u
)
6
{
7
static char
hexVal
[
5
];
8
int
i
=
3
;
9
while
(
i
>=
0
) {
10
unsigned short
hex
= (
u
&
0x000f
);
11
if
(
hex
<
0x0a
)
12
hexVal
[
i
] =
'0'
+
hex
;
13
else
14
hexVal
[
i
] =
'A'
+(
hex
-
0x0a
);
15
i
--;
16
}
17
hexVal
[
4
] =
'\0'
;
18
return
hexVal
;
19
}
20