https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112112
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-11-01
Ever confirmed|0 |1
Status|UNCONFIRMED |WAITING
--- Comment #7 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to κΉλμ from comment #6)
> ```
> z3rodae0@z3rodae0:~$ ./sh.sh
> result for -O0 "signed" = 1
> result for -O1 "signed" = 1
> result for -O2 "signed" = 1
> result for -O3 "signed" = 1
> result for -O0 "unsigned" = 0
> result for -O1 "unsigned" = 0
> result for -O2 "unsigned" = 0
> result for -O3 "unsigned" = 0
> result for -O0 "" = 1
> result for -O1 "" = 1
> result for -O2 "" = 1
> result for -O3 "" = 1
> ```
>
> That's correct. I ran your code and script in my environment, and it
> produced the same results
That is weird.
I don't see a meaningful difference between the version without signed or
unsigned and your program, and you get inconsistent results with your
original program and consistent results with the other one.
Or am I missing something?