https://gcc.gnu.org/g:8b51fe961e52d42da18b93b20149e1993741cbf9

commit 8b51fe961e52d42da18b93b20149e1993741cbf9
Author: Mikael Morin <[email protected]>
Date:   Fri Oct 10 22:06:52 2025 +0200

    Correction partielle class_dummy_7.f90

Diff:
---
 gcc/gimple-simulate.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/gimple-simulate.cc b/gcc/gimple-simulate.cc
index 055fc756b7db..a0212c2d83c1 100644
--- a/gcc/gimple-simulate.cc
+++ b/gcc/gimple-simulate.cc
@@ -949,10 +949,11 @@ find_mem_ref_replacement (tree * repl, unsigned * offset, 
simul_scope & context,
   tree var_ref = ptr_target.get_variable ();
   tree var_type = TREE_TYPE (var_ref);
 
-  if (var_type == access_type)
+  if (var_type == access_type
+      && *offset == 0
+      && ptr_address->offset == 0)
     {
       *repl = var_ref;
-      gcc_assert (*offset == 0 && ptr_address->offset == 0);
       return true;
     }
   else

Reply via email to