From patchwork Wed Jul 3 23:23:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 809357 Delivered-To: patch@linaro.org Received: by 2002:ab3:1d89:0:b0:271:517:f52 with SMTP id y9csp2662850ltd; Wed, 3 Jul 2024 16:23:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCURI4oJcV6qohYof+ch3V9UTvIYdP/XY6FJK1k6lwdyzwmIS8hx3IGDE0g9JXG+nDUtbNhhfASVF5aTYePCQceA X-Google-Smtp-Source: AGHT+IHLOI6nBeb3INldOaVpAO6MWMFrRIGmn1HX+Ah6w81AePdaVq4+eTDX26x81fX+bGuXUfyA X-Received: by 2002:a37:c448:0:b0:795:531c:c7fb with SMTP id af79cd13be357-79eee1bfb9bmr8598685a.27.1720049036910; Wed, 03 Jul 2024 16:23:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720049036; cv=pass; d=google.com; s=arc-20160816; b=cNn44WKnSb1qq/5fjW3mjicZvDsvgOS35H7TQeMpMqZYQhX/5Vu+qW9ZCt6M907eM1 iUOIMjWwCM0bN8B51wnpLpf4SPZiDpbD7IW/63ooD5aZyMk+cdUQg/tr1cYAhICGFIqY Ji7KK0Lex9ZXcRv4x5a34dfZw1Q5WVweh52ydhzo59NUvQN7Uv7x61pUw6f1vw6MNR2i fN5Zij8rMyf7jn421cEJ4kSJtGqZVdkvvdWNGiuCEjzc/sVT29flDrMKsuCf3XxnAyD6 Vq30vxYsVf9Ls/FXesfVhqCMSdqlg+vwACqK3w/7v9BqjsH/aBQMhYoDiaz74O0Cq5cP NZFw== 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:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=+ukaI8wCr4LuQzd+5S5qhAvkOJgjda590H0qSvCTK9M=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=qwxq1eHA65deJ/d15uoPFQDnzKkbyIvoF6sasUKdpmQxLzNlM5cJ3e3HSW7PJ4p8Db BMby6YMYGBkyp4XtIXtKNFU9i6InLr0pnIoJZR08TRhZK2Ut7q3rKTZ7vL94uI/9tJKM tfQxF+FBzvXQX6qFyehrjrsu2Qxe8P8uZELM85ZWmExASs9whXSqlx4d6BOnC3MxY2tq mnpQQhjeRRiefhhNRfSOT2NsYpm/tW9IXoMwGroW9+eUtFtJoXUu8soUPB+Ig7N06fXZ OEunqdjE4jy1m+o03SP918RdCTiQBbCaI8thw2jhEIohfSklS8QCCqPgloiikqbN3m+L 5Uug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SO7ncFc+; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces~patch=linaro.org@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces~patch=linaro.org@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id d75a77b69052e-446514d8491si132738851cf.672.2024.07.03.16.23.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 16:23:56 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces~patch=linaro.org@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=@linaro.org header.s=google header.b=SO7ncFc+; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces~patch=linaro.org@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces~patch=linaro.org@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 84490384A490 for ; Wed, 3 Jul 2024 23:23:56 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by sourceware.org (Postfix) with ESMTPS id E88723858403 for ; Wed, 3 Jul 2024 23:23:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E88723858403 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E88723858403 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720049024; cv=none; b=mCVnTlL5DLXtKA+CHXg0x8i1uSq16ZFKBTTMQO0APNvJtiQcq6ps5g2rFuTU2ojwOX509ORmwRI0yvQJBl19I5E0ZKjfFCpx1K125eh541/pCPxX2sxaGPz2XspDMgBONtmOacP9xbjOHkuZyZ9hmPe1AUwwC6ZbDyAk/sYHolI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720049024; c=relaxed/simple; bh=yN8feGdc6Mq0ooaqXePNRjUOB3QsXokz4Xx4Gk0cZg8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=JE9ffks9DoWVNpZDK1hMQWrriDxISOLKnbayQj6odqGqWWJMCE/S3l0Ebq9WqLipTjfO01w5VTSmnqztKXDm1YJK7DSfr09wKVLZXh+5a2ZSzW7u0KyBwehfguDc4cubvnBW889h93K8VV0cCgnjaXIALwNySTmIz9jW5t4fxfk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-6e7e23b42c3so6183a12.1 for ; Wed, 03 Jul 2024 16:23:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720049021; x=1720653821; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=+ukaI8wCr4LuQzd+5S5qhAvkOJgjda590H0qSvCTK9M=; b=SO7ncFc+ifzfz3PxRQVA3xEdg4TEFNdO15oaaYaGu1nD69hzW96jEkYw0zPFrBzcZc 4CmZM95a179k6l8LTkIu7Z02ALIKxkeyz9atInrhQNFY0k44s6nnn7b0n26UrAHApg92 ugUFHqF9XhMSjVc0C1KKNZ1hXlGyOlyLWttxVfTdzT2iV9gZ1Y8y9j/IS6VsNq3ay/mg h7uTu0LWmPP1mEW8RWeA1MJPt28gl0k2Gk5ElhQ2Qz8OlVtJlKW6wHeQ7hXz0zss8Kx3 mU5d8ZWZ8jGJka3oIQ8SfUbGREeIMFdh/rgVMYS6zF4aA3yX2Wi/J9D6nn7pBcum1wF7 YArA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720049021; x=1720653821; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+ukaI8wCr4LuQzd+5S5qhAvkOJgjda590H0qSvCTK9M=; b=a6erzMUbob6MIcSU7QwiJBhUbkkGe6GVfKa1cZG7gu2q3prGK24G3eJazI6bOYebr1 eooHQ68V3hE19Yg4hqu42u0u32skFtoEQmN+MomSNlL/zHyZ43KMqI75/23Et6sCchzp 8UDY7p0E1waO3p/WwVevulZHhXDQM2iCoGg4qf6cXWxrk19Z++lOM5gvyimxpK6jreVa gTo63K4rpPNWJf8E0rjUyHiyuwh1HLIUoiluXBoAxDu0tewCJwZsKncq5dni7sE6BHag oI0TWy3KCkMdK2nxAssO1sJImSPlhs+/29n1klKnFAEndt/AwUNPSfRcQ5weCHnfMovu uq2A== X-Gm-Message-State: AOJu0Ywp1o/f7aaVrG/Re8dZo7vc8Sm/Lw1qYBjDtH+IuFsB3p/+mtwd l1ro1KUHswp55oUCzG5FxNkJgJHvewkqwWn2Tqlxy2vqvC1aJJQ1do9fqz8dKlT9U0zAVtw2Hs/ V X-Received: by 2002:a05:6a20:258f:b0:1bd:18ee:f141 with SMTP id adf61e73a8af0-1bef611b9b9mr13399481637.4.1720049021504; Wed, 03 Jul 2024 16:23:41 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:5d1c:5d1f:9410:579]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fac15695b4sm109505615ad.225.2024.07.03.16.23.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 16:23:41 -0700 (PDT) From: Thiago Jung Bauermann To: gcc-patches@gcc.gnu.org Subject: [PATCH] testsuite: Fix pr115278.cc test when uint32_t isn't unsigned int Date: Wed, 3 Jul 2024 20:23:38 -0300 Message-ID: <20240703232338.242993-1-thiago.bauermann@linaro.org> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Spam-Status: No, score=-11.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=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~patch=linaro.org@gcc.gnu.org On arm-none-eabi, g++.dg/vect/pr115278.cc fails with: FAIL: g++.dg/vect/pr115278.cc -std=c++14 (test for excess errors) Excess errors: /path/to/gcc.git/gcc/testsuite/g++.dg/vect/pr115278.cc:24:28: error: invalid conversion from 'volatile unsigned int*' to 'volatile uint32_t*' {aka 'volatile long unsigned int*'} [-fpermissive] g++.dg/vect/pr115278.cc -std=c++14 : dump file does not exist UNRESOLVED: g++.dg/vect/pr115278.cc -std=c++14 scan-tree-dump-times optimized "\\*WRITE[^\r\n]* ={v} " 2 The problem is that the cast used to initialize the WRITE variable doesn't match the underlying type of uint32_t. Fix by using __UINT32_TYPE__ instead. Verified that after this change, the test still fails when reverting the fix for PR115278. Tested on: - Host x86_64-linux-gnu, target arm-unknown-eabi - Native armv8l-linux-gnueabihf - Native aarch64-linux-gnu - Native x86_64-linux-gnu gcc/testsuite/ * g++.dg/vect/pr115278.cc: Use __UINT32_TYPE__ in cast used to initialize WRITE. --- gcc/testsuite/g++.dg/vect/pr115278.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/g++.dg/vect/pr115278.cc b/gcc/testsuite/g++.dg/vect/pr115278.cc index 331075fb2781..39a7537a3e6a 100644 --- a/gcc/testsuite/g++.dg/vect/pr115278.cc +++ b/gcc/testsuite/g++.dg/vect/pr115278.cc @@ -2,6 +2,7 @@ // { dg-require-effective-target c++11 } // { dg-additional-options "-fdump-tree-optimized" } +#include #include const int runs = 92; @@ -21,7 +22,7 @@ union BitfieldStructUnion { BitfieldStructUnion(uint32_t value_low, uint32_t value_high) : value_low(value_low), value_high(value_high) {} }; -volatile uint32_t *WRITE = (volatile unsigned*)0x42; +volatile uint32_t *WRITE = (volatile __UINT32_TYPE__*)0x42; void buggy() { for (int i = 0; i < runs; i++) {