------- Comment #16 from dominiq at lps dot ens dot fr 2008-03-20 09:54 ------- gfortran.dg/internal_pack_3.f90 looks invalid and fails:
FAIL: gfortran.dg/internal_pack_3.f90 -O0 (test for excess errors) WARNING: gfortran.dg/internal_pack_3.f90 -O0 compilation failed to produce executable FAIL: gfortran.dg/internal_pack_3.f90 -O1 (test for excess errors) WARNING: gfortran.dg/internal_pack_3.f90 -O1 compilation failed to produce executable FAIL: gfortran.dg/internal_pack_3.f90 -O2 (test for excess errors) WARNING: gfortran.dg/internal_pack_3.f90 -O2 compilation failed to produce executable FAIL: gfortran.dg/internal_pack_3.f90 -O3 -fomit-frame-pointer (test for excess errors) WARNING: gfortran.dg/internal_pack_3.f90 -O3 -fomit-frame-pointer compilation failed to produce executable FAIL: gfortran.dg/internal_pack_3.f90 -O3 -fomit-frame-pointer -funroll-loops (test for excess errors) WARNING: gfortran.dg/internal_pack_3.f90 -O3 -fomit-frame-pointer -funroll-loops compilation failed to produce executable FAIL: gfortran.dg/internal_pack_3.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions (test for excess errors) WARNING: gfortran.dg/internal_pack_3.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions compilation failed to produce executable FAIL: gfortran.dg/internal_pack_3.f90 -O3 -g (test for excess errors) WARNING: gfortran.dg/internal_pack_3.f90 -O3 -g compilation failed to produce executable FAIL: gfortran.dg/internal_pack_3.f90 -Os (test for excess errors) WARNING: gfortran.dg/internal_pack_3.f90 -Os compilation failed to produce executable The following changes seem to work: --- /opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/internal_pack_3.f90 2008-03-19 16:56:40.000000000 +0100 +++ internal_pack_3_db.f90 2008-03-20 10:46:16.000000000 +0100 @@ -13,6 +13,7 @@ end program main subroutine sub_ik(i) + integer,parameter :: k = selected_int_kind (range (0_8) + 1) integer(kind=k), dimension(2) :: i if (i(1) /= -1) call abort if (i(2) /= -3) call abort or --- /opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/internal_pack_3.f90 2008-03-19 16:56:40.000000000 +0100 +++ internal_pack_3_db_1.f90 2008-03-20 10:48:28.000000000 +0100 @@ -10,12 +10,15 @@ ik = (/ -1, 1, -3 /) call sub_ik(ik(1:3:2)) if (any(ik /= (/ 3, 1, 2 /))) call abort -end program main -subroutine sub_ik(i) - integer(kind=k), dimension(2) :: i - if (i(1) /= -1) call abort - if (i(2) /= -3) call abort - i(1) = 3 - i(2) = 2 -end subroutine sub_ik +contains + + subroutine sub_ik(i) + integer(kind=k), dimension(2) :: i + if (i(1) /= -1) call abort + if (i(2) /= -3) call abort + i(1) = 3 + i(2) = 2 + end subroutine sub_ik + +end program main -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32972