From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 6DD053858D28 for ; Wed, 21 Jun 2023 18:37:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6DD053858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="6.00,261,1681200000"; d="scan'208";a="10736341" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 21 Jun 2023 10:37:16 -0800 IronPort-SDR: u/obnOZW3r9wbkEiMWFfjZyMC8tilFZKemupnJswnnt+1muWsRDFJ9v3ppbTRz3SWzJKh/rseU 0/+QyxWFyOgnV52RUutWg5TuMSyk0OS+Qzlcz1LxyLzX2fscA86foWLPbvBoVXBpGuom/W1k/7 Lwdz/JV5tP2Rd0SdRkdRr9pb5CxMNfBsJ4d0fa/K5a5QwfTlWlFD0rfMd2YwxA3IaY+/JPxTzV eLc7YMwYGFut/eJyab6NS9ngU2mgkY9mBtjar5JQZvgjv4+u5NHwDdYWbETinWhhKRvWUnPShP nbo= Date: Wed, 21 Jun 2023 18:37:12 +0000 From: Joseph Myers To: Richard Biener CC: , Subject: Re: [PATCH] Update array address space in c_build_qualified_type In-Reply-To: Message-ID: <5ffe3de1-75eb-d397-8255-ce85c155237e@codesourcery.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3105.9 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,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 Wed, 21 Jun 2023, Richard Biener via Gcc-patches wrote: > > This patch sets the address space of the array type to that of the > > element type. > > > > Regression tests for avr look ok. Ok for trunk? > > The patch looks OK to me but please let a C frontend maintainer > double-check (I've CCed Joseph for this). The question would be whether there are any TYPE_QUALS uses in the C front end that behave incorrectly given TYPE_ADDR_SPACE (acting as qualifiers) being set on an array type - conceptually, before C2x, array types are unqualified, only the element types are qualified. The fact that this changed in C2x gives a shortcut to doing that analysis - you don't need to check all TYPE_QUALS uses in the front end, only a limited number of places that might handle qualifiers on arrays that already have conditionals to do things differently in C2x mode. But some sort of analysis of those places, to see how they'd react to an array type itself having TYPE_ADDR_SPACE set, would be helpful. If you're lucky, all those places only care about TYPE_QUALS on the element type and not on the array type itself. -- Joseph S. Myers joseph@codesourcery.com