* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
[official-gcc.git] / gcc / testsuite / gfortran.dg / aliasing_dummy_2.f90
blob3a3856f68d742fefc9a59b1f2de45b0dacbbaf89
1 ! { dg-do compile }
2 ! This tests the fix for PR28885, in which multiple calls to a procedure
3 ! with different components of an array of derived types for an INTENT(OUT)
4 ! argument caused an ICE internal compiler error. This came about because
5 ! the compiler would lose the temporary declaration with each subsequent
6 ! call of the procedure.
8 ! Reduced from the contribution by Drew McCormack <drewmccormack@mac.com>
10 program test
11 type t
12 integer :: i
13 integer :: j
14 end type
15 type (t) :: a(5)
16 call sub('one',a%j)
17 call sub('two',a%i)
18 contains
19 subroutine sub(key,a)
20 integer, intent(out) :: a(:)
21 character(*),intent(in) :: key
22 a = 1
23 end subroutine
24 end program