[Bug middle-end/110282] Segmentation fault with specific optimizations

xry111 at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jun 30 09:30:03 GMT 2023


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110282

--- Comment #7 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to CTC from comment #6)
> Another related and smaller reproducer:
> 
> # cat tmp.i
> main() {
>   int *a = 0;
>   int b = *a;
> }

No, this is an undefined behavior and the compiler is allowed to generate code
to crash.


More information about the Gcc-bugs mailing list