From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by sourceware.org (Postfix) with ESMTPS id 4D8E238983AE for ; Tue, 31 Jan 2023 13:21:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4D8E238983AE Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wm1-x335.google.com with SMTP id m16-20020a05600c3b1000b003dc4050c94aso7753864wms.4 for ; Tue, 31 Jan 2023 05:21:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=24a+00zZpCmCh9y+ZjCNHOKZrnnJOq01O9wV3T7OIg4=; b=BP/eVbrLg+X7arZc0f/NZ2cMiRhK2T9hgOrmuv5jbEeD/K6oGnUovK5Ol0Ok6gslCX naE214gRRG0XlEZLTjH1Kubz0lFavAPASiDD2OkIi0AruOR/fcG/7g2o2rYxW4Q8Sdmx x27tUhDWcUjQY3XTLKF4Sbj8PtXU8Cxpm6eU1ow72H4rNod209c218iDppQ9jLXPO3pj aOM3y0AT+9l6+HjPERFLFy4+PpkkPYZGRQtyTzSFa2uk2fxWLWJU7wqpPTYtMLSUApMk PgV/9/yXOi5RDwOHUhdfczDS0G5h70DVGjoojw8C75YEfH1E2tcuPAdRJGQ3is7+0Kr+ bKpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=24a+00zZpCmCh9y+ZjCNHOKZrnnJOq01O9wV3T7OIg4=; b=6YZAsIHs4n+m+mXQSyK1E3NlwHlkS2pnhFJvUdAIGDquJ4Xjv1WJSePEp6U3YDJZrX NbkpY18X9alAfiil/9xeIPX9pmysBQt3meOAzvpXyBuGMk+/CbCQrLX33apWgZirFTHR 66CpJhmABRj1BwTpZXoMOmzZ9KInwkB870iYCIJWZeBk+09R4ReqM++xcrLO+A+7NuIv Iqd2Z4CfeUAuuT897OfdFHqhA3Bn85GgFyphAbdC3TZ3qLvCuuPT/9lve8upnkhxxSl0 nOaNwzmTBI91fs0ZK0KtIvRNWfgHHoYNwqQ64FBBgnG3mXfg5IY6FSvA9ufmeS526r7f 70Vw== X-Gm-Message-State: AFqh2kqTi3Dfp6pt392ZdyhYwluHK1BTTVYq0qN66m/SMhP+zozC+8K2 WVmTXLHQlLi9wl8Z6YbHgv/y X-Google-Smtp-Source: AMrXdXtEByUc0+G66x2eGJKJASbagCXDasLy7yaf4lF7NxD6gP65u4j4nlrXeTxOvlQT3hEzQyK7fA== X-Received: by 2002:a05:600c:a15:b0:3db:18a0:310f with SMTP id z21-20020a05600c0a1500b003db18a0310fmr51471004wmp.33.1675171305158; Tue, 31 Jan 2023 05:21:45 -0800 (PST) Received: from platypus.lan ([2001:861:5e4c:3bb0:6424:328a:1734:3249]) by smtp.gmail.com with ESMTPSA id f9-20020a7bcd09000000b003dc54344764sm7919378wmj.48.2023.01.31.05.21.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 05:21:44 -0800 (PST) From: Arthur Cohen To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Philip Herron Subject: [COMMITTED] gccrs: Remove param_use_canonical_types checks ported from c++ front-end Date: Tue, 31 Jan 2023 14:25:30 +0100 Message-Id: <20230131132530.662219-1-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-15.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: From: Philip Herron We are not fully setting TYPE_CANONICAL yet but we don't need to be as strict as the C++ front-end yet. param_use_canonical_types is a command line option we are not using either. gcc/rust/ChangeLog: * backend/rust-tree.cc (comptypes): Remove some C++ specific checks in Rust const folder for now. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/rust/backend/rust-tree.cc | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/gcc/rust/backend/rust-tree.cc b/gcc/rust/backend/rust-tree.cc index d79cd96f011..d2ddcfd2957 100644 --- a/gcc/rust/backend/rust-tree.cc +++ b/gcc/rust/backend/rust-tree.cc @@ -2916,27 +2916,7 @@ comptypes (tree t1, tree t2, int strict) perform a deep check. */ return structural_comptypes (t1, t2, strict); - if (flag_checking && param_use_canonical_types) - { - bool result = structural_comptypes (t1, t2, strict); - - if (result && TYPE_CANONICAL (t1) != TYPE_CANONICAL (t2)) - /* The two types are structurally equivalent, but their - canonical types were different. This is a failure of the - canonical type propagation code.*/ - internal_error ( - "canonical types differ for identical types %qT and %qT", t1, t2); - else if (!result && TYPE_CANONICAL (t1) == TYPE_CANONICAL (t2)) - /* Two types are structurally different, but the canonical - types are the same. This means we were over-eager in - assigning canonical types. */ - internal_error ( - "same canonical type node for different types %qT and %qT", t1, - t2); - - return result; - } - if (!flag_checking && param_use_canonical_types) + if (!flag_checking) return TYPE_CANONICAL (t1) == TYPE_CANONICAL (t2); else return structural_comptypes (t1, t2, strict); -- 2.39.1