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
libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
tree-ssa
/
pr109031-2.c
blob
51f4b7a74efdff3c30e0c12ce9e2de13d86757a0
1
/* { dg-do run } */
2
/* { dg-options "-O2 -fwrapv" } */
3
signed char
sc
;
4
__INT16_TYPE__ ss
;
5
6
void
testsc
() {
7
unsigned int
g
=
0
;
8
unsigned int
*
p1
= &
g
;
9
signed char
*
p2
= &
sc
;
10
11
do
{
12
(*
p1
)++;
13
(*
p2
)--;
14
}
while
(
sc
);
15
16
if
(
g
!=
256
)
17
__builtin_abort
();
18
}
19
20
void
testss
() {
21
__UINT32_TYPE__ g
=
0
;
22
__UINT32_TYPE__
*
p1
= &
g
;
23
__INT16_TYPE__
*
p2
= &
ss
;
24
25
do
{
26
(*
p1
)++;
27
(*
p2
)--;
28
}
while
(
ss
);
29
30
if
(
g
!=
65536
)
31
__builtin_abort
();
32
}
33
34
int
main
() {
35
testsc
();
36
testss
();
37
return
0
;
38
}
39