Subject: bug#63365: 30.0.50; GCC 13.1 breaks building Emacs with native-compilation

From: Eli Zaretskii <[email-masked]>
Date: Fri, 16 Jun 2023 13:31:26 +0300

> From: Cyril Arnould <[email-masked]>
> CC: "[email-masked]" <[email-masked]>, "[email-masked]"
> 	<[email-masked]>, "  [email-masked]" <[email-masked]>,
> 	András Svraka <[email-masked]>
> Date: Fri, 16 Jun 2023 09:04:16 +0000
> 
> I've been playing around with compiler options. From my findings, the
> 
> -foptimize-sibling-calls flag breaks the build:
> 
>  
> 
> ./autogen.sh
> 
> CFLAGS='-g3 -O1 -gdwarf-2 -foptimize-sibling-calls' \
> 
> ./configure --with-native-compilation
> 
> make
> 
>  
> 
> OTOH, using -O1 with every flag listed under -O2 *but*
> 
> -foptimize-sibling-calls results in the build succeeding. The following
> 
> works as well for me:
> 
>  
> 
> ./autogen.sh
> 
> CFLAGS='-g3 -O2 -gdwarf-2 -fno-optimize-sibling-calls' \
> 
> ./configure --with-native-compilation
> 
> make

Andrea, any reason that this GCC switch should break
native-compilation?  Does the same problem happen on GNU/Linux?