From patchwork Mon Nov 6 11:01:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 161945 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp2576335vqu; Mon, 6 Nov 2023 03:02:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGya/MctyOMGR3ehP6cuTkHkfig2NPD9a9z5GhTyPx6Im1yzT54uSRjr8s0kYVIAKzT65Q X-Received: by 2002:a05:6808:2004:b0:3a3:ed41:5ab with SMTP id q4-20020a056808200400b003a3ed4105abmr37888110oiw.9.1699268541509; Mon, 06 Nov 2023 03:02:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699268541; cv=pass; d=google.com; s=arc-20160816; b=H6fQWqhzxwD68n/kvZsPtIy4zjXU2Jtsb5lWmS/4tKhmPLnAmzuXNbDpWyKnj3nrbR 0qpxGRCz0SVRP/zoXJw0PVDI9jdsDEvckl3AbgLBrJparvi8IzDoHJhHp8lGqt9184cP ATRPwKXkGcrvpnhtNIeVWwvAsaX4LJK8JN8dOQa44ajUxPp7sFUlFvSHp+BWCWou1GUz Q78EYgBUrvCZgjDvMzSVnbF6gFMhgECTcthqgAHnFyPiK6UjboC1+787W5SxXYZ3VnON 5vy1pMpxCeq/xhGWC1b3SETb8YvE7i9f+Cldlajb7L11j7aH+3j9T7Y9OD4FXODGb8Y5 P5YA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=Izk8/C0rw5rgqrFEn+UqbAvVjTGSg2D3pjdO4G+YISY=; fh=/Nd5QuUVyvukBVrfGE95zhdjSW1czJs2XNydzU1t184=; b=fUj6e6Kp21cvqfqhOYlih0ebkEaNOAw+lWyR45pNA6beHeTtFzZkF3/Ub796jBW1qT kq3s22Ka8zxWMI0qQwwAd5p8JfdeVszm4FJnDxceULOD1EsA48fvyBwY7Lf2FKl8PBWh KgyzvYl1aBWMgjLt4WO/Pa5hTRYH7mfHkDykK0rcVqkq+PLHRYU4cb/T/AIaESrdWpuK sqwq2ukHBugoePqiR7F6L4uRlkTXotUHPrRujtBUyvU0THMFV3eCxV0SJjgpZ1zwkdiW oY7PRbzupjRGJ/SbvOQ88HCbDEgkrmV+lCPn7XpY/bq0SV57jM3Guv5nA6sK0kLmEJ5i ko6g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b=Zb26v5sm; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id b42-20020a05620a272a00b00774373352acsi5501967qkp.762.2023.11.06.03.02.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 03:02:21 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b=Zb26v5sm; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 447D138582A9 for ; Mon, 6 Nov 2023 11:02:21 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by sourceware.org (Postfix) with ESMTPS id 0AF1D3858D3C for ; Mon, 6 Nov 2023 11:01:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0AF1D3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0AF1D3858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699268518; cv=none; b=ptL4X4xJZ5LPlQBv4FoDBSOZvYYJogDk6nCIGYybM4k/f19K6fSy46Ag96qAeV2U6xAhX1hEnd7853eiiGEKSPWYnVKbBZqzlgQ1ovfYOr0QIZo4D3l6mnbCvZ+8UGPuhaeeTwESW7jC0CroH4nJKTeNyPGuDwmtnDKMU4WnkIY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699268518; c=relaxed/simple; bh=dDLbVbA+T1dvw4yunWkTr+lRq3+zD2ZG1nrCsGZfE2g=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=bwDHFDdvn3MY0+jbYhB/6coYoevyCrWjx5/QVl7xyIrcUIJQ1npy5vMO+QLzPQvIwu6Cs4LGsWvvLI6TjqA8vn0KfwGbel/V7TJ2pxbtBobhqpEwUoNC3T1SXmYs43WMwlFlULcX2tEhsYwooIqJIJK2gX7JV5iN6SoYRaskJX4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-32da9ef390fso2659628f8f.2 for ; Mon, 06 Nov 2023 03:01:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1699268516; x=1699873316; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Izk8/C0rw5rgqrFEn+UqbAvVjTGSg2D3pjdO4G+YISY=; b=Zb26v5sm5VhnAUW9yZTNzxldqLCX1hZY/B+n6QkkUcBkc7C7TV9xKBiNX6ks+lI4DF cnFeQ6ukdzovAynp4KVLs+tV5IIirsaTEGxwKenux1myajCx2VWX9OZx9lIK/XLSRI+J +TZdsdkwe/u6RsUohPNsWgAIW6F7mkOXo/Jn+xvmqXf2qnC0kNzLZFnLZqU0tPxX/8zD TGRF1PugMi3eD0MVRZX9dpd1s2L8H9hET1CdauWW7lyu6SCZsH14RkK23GT9g0xdBWkX 1OXLJdchlAyWDcEEFhHKNtXLnJhrP4vXK76vkW/sWQgEG8bh/bHjpXVry/5jnjHTGksl aDjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699268516; x=1699873316; 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=Izk8/C0rw5rgqrFEn+UqbAvVjTGSg2D3pjdO4G+YISY=; b=voUCnmwasomVXds4SBFb2Sn+dj/BTe8HgNeeuLKcyH7qGvO7XDko2OeTlV+UEEwwKM zzz/dr2DqUPsMjNi0jcITSQ7PymkDtrK7WzaYwkkqqmUfvbHYDn2sAzt8BxEYuFj/XNn QOA3HHsgMaVu5skYL+xsvMKOQ6AiU2FstQOmLyNHm8NxNlQYNvCmwACalyhtYfpULK0q L3GHSHRYx3MKZGLAbvtBqDTxzUCXb9hjdPEmXwsXCxgzLJe2AoWWzy52OxlTTfZhxQ/z ASfmBCiZANxzg+EPs/q1WypUI4MbuLkBFiDLXG67w4QUSMaJYw0SaYmn7YVR8wqtputb /u0Q== X-Gm-Message-State: AOJu0YwlGKM8XyY6qSehizgtwIzRiHbeOO3p4AyKn26qIG6qjwAez9zU Cbj4fwGoT1MjfZYT6YEBO+mkPhpvyU2RCy8HGmLt6g== X-Received: by 2002:a5d:51d0:0:b0:322:707e:a9fd with SMTP id n16-20020a5d51d0000000b00322707ea9fdmr20446687wrv.34.1699268515724; Mon, 06 Nov 2023 03:01:55 -0800 (PST) Received: from poulhies-Precision-5550.lan ([2001:861:3382:1a90:abca:bb6b:751b:a141]) by smtp.gmail.com with ESMTPSA id e4-20020adfef04000000b0032dde679398sm9273849wro.8.2023.11.06.03.01.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 03:01:55 -0800 (PST) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: dmalcolm@redhat.com, =?utf-8?q?Marc_Poulhi=C3=A8s?= Subject: [PATCH] testsuite: refine gcc.dg/analyzer/fd-4.c test for newlib Date: Mon, 6 Nov 2023 12:01:17 +0100 Message-ID: <20231106110153.3863209-1-poulhies@adacore.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.8 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, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781812210316922702 X-GMAIL-MSGID: 1781812210316922702 Contrary to glibc, including stdio.h from newlib defines mode_t which conflicts with the test's type definition. .../gcc/testsuite/gcc.dg/analyzer/fd-4.c:19:3: error: redefinition of typedef 'mode_t' with different type ... .../include/sys/types.h:189:25: note: previous declaration of 'mode_t' with type 'mode_t' {aka 'unsigned int'} Defining _MODE_T_DECLARED skips the type definition. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/fd-4.c: Fix for newlib. --- Tested on x86_64-linux and x86_64-elf. Ok for master? gcc/testsuite/gcc.dg/analyzer/fd-4.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-4.c b/gcc/testsuite/gcc.dg/analyzer/fd-4.c index 994bad84342..e4a834ade30 100644 --- a/gcc/testsuite/gcc.dg/analyzer/fd-4.c +++ b/gcc/testsuite/gcc.dg/analyzer/fd-4.c @@ -1,3 +1,4 @@ +/* { dg-additional-options "-D_MODE_T_DECLARED=1" { target newlib } } */ #ifdef _AIX #define _MODE_T #endif