re PR fortran/78741 (ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1534)
[official-gcc.git] / gcc / testsuite / gfortran.dg / internal_pack_11.f90
bloba1d357cee735af576a0a46f9a0ed9b6a376ca945
1 ! { dg-do compile }
2 ! { dg-options "-fdump-tree-original" }
4 ! Test the fix for PR43173, where unnecessary calls to internal_pack/unpack
5 ! were being produced below. These references are contiguous and so do not
6 ! need a temporary.
8 ! Contributed Tobias Burnus <burnus@gcc.gnu.org>
10 REAL, allocatable :: ot(:)
11 integer :: time_steps
13 call foo (ot) ! OK, no temporary
14 call foo (ot(0:5:1)) ! Was an unnecessary temporary
15 call foo (ot(0:time_steps)) ! Was an unnecessary temporary
16 end
17 ! { dg-final { scan-tree-dump-times "unpack" 0 "original" } }