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

Dominik Vogt <vogt at linux dot vnet.ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vogt at linux dot vnet.ibm.com

--- Comment #1 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
I get (pprobably) the same ICE on s390x with today's devel branch in
pr68279.f90.  Reduced test case (which intentionally has some out of bound
array accesses):

MODULE foo 
  CONTAINS 
  SUBROUTINE bar(o) 
    INTEGER, DIMENSION(2, 1) :: a 
    INTEGER, DIMENSION(1) :: b 
    INTEGER, DIMENSION(1, 1) :: o 
    INTEGER :: d 
     DO i=1,2 
        b(1:2) = b(1:2) 
        o(1:1, 1:d) = a(1:1, 1:d) 
        a(1:2, 2) = b(1:2) 
        d = d + 1 
     END DO 
  END SUBROUTINE bar 
END MODULE 

==>

.../gcc/testsuite/gfortran2/../../gfortran -B.../gcc/testsuite/gfortran2/../../
-B.../s390x-ibm-linux-gnu/32/libgfortran/ x.f90 -floop-nest-optimize -O1 -S
-m64
x.f90:9:10:

         b(1:2) = b(1:2)
          1
Warning: Upper array reference at (1) is out of bounds (2 > 1) in dimension 1
x.f90:9:19:

         b(1:2) = b(1:2)
                   1
Warning: Upper array reference at (1) is out of bounds (2 > 1) in dimension 1
x.f90:11:15:

         a(1:2, 2) = b(1:2)
               1
Warning: Array reference at (1) is out of bounds (2 > 1) in dimension 2
x.f90:11:22:

         a(1:2, 2) = b(1:2)
                      1
Warning: Upper array reference at (1) is out of bounds (2 > 1) in dimension 1
isl_aff.c:944: position out of bounds
x.f90:3:0:

   SUBROUTINE bar(o)

internal compiler error: Aborted
0x806bd397 crash_signal
        /home/vogt/src/t/gcc/toplev.c:335
0x80b3b683 extract_affine_chrec
        /home/vogt/src/t/gcc/graphite-sese-to-poly.c:239
0x80b3b683 extract_affine
        /home/vogt/src/t/gcc/graphite-sese-to-poly.c:381
0x80b3b8b7 extract_affine
        /home/vogt/src/t/gcc/graphite-sese-to-poly.c:421
0x80b3c52d add_condition_to_pbb
        /home/vogt/src/t/gcc/graphite-sese-to-poly.c:458
0x80b3c52d add_conditions_to_domain
        /home/vogt/src/t/gcc/graphite-sese-to-poly.c:525
0x80b3c52d build_iteration_domains
        /home/vogt/src/t/gcc/graphite-sese-to-poly.c:1017
0x80b3c2dd build_iteration_domains
        /home/vogt/src/t/gcc/graphite-sese-to-poly.c:1040
0x80b3c95f build_poly_scop(scop*)
        /home/vogt/src/t/gcc/graphite-sese-to-poly.c:1364
0x80b296c9 graphite_transform_loops()
        /home/vogt/src/t/gcc/graphite.c:319
0x80b29c4f graphite_transforms
        /home/vogt/src/t/gcc/graphite.c:356
0x80b29c4f execute
        /home/vogt/src/t/gcc/graphite.c:433

Reply via email to