From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 ; 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 To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] tree: Handle BITINT_TYPE in type_contains_placeholder_1 [PR112511] Message-ID: Reply-To: Jakub Jelinek 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 List-Id: 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 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