[gcc r15-11400] testsuite: cast argument to char* in can_deref_null [PR126261]

Torbjorn Svensson via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:223e11e08039a864ffc7fa4ae6d03de8c3e5f69e

commit r15-11400-g223e11e08039a864ffc7fa4ae6d03de8c3e5f69e
Author: Torbjörn SVENSSON <[email protected]>
Date:   Mon Jul 20 17:07:07 2026 +0200

    testsuite: cast argument to char* in can_deref_null [PR126261]
    
    gcc/testsuite/ChangeLog:
    
            PR testsuite/126261
            * lib/target-supports.exp (check_effective_target_can_deref_null):
            Cast argument to char*.
    
    Signed-off-by: Torbjörn SVENSSON <[email protected]>
    (cherry picked from commit d97947a3067c13dcd33eb1ef7aef14ca279316cf)

Diff:
---
 gcc/testsuite/lib/target-supports.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index d91c8378d01e..bbc56f8d529c 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -14562,7 +14562,7 @@ proc check_effective_target_can_deref_null { } {
 	int
 	main ()
 	{
-	  read_mem (0);
+	  read_mem ((char *)0);
 	  return 0;
 	}
       } "-O0 -fno-delete-null-pointer-checks -Wno-null-dereference"]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.