https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118164

--- Comment #4 from Nicolas Boulenguez <nicolas at debian dot org> ---
Hello.
The symptom is similar, but I have no way to tell if it this the same bug. Seen
with 14.2.0.


cat > main.adb <<EOF                                                            
procedure Main is                                                               
   function F return Positive is (21);                                          
   border_size : constant Positive := F;                                        
   subtype Module_Range is Integer range 0 .. border_size - 1;                  
   a, b : array (Module_Range, Module_Range) of Boolean;                        
   procedure Proc1 (x, y : Module_Range; bool : Boolean) is                     
   begin                                                                        
      a (y, x) := bool;                                                         
      b (y, x) := True;                                                         
   end Proc1;                                                                   
   procedure Proc2 is                                                           
   begin                                                                        
      for i in 0 .. 5 loop                                                      
         Proc1 (8, i, True);                                                    
      end loop;                                                                 
      Proc1 (8, 7, False);                                                      
      Proc1 (8, 8, False);                                                      
      for i in 9 .. 14 loop                                                     
        Proc1 (14 - i, 8, True);                                                
      end loop;                                                                 
      for i in 0 .. 7 loop                                                      
        Proc1 (border_size - 1 - i, 8, False);                                  
      end loop;                                                                 
      for i in 8 .. 14 loop                                                     
        Proc1 (8, 6 + i, False);                                                
      end loop;                                                                 
   end Proc2;                                                                   
begin                                                                           
   Proc2;                                                                       
   Proc2;                                                                       
end Main;                                                                       
EOF                                                                             
gnatmake main.adb -O2 -fstack-check                                            
./main  # Raises Storage_Error on arm-linux-gnueabihf.

Reply via email to