From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id LGdfMjuUa2rzPTUAWB0awg (envelope-from ) for ; Thu, 30 Jul 2026 14:13:15 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=A04QEI3C; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id BB8E91E099; Thu, 30 Jul 2026 14:13:15 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 04F261E099 for ; Thu, 30 Jul 2026 14:13:15 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ACB5F4BBCDCB for ; Thu, 30 Jul 2026 18:13:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ACB5F4BBCDCB Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=A04QEI3C Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 6B97E4BB8F5A for ; Thu, 30 Jul 2026 18:12:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6B97E4BB8F5A Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6B97E4BB8F5A Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785435169; cv=none; b=chD3JCV0BiJ9DvtUYhUE4t75kXMfn9EF9oq2XGHmVbUV4pL3Ri0fIzLQAgtCyDVMN56gSL1R32ekBLOrIn761T+yxrCIo8Anw1mqLHPnFNn2jy1fmxIg/5r7GHXwUyc1K/xW9Aq341K0pkmx1LPXrnYfcExudtq754foOSrLZc0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785435169; c=relaxed/simple; bh=0DDTpCFGP+7Y4bmZ1v52WeIYM3ti25aJHblR6nS/5DQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=c5SDSAjOJa67DB0gveBYxby1a6nEFPJ9WXWDCZ5Ni9BDrLwTUkHT4QKTy9Ifrdwv/AEo3+vTfMRExWpvxTUPXPAU8tikpOF6bu7C+svApC3nHEl5iAfpVI0pdBxBUsWWTuZmR4YczdQuxmh/P80s/aDxxlSjr628Me/IKlVx8mA= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=A04QEI3C DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B97E4BB8F5A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1785435169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aqgHQ5dSVa1KLMBD7/05rOoDhZDM8cELbcatsU1jr+0=; b=A04QEI3CbA4RTW2hEU44b9XT7B3kMvVaRPd4WoJBzaopAu2qxU0Ru1Vl2fYg/S2iS3cHr1 tkCHqQatwqONZf+fZ8XQThXWU1cC3JmSNRCOC4q8+Za+lg4vsGGzVL+IqdZApdZP+QCevo oUqtPaW7K3pdWD0HalQp9qYOBNcO/LA= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-425-rgCAk3VJO2yiZ8ax3orWNw-1; Thu, 30 Jul 2026 14:12:47 -0400 X-MC-Unique: rgCAk3VJO2yiZ8ax3orWNw-1 X-Mimecast-MFC-AGG-ID: rgCAk3VJO2yiZ8ax3orWNw_1785435167 Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-92efd2ca21aso27707185a.0 for ; Thu, 30 Jul 2026 11:12:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785435167; x=1786039967; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=aqgHQ5dSVa1KLMBD7/05rOoDhZDM8cELbcatsU1jr+0=; b=IOspgsgx7DR+ImKsMheqjbjkP7fZVDXWVyNnz1WDmJU5eJ/ylCLwiYa7B51WB6JmS5 G1e+ES/xKEYwgqNyNxWdE5RIN7rvHbDIkRNWOUHMXoRWq7yTmoC1uPNww1pgDZUpRd4/ IwvXBRZO2xcSkS7eWUnzdBOCiiYu3PwyOkeRv/4GqhsxVKrcP6ywWplSHWcJSzqWYQlf RmCy9kbi6u4AYbxtchXGFSIEZbmMk7exYAQsluXytzuZUwIoEJ1wkfwXnMB1iLEkEdbP eZumc6j+kuSYARwZca6ucNDRtKujEc/Pouy11muqMhsxbMpRHdCCwJOZWQ16E3+9lFWf ollg== X-Forwarded-Encrypted: i=1; AHgh+RpULBzYFsWkRTt4n2RrQoYhAg6eL29fXGd/DzJNuxJjdczWlrGmuoGYyU/AFjZc3EoAcLCRTNC6rDQZPQ==@sourceware.org X-Gm-Message-State: AOJu0YztWQ+KQ5CMcZvtCYUPalAGZ+DR2jafyb9D1dOiItupS3A14tv+ 1U/Swj2fPtfIumlFqoXhIxNtrNNr/SXM402HYZhav+FKXwlM3AoLhK71Juyo2LkX2xCnkMMcKBz vK9VcJJL2BLEVF6V2ygkGCzuMPPBxsvzGUYu8xRJBepRbOQEDR1tKwHXr7xrP1PJeXU+mY3s= X-Gm-Gg: AR+sD13wU9fDJgcE5CHN+F3BHSCHoIy58t3sKJaI7SlqJSUJ29aFMetWGwx/El3JCNI 32UGcCiMLNMhZSh+N4q0NCcziP6S0UWMgzdVqpUZPBmPGidLxw31EhEEUSCOBFPv9VXyTPd1nLC 0HmqM+VER6jMndrICtdF9x1UKaTZzOU3PzbLMePF2xjd5wsTbGsttkHzrOQSoCcmAfCrAhuht9k dhgUQJJY7P9RujEWpd9wI+HU/Y15Jom0e14eP75qUuZvVwWr9V7t9Rvr5W9XwgC5E2KxvltLabH 0T0I9Slf7Vkfxk+84ACn3geKAnnSwAiHYJ01Ntq2aKTDRcRt7QqOzMMHxTaq+u1JT+Fr194dYP8 Q91BmGqA= X-Received: by 2002:a05:620a:6405:b0:934:8ea0:5fb8 with SMTP id af79cd13be357-9348ea062e9mr221409185a.82.1785435167143; Thu, 30 Jul 2026 11:12:47 -0700 (PDT) X-Received: by 2002:a05:620a:6405:b0:934:8ea0:5fb8 with SMTP id af79cd13be357-9348ea062e9mr221404885a.82.1785435166713; Thu, 30 Jul 2026 11:12:46 -0700 (PDT) Received: from [150.1.200.157] ([172.56.105.224]) by smtp.gmail.com with ESMTPSA id af79cd13be357-933e7318323sm465441285a.23.2026.07.30.11.12.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Jul 2026 11:12:46 -0700 (PDT) Message-ID: <88a0ad4f-e16f-458a-84c6-a0298fad149e@redhat.com> Date: Thu, 30 Jul 2026 11:12:44 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] gdb: prefer lhs type's address spaces/classes in check_typedef To: Tankut Baris Aktemur , gdb-patches@sourceware.org Cc: tom@tromey.com References: <20260727092001.1683349-1-tankutbaris.aktemur@amd.com> <20260730091357.2528178-1-tankutbaris.aktemur@amd.com> From: Keith Seitz In-Reply-To: <20260730091357.2528178-1-tankutbaris.aktemur@amd.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: pVF0Dk8iaomW6Oa0RWiuVByDRNX4_BMNuPx4Vudqn1I_1785435167 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 7/30/26 2:13 AM, Tankut Baris Aktemur wrote: > In commit 92fdad7 "gdb: convert type instance flags to bitfields", > `operator|=` of type_instance_flags required the address space and > address class values of left-hand-side to be zero. This introduced > the following bug (thanks to Keith Seitz for reporting it at > https://inbox.sourceware.org/gdb-patches/053e90c0-53f0-4748-9d27-0237b9f21221@redhat.com/T/#u): > > So, the assertion in operator|= was wrong. The outer type, which is > the left-hand-side in this case, should preserve its values if they > are non-zero. The right-hand-side values are used, if lhs values are > zero. Fix the bug accordingly. > > Furthermore, rename operator|= to "merge". Type instance flags are no > longer stored as a bitmask value, but rather as a struct. Having an > operator like |= gives the wrong impression that we are doing a > bitmask OR. Using a method makes the intention clearer. > > Include a regression test. This LGTM. Thank you very much! Reviewed-By: Keith Seitz Keith