Message ID | ZVMfGw8fJRZnO0Fg@tucnak |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1695455vqg; Mon, 13 Nov 2023 23:18:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IFRo26qi2nGGzNFU4w1ssr1ctJfJcGfaeOO5NxS5jv/iUZ7g3Q9AJklUZ2DvJ+Ay/zlBetc X-Received: by 2002:a05:620a:4448:b0:779:f0a1:3128 with SMTP id w8-20020a05620a444800b00779f0a13128mr1577735qkp.63.1699946296729; Mon, 13 Nov 2023 23:18:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699946296; cv=pass; d=google.com; s=arc-20160816; b=fCFtYImWJcqGNrSLcqho13hakvp1vT13wKCp2yKkf+lYkaWCxTT8V3l95hgc4Or0bd P4z9bumadKcJmjfZYiPf2AzbbjzazisHFjTt/WsV7LDvneEJZZu1hhdNiuXfGHY/J28L 3IfWh7N6YhJwPjA8VgNn05fWVqGiDl4nuN99Pq8KULvIKkf3c47K1LlAc4bVXXLq/It8 9i4mmu2mAxkgpvQKfr4mwo8LzBsEOQZ1gldSslzZ/gZKneqbPTnYdgDIc5TiMZTh84B/ biCmo3GR6TrdKlEKju+NcuX1iHt4COI2UzXiNQwm3zUgJ8NhvkFdKUd0KgJ+OmaWbzJn 2QWg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=FsMhNH7/MOcHizLar7KfmptDKmhcIz+P24Z6B65eHXc=; fh=FCjeRajqaQYHMkQtfIia8KT5yBac53mYOLLyJhYG/AY=; b=S7g8WVMH68VbaJQS4KMjJVi/tmxHQSlum8Db89qu9IshcIoq3F6zsNcytQI7JXsNd2 /X+a+C+eSpLZXPSYo5RNde4K3mMUd0ZeRlJlYoXCdh8gEmImlcLGxC6D660Pm17QrTeA bytjB93ORf+5oRtBjzNPS/K/6KFZZ3gV5E+ALG2FG6s5el5GZSirULbVMZb/Yq91c6Pu sj57pxuIyz8BMf8KPehVOZIcckR4TBlnhAaJbCE+zDQJrtG7Tr33s9E168dxxWsz8nNT hWqskuOlm3jKhNz+HoBmj/xUF/7fk0V3ze+QOMiGTT5ofjLPwXEHtYSS+IBUQWYGwXQ4 knVQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=U5H71QYE; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id g1-20020a05620a40c100b00778b0f5d4d1si6780929qko.704.2023.11.13.23.18.16 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 23:18:16 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=U5H71QYE; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7EB6E385DC10 for <ouuuleilei@gmail.com>; Tue, 14 Nov 2023 07:18:16 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id F3F153858CD1 for <gcc-patches@gcc.gnu.org>; Tue, 14 Nov 2023 07:17:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F3F153858CD1 Authentication-Results: sourceware.org; dmarc=pass (p=none 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 F3F153858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699946274; cv=none; b=Rz509spqhiz0CjBm3Vwnn3xZtfd3/myE02I2hbl2TC08DlTzCP+9hS2YvZ7B/v6yHJQC2Mapbp8viq4ykbqiimeVDImFvl16b/aBndOkbqyY+Ovyzz1+40Ora6+PXGZunU9K7y4vQE/dZgl6XJTcbZOxJ7PkhscPtKLXd/xIkN0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699946274; c=relaxed/simple; bh=ykbIKU7ZRRzE9cKuh1xks04/lbK1zxhxT8fBHAE/oqk=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=sRKzMd/1E1mHsxuzfuPTJ74RBNtvdE1fsxndNhN/PXKEdDa8FPFKL4Gs+fYWMhtBcpO5zqzKY3/XTiuRVy0sp2kJ+RukrGlp3/5tK+APfVHEVbitDUz7Cg5s9jLkAaivWwClYEp72Paqgm+BPKhb9/0OT9R3cmHu7AooxnkWMyE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699946272; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=FsMhNH7/MOcHizLar7KfmptDKmhcIz+P24Z6B65eHXc=; b=U5H71QYETo/X7dDBjQORvwyD/UBUFaswP8ksu7KBIb0f4yGEmeSLEgoj465qdcaYUHmZN+ CIxPUGeOZR6f6kvwNiJLESxZRUWO1leuLqJfGteq40Vi/PwnucgN1BMH02fk658KTwHO3K akNxhhcaiieoadjmXJ8RNK/GGrtwcu0= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-75-WvLD08QFMFqDbQAXQPBV-g-1; Tue, 14 Nov 2023 02:17:51 -0500 X-MC-Unique: WvLD08QFMFqDbQAXQPBV-g-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EBA151C07588; Tue, 14 Nov 2023 07:17:50 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.53]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AE5031121307; Tue, 14 Nov 2023 07:17:50 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 3AE7HmX33619656 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 14 Nov 2023 08:17:48 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3AE7HleP3619655; Tue, 14 Nov 2023 08:17:47 +0100 Date: Tue, 14 Nov 2023 08:17:47 +0100 From: Jakub Jelinek <jakub@redhat.com> To: Richard Biener <rguenther@suse.de> Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] tree: Handle BITINT_TYPE in type_contains_placeholder_1 [PR112511] Message-ID: <ZVMfGw8fJRZnO0Fg@tucnak> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Reply-To: Jakub Jelinek <jakub@redhat.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782522887681238758 X-GMAIL-MSGID: 1782522887681238758 |
Series |
tree: Handle BITINT_TYPE in type_contains_placeholder_1 [PR112511]
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Jakub Jelinek
Nov. 14, 2023, 7:17 a.m. UTC
Hi! The following testcase ICEs because BITINT_TYPE isn't handled in type_contains_placeholder_1. Given that Ada doesn't emit it, it doesn't matter that much where exactly we handle it as right now it should never contain a placeholder; I've picked the same spot as INTEGER_TYPE, but if you prefer e.g. the one with OFFSET_TYPE above, I can move it there too. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2023-11-14 Jakub Jelinek <jakub@redhat.com> PR middle-end/112511 * tree.cc (type_contains_placeholder_1): Handle BITINT_TYPE like INTEGER_TYPE. * gcc.dg/pr112511.c: New test. Jakub
Comments
On Tue, 14 Nov 2023, Jakub Jelinek wrote: > Hi! > > The following testcase ICEs because BITINT_TYPE isn't handled in > type_contains_placeholder_1. Given that Ada doesn't emit it, it doesn't > matter that much where exactly we handle it as right now it should never > contain a placeholder; I've picked the same spot as INTEGER_TYPE, but if > you prefer e.g. the one with OFFSET_TYPE above, I can move it there too. Do we fill in TYPE_MIN/MAX_VALUE for BITINT_TYPE? In that case the patch is OK. Otherwise I'd pick the OFFSET_TYPE place. Thanks, Richard. > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > 2023-11-14 Jakub Jelinek <jakub@redhat.com> > > PR middle-end/112511 > * tree.cc (type_contains_placeholder_1): Handle BITINT_TYPE like > INTEGER_TYPE. > > * gcc.dg/pr112511.c: New test. > > --- gcc/tree.cc.jj 2023-11-09 09:04:20.357518740 +0100 > +++ gcc/tree.cc 2023-11-13 14:57:33.001715799 +0100 > @@ -4210,6 +4210,7 @@ type_contains_placeholder_1 (const_tree > return false; > > case INTEGER_TYPE: > + case BITINT_TYPE: > case REAL_TYPE: > case FIXED_POINT_TYPE: > /* Here we just check the bounds. */ > --- gcc/testsuite/gcc.dg/pr112511.c.jj 2023-11-13 15:00:13.872457749 +0100 > +++ gcc/testsuite/gcc.dg/pr112511.c 2023-11-13 14:59:59.933653398 +0100 > @@ -0,0 +1,17 @@ > +/* PR middle-end/112511 */ > +/* { dg-do compile { target bitint } } */ > +/* { dg-options "-O2" } */ > + > +struct T { _BitInt(22) a; }; > + > +void > +bar (struct T t) > +{ > +} > + > +void > +foo (void) > +{ > + struct T t; > + bar (t); > +} > > Jakub > >
On Tue, Nov 14, 2023 at 08:10:21AM +0000, Richard Biener wrote: > > The following testcase ICEs because BITINT_TYPE isn't handled in > > type_contains_placeholder_1. Given that Ada doesn't emit it, it doesn't > > matter that much where exactly we handle it as right now it should never > > contain a placeholder; I've picked the same spot as INTEGER_TYPE, but if > > you prefer e.g. the one with OFFSET_TYPE above, I can move it there too. > > Do we fill in TYPE_MIN/MAX_VALUE for BITINT_TYPE? In that case the > patch is OK. Otherwise I'd pick the OFFSET_TYPE place. We do (otherwise a lot of things would break). Jakub
--- gcc/tree.cc.jj 2023-11-09 09:04:20.357518740 +0100 +++ gcc/tree.cc 2023-11-13 14:57:33.001715799 +0100 @@ -4210,6 +4210,7 @@ type_contains_placeholder_1 (const_tree return false; case INTEGER_TYPE: + case BITINT_TYPE: case REAL_TYPE: case FIXED_POINT_TYPE: /* Here we just check the bounds. */ --- gcc/testsuite/gcc.dg/pr112511.c.jj 2023-11-13 15:00:13.872457749 +0100 +++ gcc/testsuite/gcc.dg/pr112511.c 2023-11-13 14:59:59.933653398 +0100 @@ -0,0 +1,17 @@ +/* PR middle-end/112511 */ +/* { dg-do compile { target bitint } } */ +/* { dg-options "-O2" } */ + +struct T { _BitInt(22) a; }; + +void +bar (struct T t) +{ +} + +void +foo (void) +{ + struct T t; + bar (t); +}