From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Cyril Arnould Newsgroups: gmane.emacs.bugs Subject: bug#65727: 30.0.50; Build failure in MSYS2 when --with-native-compilation Date: Wed, 15 May 2024 01:29:40 +0200 Message-ID: References: <86wn1jtezk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4777"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: "63365@debbugs.gnu.org" <63365@debbugs.gnu.org>, "eliz@gnu.org" , 65727@debbugs.gnu.org, Arash Esbati , =?UTF-8?Q?Andr=C3=A1s?= Svraka To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 15 01:30:16 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s71b5-00012c-Mn for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 May 2024 01:30:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s71au-0003Pc-Fw; Tue, 14 May 2024 19:30:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s71as-0003Oy-O8 for bug-gnu-emacs@gnu.org; Tue, 14 May 2024 19:30:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s71as-0002qR-6W for bug-gnu-emacs@gnu.org; Tue, 14 May 2024 19:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s71at-0001Ea-Bu for bug-gnu-emacs@gnu.org; Tue, 14 May 2024 19:30:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Cyril Arnould Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 May 2024 23:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65727 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 65727-submit@debbugs.gnu.org id=B65727.17157293994628 (code B ref 65727); Tue, 14 May 2024 23:30:03 +0000 Original-Received: (at 65727) by debbugs.gnu.org; 14 May 2024 23:29:59 +0000 Original-Received: from localhost ([127.0.0.1]:41571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s71ao-0001CZ-Pn for submit@debbugs.gnu.org; Tue, 14 May 2024 19:29:59 -0400 Original-Received: from mail-ve1eur01olkn2032.outbound.protection.outlook.com ([40.92.66.32]:22915 helo=EUR01-VE1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s71al-0001CL-Iw; Tue, 14 May 2024 19:29:57 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hwthPwU5ZQyUFpraCtE8xhgc4jIxfrBihNgswHr8RzI4/rNRHSsqRPM7qpjU4F1d8rqgzlJ+epc2RzHYWxtWvQDBaBJpxGdQ8kHCXnyfT/yOUebxDPesfHKgdDWVpfY6wmiSDETTnA6rv7ff5vkbL/7KwPLTkrg0NECtpN0OpP/lVyfVu9xovmI+tfHR7HeZ1VTWVe6ELcrCdS/r5EopovAOw/3+IffzlG/dzgEExRgu+TshnbKAmRXS4nqw+XOomFlWWtn48Xfx7WxauYlm6Lxg+J4OlD5kZf1CURQkoQe/lS7Pal0V6fT88SxfR3wGg1yF7n2HF8JLEBVls04cNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=q4HdiSYk/O/yPR2B9gYRgeQBaxKSMeWaA4cppH57DEI=; b=i3N2o8SotqhSeo/EaJO221/q2DIRNCEe3CiDChJe+ciMrgtGkwMGuw8Mrz68QwhFA8/pwhwHvq10dHedigBEjc44oKvy0PN2dOw7D9RmDGArATZgO5jzdvnKQdlIuVoBAMJJZJJZDRgc9j9bi7MnKnxrk41xxQTeiMUlRXi1fT59mPlkAovYkrAXhvFplasUxHkn3hoo+YZAFwR3072xPn1BmIPPASQQvhIOao7AroX95tu1WQUGNjWekma9MZt91Cv8m3BZTEBM4+LbYJ6Ke8dovU/FufLQ1oi43pvPO6oS3tsxOTAIVxmYxRgjjysgu3AS2ytPUtwjUBlWnPHANw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q4HdiSYk/O/yPR2B9gYRgeQBaxKSMeWaA4cppH57DEI=; b=Ni+Qonan+sqfZzJqFtnytl2+GSrRQ8j8RXcZILXRMdIqsriyz4xONIJzC1sKhz0DR5MmS9qDU3U8LRCqPKk+X/OBp80k5CYtOTxY4jBuWW5GR/U80yX/lLe+pnyCNuOcgdSFIiF0aiRp8+2n9mCqp2iZVi1qsxuXODmbqKzRk+IBffzs8lKnfpqT2IDdEK1bchjyrgDUoqEsjiuIteDZMcQMWgx8U9eSx/5KpD7QkeOoQjYmUNkU258OTGMPn1Gi5PDaEoS2nO+QZ2QB0JUdKdeAdeJKCW6hXIZZjjnrSoQ+ExlMa1QEoXfUvGr6IwARpkncvI7XO8TH65gOqCVx6g== Original-Received: from AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:582::17) by AS8PR10MB7205.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:61b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Tue, 14 May 2024 23:29:47 +0000 Original-Received: from AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM ([fe80::68f8:d238:39d8:1f10]) by AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM ([fe80::68f8:d238:39d8:1f10%7]) with mapi id 15.20.7544.052; Tue, 14 May 2024 23:29:41 +0000 In-Reply-To: X-TMN: [/p9mIYd+aAupBM18ACqO/KdNE4QmWH3d] X-ClientProxiedBy: ZR0P278CA0119.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:20::16) To AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:582::17) X-Microsoft-Original-Message-ID: <856f9f12-8b1d-4882-96b5-8e7739b878a6@outlook.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR10MB6110:EE_|AS8PR10MB7205:EE_ X-MS-Office365-Filtering-Correlation-Id: 028b3405-c612-4bec-28dd-08dc746dbaf3 X-Microsoft-Antispam: BCL:0;ARA:14566002|461199019|440099019|3412199016; X-Microsoft-Antispam-Message-Info: ITbGDHvS2tYrzRWFma9z4hFA8C5u/AvS+MA8AoxmJZ+oMQPRklHP+oRGoelumrB+aeQaXC532i1OWUMi41yNxPYHJpbRq0QwIsN+5UxZnyH92eW+ebN2REX4zDxLbqRsJHnA8yAUOAP2slqdN+worGMCdL/FlOKq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LIC8NIHeuvLqhJq0847MH4s689PPCogS47tbnIkFV+KblkxqYfg/aYkuCEXrKn2sb14tIY0upCn+Xc2NqrcIsPlVtLKlkidhQfLfSKeolae4lMWCY+TF10mVDE86rfqf8C2fesDhsz3yZExhIKacoz3fYzXByoou0UNzKUYleT 0ecl+6p2+vhj26Fnc3EksoAZ92NsrUUVoNYEoa9+Tq+/sT+unVkegCzVFPXtV8XYxiRybawmcALc0vZswPUw+W/uxHDgl/lMG4 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 028b3405-c612-4bec-28dd-08dc746dbaf3 X-MS-Exchange-CrossTenant-AuthSource: AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2024 23:29:41.8878 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR10MB7205 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285058 Archived-At: > Interesting, would you mind instead of using 'printf' to try using > '__attribute__((optimize("O0")))' on the function to verify that the > issue is really an optimization? With the following, the build fails: diff --git a/src/thread.c b/src/thread.c index 040ca39511e..ffdcf420af0 100644 --- a/src/thread.c +++ b/src/thread.c @@ -692,6 +692,7 @@ mark_threads_callback (void *ignore)      }  } +__attribute__((optimize("O0")))  void  mark_threads (void)  { I hope this was correct? If I replace it with '__attribute__((optimize("no-optimize-sibling-calls")))', the build succeeds again. I therefore tried to compile the entirety of thread.c with -O0 instead, upon which the build succeeded again. I'll try to add the '__attribute__((optimize("O0")))' in more thread.c functions to see which ones need it for a successful build (unless you have a better suggestion?). To summarize the current state: thread.c compiled with -O2: build fails thread.c compiled with -O2 -fno-optimize-sibling-calls: build succeeds thread.c compiled with -O0: build succeeds thread.c compiled with -O2 and - mark_threads with printf: build succeeds - mark_threads with __attribute__((optimize("no-optimize-sibling-calls"))): build succeeds - mark_threads with __attribute__((optimize("O0"))): build fails