This test fails on 32-bit targets:
  ..../gcc/gcc/testsuite/g++.dg/analyzer/ice-pr116228.C:3:7: error: 'operator 
new' takes type 'size_t' ('unsigned int') as first parameter [-fpermissive]

Fix by using proper __SIZE_TYPE__ type.

Ensured that the test still passes with this patch.  Also, reverted the
fix for r16-7383-gf3f7e7514a794f, and ensured that the test still can
expose the ICE on x86_64-pc-linux-gnu:

  $ make check-gcc-c++ RUNTESTFLAGS="--target_board=unix/ 
analyzer.exp=ice-pr116228.C"
  FAIL: g++.dg/analyzer/ice-pr116228.C  -std=c++20 (internal compiler error: in 
get_or_create_null_ptr, at analyzer/region-model-manager.cc:257)
  # of unexpected failures        6

  $ make check-gcc-c++ RUNTESTFLAGS="--target_board=unix/-m32 
analyzer.exp=ice-pr116228.C"
  FAIL: g++.dg/analyzer/ice-pr116228.C  -std=c++20 (internal compiler error: in 
get_or_create_null_ptr, at analyzer/region-model-manager.cc:257)
  # of unexpected failures        6

Pushed to trunk as obvious.

gcc/testsuite/ChangeLog:

        * g++.dg/analyzer/ice-pr116228.C: Use __SIZE_TYPE__ for "new"
        operator declaration.

Cc: David Malcolm <[email protected]>
Signed-off-by: Dimitar Dimitrov <[email protected]>
---
 gcc/testsuite/g++.dg/analyzer/ice-pr116228.C | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/analyzer/ice-pr116228.C 
b/gcc/testsuite/g++.dg/analyzer/ice-pr116228.C
index df6d2aabbda..837419da979 100644
--- a/gcc/testsuite/g++.dg/analyzer/ice-pr116228.C
+++ b/gcc/testsuite/g++.dg/analyzer/ice-pr116228.C
@@ -1,6 +1,6 @@
 // { dg-additional-options "-O3" }
 
-void *operator new(unsigned long, void *);
+void *operator new(__SIZE_TYPE__, void *);
 int to_constant();
 int vec_copy_construct_n, vec_stmts_size, vectorizable_load_vec_stmt,
     vectorizable_load_offvar;
-- 
2.52.0

Reply via email to