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