From patchwork Thu Nov 11 14:56:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 47478 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DC9403857404 for ; Thu, 11 Nov 2021 14:56:41 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 6EB353858410 for ; Thu, 11 Nov 2021 14:56:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6EB353858410 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: CBof5FujUQzLBvPmuHT13m7WXgJN9p9sI8OU5DkXPs+mdMZ3WT/EiUWGeHHi+t68tiKQQPSxzI 6efgNWJ3yYHdl/ZjlluvOvkY4OFb4W4/+m7ZKfUG97e9+UEGAkXm0/iadyzXdjlRXf63YVxROe U8lfAVx0Yl7p641xmoYJ8x2aoCuoWd0SLDU1DG2XrVsnsyfkilzZBOx1ngpCxRGezalJ/StsKo RbGp1dGGd/O8V+8048AlKRYakSLnDYAjrbLAHhg/ObEjJgHLiaj/iGkvkHakz91oZzu1cNpAnR C6gk54DWDtN8tLeKyTysC1+i X-IronPort-AV: E=Sophos;i="5.87,226,1631606400"; d="scan'208";a="68204637" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 11 Nov 2021 06:56:24 -0800 IronPort-SDR: aEANqUc7ixxgDEwibj9BRl1RXhiVTtD82fh+pldb7Wq4E4WKnc6iqYSRdgKhgkKSX56PVyZpV/ paMBtkJfXdvJsSfY+0isfjTCB2bNxGWwKXID061N9ImhQJ1jDQAjQR8dsv7qCdJUYroOdER6E1 hw5ZEAyA74sxNP+yvuFKOvIH2OiM2SxQF0X/T/l9spPzxAlApwWv6ftNVScSmUUARkNpQ3piJ1 iAIi5sV6JnVWPK7Wi+5aJTHDgqZ2W6qvBccbtgJpjEjU8wAx4TK/Drod/QErSZ0ZW6tFOnhghU X6M= To: "gcc-patches@gcc.gnu.org" From: Sandra Loosemore Subject: [committed] Testsuite: Various fixes for nios2. Message-ID: Date: Thu, 11 Nov 2021 07:56:18 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 Content-Language: en-US X-ClientProxiedBy: SVR-ORW-MBX-09.mgc.mentorg.com (147.34.90.209) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" I've pushed the attached patch to clean up some test failures I've seen on nios2-elf. This target defaults to -fno-delete-null-pointer-checks so any optimization tests that depend on assumptions that valid pointers are non-zero have to be marked explicitly. The others ought to be obvious, except perhaps struct-by-value-1.c which was giving a link error about overflowing the small data region without -G0. My last set of test results were pretty messy but I think almost all of the problems are not nios2-specific (e.g., PR103166, PR103163). I think it is better to wait until we're into stage 3 and the churn settles down some before I make another pass to triage remaining nios2-specific problems, but I might as well check in what I have now instead of sitting on it. -Sandra commit eb43f1a95d1d7a0f88a8107d860e5343507554dd Author: Sandra Loosemore Date: Thu Nov 11 06:31:02 2021 -0800 Testsuite: Various fixes for nios2. 2021-11-11 Sandra Loosemore gcc/testsuite/ * g++.dg/warn/Wmismatched-new-delete-5.C: Add -fdelete-null-pointer-checks. * gcc.dg/attr-returns-nonnull.c: Likewise. * gcc.dg/debug/btf/btf-datasec-1.c: Add -G0 option for nios2. * gcc.dg/ifcvt-4.c: Skip on nios2. * gcc.dg/struct-by-value-1.c: Add -G0 option for nios2. diff --git a/gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-5.C b/gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-5.C index 92c75df..bac2b68 100644 --- a/gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-5.C +++ b/gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-5.C @@ -1,7 +1,7 @@ /* PR c++/100876 - -Wmismatched-new-delete should either look through or ignore placement new { dg-do compile } - { dg-options "-O2 -Wall" } */ + { dg-options "-O2 -Wall -fdelete-null-pointer-checks" } */ extern "C" { void* malloc (__SIZE_TYPE__); diff --git a/gcc/testsuite/gcc.dg/attr-returns-nonnull.c b/gcc/testsuite/gcc.dg/attr-returns-nonnull.c index 22ee30a..e4e20b8 100644 --- a/gcc/testsuite/gcc.dg/attr-returns-nonnull.c +++ b/gcc/testsuite/gcc.dg/attr-returns-nonnull.c @@ -1,7 +1,7 @@ /* Verify that attribute returns_nonnull on global and local function declarations is merged. { dg-do compile } - { dg-options "-Wall -fdump-tree-optimized" } */ + { dg-options "-Wall -fdump-tree-optimized -fdelete-null-pointer-checks" } */ void foo (void); diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c index f809d93..dbb236b 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c @@ -12,6 +12,7 @@ /* { dg-do compile ) */ /* { dg-options "-O0 -gbtf -dA" } */ /* { dg-options "-O0 -gbtf -dA -msdata=none" { target { { powerpc*-*-* } && ilp32 } } } */ +/* { dg-options "-O0 -gbtf -dA -G0" { target { nios2-*-* } } } */ /* Check for two DATASEC entries with vlen 3, and one with vlen 1. */ /* { dg-final { scan-assembler-times "0xf000003\[\t \]+\[^\n\]*btt_info" 2 } } */ diff --git a/gcc/testsuite/gcc.dg/ifcvt-4.c b/gcc/testsuite/gcc.dg/ifcvt-4.c index e74e449..0525102 100644 --- a/gcc/testsuite/gcc.dg/ifcvt-4.c +++ b/gcc/testsuite/gcc.dg/ifcvt-4.c @@ -2,7 +2,7 @@ /* { dg-additional-options "-misel" { target { powerpc*-*-* } } } */ /* { dg-additional-options "-march=z196" { target { s390x-*-* } } } */ /* { dg-additional-options "-mtune-ctrl=^one_if_conv_insn" { target { i?86-*-* x86_64-*-* } } } */ -/* { dg-skip-if "Multiple set if-conversion not guaranteed on all subtargets" { "arm*-*-* avr-*-* hppa*64*-*-* s390-*-* visium-*-*" riscv*-*-* msp430-*-* } } */ +/* { dg-skip-if "Multiple set if-conversion not guaranteed on all subtargets" { "arm*-*-* avr-*-* hppa*64*-*-* s390-*-* visium-*-*" riscv*-*-* msp430-*-* nios2-*-*} } */ /* { dg-skip-if "" { "s390x-*-*" } { "-m31" } } */ typedef int word __attribute__((mode(word))); diff --git a/gcc/testsuite/gcc.dg/struct-by-value-1.c b/gcc/testsuite/gcc.dg/struct-by-value-1.c index addf253..ae7adb5 100644 --- a/gcc/testsuite/gcc.dg/struct-by-value-1.c +++ b/gcc/testsuite/gcc.dg/struct-by-value-1.c @@ -1,6 +1,7 @@ /* Test structure passing by value. */ /* { dg-do run } */ /* { dg-options "-O2" } */ +/* { dg-options "-O2 -G0" { target { nios2-*-* } } } */ #define T(N) \ struct S##N { unsigned char i[N]; }; \