I've had the attached patch sitting around for a few weeks and thought I'd better get it in before GCC 11 is released, even if I don't have time to make progress on the other nios2 test failures. (There's still one group that fails on both nios2-elf and nios2-linux-gnu due to placement of read-only symbols in .sdata instead of .srodata, some that are likely general cross-compiler environment issues not specific to nios2, and a few optimization failures which I haven't attempted to analyze.)

-Sandra
commit 3cb9e3aee98a206b786d7414ad28e67fbcceba5c
Author: Sandra Loosemore <san...@codesourcery.com>
Date:   Sun Apr 4 17:55:46 2021 -0700

    Trivial testsuite fixes for nios2-elf.
    
    nios2-elf defaults to -fno-delete-null-pointer-checks, which causes
    failures in tests that assume the option is enabled.  Make the
    dependence explicit.
    
    2021-04-04  Sandra Loosemore  <san...@codesourcery.com>
    
    	gcc/testsuite/
    
    	* gcc.dg/ipa/propmalloc-4.c: Add -fdelete-null-pointer-checks.
    	* gcc.dg/tree-ssa/evrp11.c: Likewise.

diff --git a/gcc/testsuite/gcc.dg/ipa/propmalloc-4.c b/gcc/testsuite/gcc.dg/ipa/propmalloc-4.c
index 4c40d63..9552b73 100644
--- a/gcc/testsuite/gcc.dg/ipa/propmalloc-4.c
+++ b/gcc/testsuite/gcc.dg/ipa/propmalloc-4.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-local-pure-const-details" } */
+/* { dg-options "-O2 -fdump-tree-local-pure-const-details -fdelete-null-pointer-checks" } */
 
 void *foo(int cond1, int cond2, int cond3)
 {
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/evrp11.c b/gcc/testsuite/gcc.dg/tree-ssa/evrp11.c
index f1373bd..d791305 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/evrp11.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/evrp11.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-evrp" } */
+/* { dg-options "-O2 -fdump-tree-evrp -fdelete-null-pointer-checks" } */
 
 extern void link_error ();
 

Reply via email to