From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id 954743858D20 for ; Thu, 12 Jan 2023 01:45:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 954743858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pf1-x433.google.com with SMTP id g20so12765759pfb.3 for ; Wed, 11 Jan 2023 17:45:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:from:to:cc:subject:date:message-id:reply-to; bh=wRsd8WpPIdq1BsdNYCdojuYQzL3YH9UbsVFR5uq5ikM=; b=zaWoXVWxJZu1aKWQ0zFaIDGBDI2XpZXvEXTqpxA0aZCxNIwjfgm7Tqn+rrO3prOexs RKE53h2UTJgOfliGa8IOh10k3YWTSjOCHB0y6iD/2kojh1o37B6TL+HmbW3QkX5xeHfC xi2Ic8FVDJD/r6gZIYvRsPSsUgaiEKdX3HnH7rjzDRBLkVZjAvqSi6qYExXpHAfMIBsk TNneVhsH6YxnXmRwfTH3UzBn56fCpMwiGzNRrmtrMoG+rAQvH12g94xLn9uxc7+2TqzV lSRuyOlmRxR9ebIK9hoadz8VDhkynCBse4AI3qkqSn0UAoCQhDPi/+4wnw2U0Xt2uFA/ vbjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wRsd8WpPIdq1BsdNYCdojuYQzL3YH9UbsVFR5uq5ikM=; b=CDwA8THn9QX5k//i51WANUEwLhT2WRxEBxbEZzJnvujF/DguNFKgtwoGfbnT9RcTBo MLFlpCFpUwtwRm8Q2MH386qq2x57VzT2STisOLWVKI+D+AEVP+1sf7ZnYJVke0TPlBCR opoE1DMonWE8a5gOB1kicpg6ntgP4RYpMUeRoB2nKOCOD4A1zbSh6hLV0eyICPfkhlOF DQ5ARXVCKyhFXrl2Focyq6ryqGdR0M6h27JzuDNYdcKH4XBxgDf/c56eextEqD+jZx5t 34apBIUZYpqWXYbOR6GFlDoNP7FVe8B+FBCSgbj63uUFXOPIwZCLTWBkwetBpqYcbtAx 3Shg== X-Gm-Message-State: AFqh2kqHgcdyTyefYAdWGIzhBVLNqDuQM6G4tfH14WgxVOZ2yS0pSZ9d /N7/lU7rcxVNP8tbQr2Cd8woZfZ9uOuWbfPH X-Google-Smtp-Source: AMrXdXslV1+Uu14v7BAfiToVGR/IJslMqCPxqpb9gi4u/dCnvxclV1S5Np74xPHviYccJskHrGch+w== X-Received: by 2002:a62:a510:0:b0:58b:9473:7ae0 with SMTP id v16-20020a62a510000000b0058b94737ae0mr3341045pfm.32.1673487957769; Wed, 11 Jan 2023 17:45:57 -0800 (PST) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id 186-20020a6216c3000000b0057fec210d33sm9422605pfw.152.2023.01.11.17.45.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 17:45:57 -0800 (PST) Subject: [PATCH] gimple-fold.h: Add missing gimple-iterator.h Date: Wed, 11 Jan 2023 17:44:40 -0800 Message-Id: <20230112014440.19153-1-palmer@rivosinc.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Palmer Dabbelt From: Palmer Dabbelt To: gcc-patches@gcc.gnu.org X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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: As of 6f5b06032eb ("Finish gimple_build API enhancement") gimple-fold.h uses some of the declarations from gimple-iterator.h, which causes issues when building Linux's stackprotector plugin. gcc/ChangeLog: * gimple-fold.h: Add gimple-iterator.h include. --- I'm not sure if this should instead be fixed in Linux by reordering the includes along the lines of diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h index 9a1895747b15..2c3a3079128a 100644 --- a/scripts/gcc-plugins/gcc-common.h +++ b/scripts/gcc-plugins/gcc-common.h @@ -72,6 +72,7 @@ #include "stor-layout.h" #include "internal-fn.h" #include "gimple-expr.h" +#include "gimple-iterator.h" #include "gimple-fold.h" #include "context.h" #include "tree-ssa-alias.h" @@ -88,7 +89,6 @@ #include "gimple.h" #include "tree-phinodes.h" #include "tree-cfg.h" -#include "gimple-iterator.h" #include "gimple-ssa.h" #include "ssa-iterators.h" but I figured it was slightly easier for users to keep these compatible. It looks like many GCC-internal uses of gimple-fold.h already have the gimple-iterator.h include right before, though, so not sure if that's how things are meant to be. --- gcc/gimple-fold.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/gimple-fold.h b/gcc/gimple-fold.h index 2fd58db9a2e..66bee2b75df 100644 --- a/gcc/gimple-fold.h +++ b/gcc/gimple-fold.h @@ -22,6 +22,8 @@ along with GCC; see the file COPYING3. If not see #ifndef GCC_GIMPLE_FOLD_H #define GCC_GIMPLE_FOLD_H +#include "gimple-iterator.h" + extern tree create_tmp_reg_or_ssa_name (tree, gimple *stmt = NULL); extern tree canonicalize_constructor_val (tree, tree); extern tree get_symbol_constant_value (tree); -- 2.39.0