X-Envelope-From: notmuch-bounces@notmuchmail.org  Tue May  5 12:20:23 2026
Return-Path: <notmuch-bounces@notmuchmail.org>
X-Original-To: nmbug@yantan.tethera.net
Delivered-To: nmbug@yantan.tethera.net
Received: from yantan.tethera.net (localhost [127.0.0.1])
	by mail.notmuchmail.org (Postfix) with ESMTP id A78F55F809;
	Tue,  5 May 2026 12:20:23 +0000 (UTC)
Received: from phubs.tethera.net (phubs.tethera.net [192.99.9.157])
	by mail.notmuchmail.org (Postfix) with ESMTPS id 4D2A55E2A9
	for <notmuch@notmuchmail.org>; Tue,  5 May 2026 12:20:20 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tethera.net;
 i=@tethera.net; q=dns/txt; s=2024; t=1777983618; h=from : to : cc :
 subject : in-reply-to : references : date : message-id : mime-version
 : content-type : from;
 bh=+6fcMwRLOlWUKwrOARgV5un27a9YjsVgIXndUJVIJWk=;
 b=NEZg0Ybigua4zPb0NChG/6yL3BgZfDkJ+9iHAfYCyvjdOz4tylIKQm+qQUXF9VL0RffMj
 PgP5u2eXrCEwXUCtO+q5Qu+/QfRGkbJQcladli2z/h6yH8/YIDXWW/PvAac8cR0vunW56gf
 KbvMwutiVuN4z3UahrlSS/hpP/05NE3LOj1KqQIh292FpqXAP58tBnHDbAHzRadO1HvQJAU
 xxKFUryy96dAS8lPFx1jGkT+7zpWzn2V5cOJkierhiMnnMuCet/FnEg1yfVJ3M3qpytiZTq
 TwpcoZteSNLrIW8zDLGljOjfBwXUoLB5qivqyyjAyEGq0nnR3Yt6BbbilWvA==
Received: from tethera.net (M111108027213.v4.enabler.ne.jp [111.108.27.213])
	by phubs.tethera.net (Postfix) with ESMTPS id DB9511800F7;
	Tue, 05 May 2026 09:20:17 -0300 (ADT)
Received: (nullmailer pid 515069 invoked by uid 1000);
	Tue, 05 May 2026 12:20:14 -0000
From: David Bremner <david@tethera.net>
To: Michael J Gruber <michaeljgruber+grubix+git@gmail.com>
Subject: Re: compilation issues with gcc-15 / gcc-16
In-Reply-To: <CAA19uiR+u2p4FpjA-Ub=dBKLGSVtULBMPs3F9i4dWwRcG12yhA@mail.gmail.com>
References: <87pl3e2nvl.fsf@tethera.net>
 <CAA19uiR+u2p4FpjA-Ub=dBKLGSVtULBMPs3F9i4dWwRcG12yhA@mail.gmail.com>
Date: Tue, 05 May 2026 21:20:14 +0900
Message-ID: <87lddy120x.fsf@tethera.net>
MIME-Version: 1.0
Message-ID-Hash: 6XC57TYUILNNDU63GGMEA3UOGTZXWMMO
X-Message-ID-Hash: 6XC57TYUILNNDU63GGMEA3UOGTZXWMMO
X-MailFrom: david@tethera.net
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: notmuch@notmuchmail.org
X-Mailman-Version: 3.3.3
Precedence: list
List-Id: "Use and development of the notmuch mail system." <notmuch.notmuchmail.org>
List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
List-Owner: <mailto:notmuch-owner@notmuchmail.org>
List-Post: <mailto:notmuch@notmuchmail.org>
List-Subscribe: <mailto:notmuch-join@notmuchmail.org>
List-Unsubscribe: <mailto:notmuch-leave@notmuchmail.org>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

Michael J Gruber <michaeljgruber+grubix+git@gmail.com> writes:

> Am Sa., 2. Mai 2026 um 10:54 Uhr schrieb David Bremner <david@tethera.net>:
>>
>>
>> I'm not sure if this is a problem with notmuch and gcc becoming stricter
>> / more ambitious, or a compiler bug, but today I learned that gcc-15
>> 15.2.0-7 (an upstream snapshot) and gcc-16 both miscompile notmuch at
>> optimization level O2. A workaround seems to be to run configure as
>>
>> CFLAGS="-g -O1" ./configure
>>
>> I filed a Debian bug report at
>>
>>   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1135526
>
> FYI:
> I don't see this on Fedora with notmuch 0.40 and gcc-16.0.1-0.11.fc44
> resp. gcc-15.2.1-7.fc43.
>
> CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g
> -grecord-gcc-switches -pipe -Wall -Werror=format-security
> -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
> -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
>  -mbranch-protection=standard -fasynchronous-unwind-tables
> -fstack-clash-protection -fno-omit-frame-pointer
> -mno-omit-leaf-frame-pointer  '

Thanks for the update. It's particularly interesting that gcc-16 is
fine. I had assumed the problem was some patch cherry-picked from
gcc-16, but I guess it's more complicated than that.

d
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org
