https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116690
Vincent Lefèvre changed:
What|Removed |Added
CC||vincent-gcc at vinc17 dot net
--- Com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116690
Xi Ruoyao changed:
What|Removed |Added
CC||xry111 at gcc dot gnu.org
--- Comment #7 fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116690
--- Comment #6 from Yunbo Ni ---
(In reply to Andrew Pinski from comment #5)
> (In reply to Yunbo Ni from comment #4)
> > Thanks for your kind and detailed explanation! BTW, when I change the value
> > of b to 1 in line 3 and compiled this code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116690
--- Comment #5 from Andrew Pinski ---
(In reply to Yunbo Ni from comment #4)
> Thanks for your kind and detailed explanation! BTW, when I change the value
> of b to 1 in line 3 and compiled this code with -O0 flag, it gets killed
> with with pro
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116690
--- Comment #4 from Yunbo Ni ---
(In reply to Andrew Pinski from comment #3)
> Note in C++, it is undefined at the point of return in a rather than
> afterwards.
>
> Also note PR 104690 is filed about catching this with -fsanitize=undefined.
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116690
Andrew Pinski changed:
What|Removed |Added
See Also||https://gcc.gnu.org/bugzill
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116690
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116690
--- Comment #1 from Yunbo Ni ---
(In reply to Yunbo Ni from comment #0)
> Created attachment 59101 [details]
> The preprocessed file when using -O2
>
> When I compiled this code with -O0 and -O2 flags, its outputs were different:
>
> ```c
> #i