From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 07CDC3858D32 for ; Tue, 26 Jul 2022 13:49:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 07CDC3858D32 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-495-z8JE0uhZNyuPDci8ck04cg-1; Tue, 26 Jul 2022 09:49:14 -0400 X-MC-Unique: z8JE0uhZNyuPDci8ck04cg-1 Received: by mail-wm1-f72.google.com with SMTP id bg6-20020a05600c3c8600b003a03d5d19e4so5433843wmb.1 for ; Tue, 26 Jul 2022 06:49:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:references:from:subject:in-reply-to :content-transfer-encoding; bh=U51awMqJMgmLr6ZB9Tl7PUMpMsXaiUdVrnK+PQlXrlM=; b=HCjWvbxpnyHBhU74E2vKFMBl4CLmSI386B+VlVOYEl/KDn+tlQ0vhMEQphprlWvW6m Iw3orCJ7qn+X6UsNwmEgROBF701n2e2jOlnlTe8S+gkJM9x7utZ04X7qPVQ6eFC8Cm4T vUf/Ium4Twx72F5aOHTn22wOciMd14fEut9T4TmcG4pGaRVj1sW3BnbAA/XLqSPHEmE0 qvwuOrqdWiF0BSTMU4Y4jXlcsVI76LrYz5aH+iY7vlXB/Ztc3qXUaHOI2L3QosMufUZN y9g6Rpef1lL+wS48GNIgmR+37KaEOq1M9R+mILGpRigeOzHzOllitQo64WVnHI6eEStU 3Tfw== X-Gm-Message-State: AJIora/cXRiYFhSa2s8XkoyaHyWPAK1UI/wRbgR49ll0oz0KOQV9fkrL XVTLFHAEBXba2CHtHO1tNP30DtMLHo5OJchjgrQUNdpoyvM6P3o0B7I3bTqkdTtqtAskbiY96h4 o01G3vGCXl475tJ8Lkg== X-Received: by 2002:a5d:650c:0:b0:21e:9b19:497 with SMTP id x12-20020a5d650c000000b0021e9b190497mr2694678wru.541.1658843353181; Tue, 26 Jul 2022 06:49:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tsdSWRlXJQFKivD77CdoGcIXvIZGc0N+Ss6WhvmTBjD0bbTP3Klcd0dhPK2VhZ5/f6nCHA+w== X-Received: by 2002:a5d:650c:0:b0:21e:9b19:497 with SMTP id x12-20020a5d650c000000b0021e9b190497mr2694657wru.541.1658843352632; Tue, 26 Jul 2022 06:49:12 -0700 (PDT) Received: from [192.168.1.6] (adsl-2-solo-236-177.claranet.co.uk. [80.168.236.177]) by smtp.gmail.com with ESMTPSA id o8-20020a05600c378800b003a2e7c13a3asm17318149wmr.42.2022.07.26.06.49.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Jul 2022 06:49:11 -0700 (PDT) Message-ID: Date: Tue, 26 Jul 2022 14:49:11 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 To: Kao Dome , binutils@sourceware.org References: <2f6b659b-79a1-489f-a28a-bc5d5ae5e885@me.com> From: Nick Clifton Subject: Re: LTO seems to change the outcome of the division by zero raises SIGFPE test. In-Reply-To: <2f6b659b-79a1-489f-a28a-bc5d5ae5e885@me.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-GB Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: Tue, 26 Jul 2022 13:49:17 -0000 Hi Kao, > 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 program, *not* the signal > handler. When no LTO is used, executing returns 0. I am pretty sure that this is a gcc issue, rather than a binutils one. When LTO is enabled the compiler is invoked twice, and it would be my guess that it is this second invocation which is changing the behaviour of the final program. This could be a known issue. I suggest that you check to see which version of gcc you are using, and if it is not the latest, upgrade. If the problem persists then please file a bug report with the gcc bugzilla system. Cheers Nick