From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc2f.google.com (mail-oo1-xc2f.google.com [IPv6:2607:f8b0:4864:20::c2f]) by sourceware.org (Postfix) with ESMTPS id E20433858438 for ; Tue, 27 Feb 2024 15:14:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E20433858438 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E20433858438 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c2f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709046853; cv=none; b=cCKE5yGVtxuYBHPO09VTfvH9LRDSw90LqpOgFtZcIbk1TCBOFjuqn+HR9T9fRDSHcrJcs+1bsSe5+z91IcDP32Gkesj8wAecuJUlcVQ1HVa77K5WVhWmXWyve4Io2zcbo5VLbdMk1ndnMhcehIt7h+zDDdRLzGPQE+nqtZ/NK60= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709046853; c=relaxed/simple; bh=Btm4hpGuCfsllnR57zQIo63HnM/YdwvDn9xbkupamAI=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=BZRrlOtUx2VvbeNN/GyszFKwMoKs+2ylsKosmZi2eLnOFhsO5wsR0x+Bk7Vg8DpK3wdGjSd9IYETY4TBTadNGLUqBfLMDejnmnn0VpqHyu6gcdbweuD6JWfjZjMpZZGXEyC3lOAhA3iA3o55DrR3ZU4w39+jSnEatQ/ECE3j4vw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-5a04fb5e689so2256147eaf.1 for ; Tue, 27 Feb 2024 07:14:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709046851; x=1709651651; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=amSEcgH0vBenQY0MNkLAQkuPIGcuBfZrkYhyxtYc+pk=; b=cL6rzYr6s6CqWTpYhhqtjIEoQw3Fl5uStgOzlTrtLRSyvnzWesObz/1zmetDoCJvOQ N+vG4WPZU/BKjo5vrU79QBJ+OEo+IQBa8YF+Vu2qv1TxzkurukNt4PEXw6D5UeVP8qCy NmUDtTHYguWOKVSdREaOuL0zCKZB4IWoEj+GVxyamcragK8HBsR3gbi/7MHCTUOkr62k g5ZKt/apFU7Yy4u3mRtVU9K9AZb+8C8Rd9QqRQ+Z7TaAMQoapkEdN11g26Jgxq/IPUfD PmeG23FdJLCfH+VJh/iTHtxY5doJOD4izb/BchIn7ms0KIgeEZU1UTefs2w96AZ5udFe HacQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709046851; x=1709651651; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=amSEcgH0vBenQY0MNkLAQkuPIGcuBfZrkYhyxtYc+pk=; b=HNpkGgP9uF4ZRypEXWGZcPD0nFjqBuzYXxG3hOvgqSXfWjEyufw+TP8wIk9dUwY8z8 tNis0iNYVzLjwxItkfg2ht/SrnXLJs9qG7Se8ONXhNL3gB4Rszrx3laFKJCKq6OhwSZ9 fqHUYw2QQVsc9ikK6ibC8kw36e8uttCnEPXdA4VNnunnF9sKOAf12WfLjOxA9H0brz14 7bCLPzvW8jIDAvbBZrBPKgU/OjR7+vM05t7abHYYk0kDffkgD/4D/diuvf29laZdA4Dj XxP/LJaSEWHrsW9AiZq0jcBnpYScrHTWO3TEWXM93JZd3YLxiBlNw8q7+/Xxoir7G6O7 Di6g== X-Forwarded-Encrypted: i=1; AJvYcCXv73I6boMtj9j5RBNdydUtiZRUSnhJ7hfpuXzgBIFEmX/Scyu8q/hbKkrK6Nfp7jfFv55QiMy/gdTOtZezF/tlCABLmjEuTQ== X-Gm-Message-State: AOJu0YyXSxYm3rr5P1XV4WisEgpqJ07YP0wG3JwxND3OAcwiYShOPTkV jeOaVA7u7CzVr1pey4oW720iLZenpExxjerklTcmglP/Wcaj5xHNMaDdG55sCjk= X-Google-Smtp-Source: AGHT+IGLFmbu5zxj5t4lUfSQ7C+YIjbTIIxDEOaTVYmCQ1uACCNsEDFOLnhHt+i0G0b4+XEerRrn6Q== X-Received: by 2002:a4a:3418:0:b0:5a0:bcc5:ca72 with SMTP id b24-20020a4a3418000000b005a0bcc5ca72mr969333ooa.1.1709046851013; Tue, 27 Feb 2024 07:14:11 -0800 (PST) Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id b7-20020a4a9bc7000000b005a0859a4a01sm1070999ook.36.2024.02.27.07.14.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Feb 2024 07:14:10 -0800 (PST) Message-ID: Date: Tue, 27 Feb 2024 08:14:09 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH 1/3] Change 'v1' float and int code to fall back to v0 Content-Language: en-US To: Tom Tromey , gcc-patches@gcc.gnu.org References: <20240226-gdb-compile-align-v1-0-0f95d6435299@tromey.com> <20240226-gdb-compile-align-v1-1-0f95d6435299@tromey.com> From: Jeff Law In-Reply-To: <20240226-gdb-compile-align-v1-1-0f95d6435299@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2/26/24 20:12, Tom Tromey wrote: > While working on another patch, I discovered that the libcc1 plugin > code never did version negotiation correctly. So, the patches to > introduce v1 never did anything -- the new code, as far as I know, has > never been run. > > Making version negotiation work shows that the existing code causes > crashes. For example, safe_lookup_builtin_type might return > error_mark_node in some cases, which the callers aren't prepared to > accept. > > Looking into it some more, I couldn't find any justification for this > v1 code for the C compiler plugin. Since it's not run at all, it's > also clear that removing it doesn't cause any regressions in gdb. > > However, rather than remove it, this patch changes it to handle > ERROR_MARK better, and then to fall back to the v0 code if the new > code fails to find the type it's looking for. > > 2024-02-26 Tom Tromey > > * libcc1plugin.cc (safe_lookup_builtin_type): Handle ERROR_MARK. > (plugin_int_type): Fall back to plugin_int_type_v0. > (plugin_float_type): Fall back to plugin_float_type_v0. Given this is all libcc1 related and thus primarily of interest to gdb, if you're happy with it, then it's OK for the trunk. jeff