From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mr85p00im-ztdg06021701.me.com (mr85p00im-ztdg06021701.me.com [17.58.23.196]) by sourceware.org (Postfix) with ESMTPS id A4B96382C16F for ; Wed, 13 Jul 2022 16:58:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A4B96382C16F Received: from mr85p00im-ztdg06021701.me.com (mr85p00im-ztdg06021701.me.com [17.58.23.196]) by mr85p00im-ztdg06021701.me.com (Postfix) with ESMTPS id 99B589A045D for ; Wed, 13 Jul 2022 16:58:32 +0000 (UTC) Received: from localhost (mr38p00im.dlb-asmtpoutvip.me.com [10.112.84.233]) by mr85p00im-ztdg06021701.me.com (Postfix) with ESMTPA id 797EB9A0294 for ; Wed, 13 Jul 2022 16:58:32 +0000 (UTC) To: binutils@sourceware.org From: Kao Dome Subject: =?utf-8?B?TFRPIHNlZW1zIHRvIGNoYW5nZSB0aGUgb3V0Y29tZSBvZiB0aGUgZGl2aXNp?= =?utf-8?B?b24gYnkgemVybyByYWlzZXMgU0lHRlBFIHRlc3Qu?= Date: Wed, 13 Jul 2022 16:58:32 -0000 X-Mailer: iCloud MailClientcurrent MailServer2217B125.10000-Famine2217-0-8702c61e252a Message-id: <2f6b659b-79a1-489f-a28a-bc5d5ae5e885@me.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: ZFqWVKeC3NRELNnIeSYzJPmZKgWFHUmn X-Proofpoint-GUID: ZFqWVKeC3NRELNnIeSYzJPmZKgWFHUmn X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.138,18.0.572,17.0.605.474.0000000_definitions?= =?UTF-8?Q?=3D2020-02-14=5F11:2020-02-14=5F02,2020-02-14=5F11,2020-01-23?= =?UTF-8?Q?=5F02_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=830 clxscore=1011 suspectscore=0 adultscore=0 spamscore=0 mlxscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2207130070 X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, MIME_QP_LONG_LINE, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2022 16:58:35 -0000 Hi, when I noticed it I was building binutils in MSYS2 (so, Windows) I che= cked in Linux to see if the same would happen and it seems to.The test its= elf is in the intl configure script, but I'll reproduce it here:----------= --------#include #include static void#ifdef __cplusplu= ssigfpe_handler (int sig)#elsesigfpe_handler (sig) int sig;#endif{=C2=A0 /= * Exit with code 0 if SIGFPE, with code 1 if any other signal.=C2=A0 */=C2= =A0 exit (sig !=3D SIGFPE);}int x =3D 1;int y =3D 0;int z;int nan;int main= (){=C2=A0 signal (SIGFPE, sigfpe_handler);/* IRIX and AIX (when "xlc -qch= eck" is used) yield signal SIGTRAP.=C2=A0 */#if (defined (__sgi) || define= d (_AIX)) && defined (SIGTRAP)=C2=A0 signal (SIGTRAP, sigfpe_handler);#end= if/* Linux/SPARC yields signal SIGILL.=C2=A0 */#if defined (__sparc__) && = defined (__linux__)=C2=A0 signal (SIGILL, sigfpe_handler);#endif=C2=A0 z =3D= x / y;=C2=A0 nan =3D y / y;=C2=A0 exit (1);}------------------When CFLAGS= include a flavor of LTO, for example, "-flto", executing the binary leads= to a return value of 1, but it exists through the one at end of the progr= am, *not* the signal handler. When no LTO is used, executing returns 0. Al= so, it happens when CFLAGS have some optimization going on, so it'd be "-O= 2 -flto" vs "-O2" for example.I don't think it is important, but because i= t defines=C2=A0INTDIV0_RAISES_SIGFPE to either 1 or 0, I'm guessing it is = there for a reason and means something in intl, so I decided to report it = just in case.That's the only thing that changes throughout the whole confi= guration phase when having LTO in CFLAGS, the rest stays the same (save ar= and the like which are set to gcc-ar). The versions of what I'm using to = build are GCC 12.1.0 and Binutils 2.38.Regards,Kao.