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
[RISC-V] Avoid unnecessary extensions when value is already extended
[official-gcc.git]
/
gcc
/
testsuite
/
c-c++-common
/
analyzer
/
pr105783.c
blob
f17519415cef4365a5314c49722e9fc29b35788a
1
/* { dg-additional-options "-O" } */
2
3
#ifndef __cplusplus
4
typedef
_Bool
bool
;
5
#endif
6
7
struct
ss_s
{
8
union
out_or_counting_u
{
9
char
*
newstr
;
10
unsigned long long
cnt
;
11
}
uu
;
12
bool
counting
;
13
};
14
15
struct
ss_s
ss_init
(
void
) {
16
struct
ss_s rr
= { .
counting
=
1
};
17
return
rr
;
18
}
19
20
void
ss_out
(
struct
ss_s
*
t
,
char
cc
) {
21
if
(!
t
->
counting
) {
22
*
t
->
uu
.
newstr
++ =
cc
;
23
}
24
}
25
26
int
main
() {
27
struct
ss_s ss
=
ss_init
();
28
ss_out
(&
ss
,
'a'
);
29
}
30