1! { dg-do compile } 2! { dg-options "-O2" } 3! 4! Tests the fix for PR80965 in which the use of the name 'loc' 5! for the dummy argument of 'xyz' caused an ICE. If the module 6! was used, the error "DUMMY attribute conflicts with INTRINSIC 7! attribute in ‘loc’ at (1)" was emitted. Note that although 'loc' 8! is a GNU extension and so can be over-ridden, this is not very 9! good practice. 10! 11! Contributed by David Sagan <david.sagan@gmail.com> 12! 13module mode3_mod 14contains 15 subroutine xyz (loc) 16 implicit none 17 class(*) :: loc 18 real x(6) 19 integer ix_use 20 select type (loc) 21 type is (integer) 22 x = 0 23 print *, "integer" 24 type is (real) 25 ix_use = 0 26 print *, "real" 27 end select 28 end subroutine xyz 29end module mode3_mod 30 31