ambiguous_reference_1.f90

来自「用于进行gcc测试」· F90 代码 · 共 51 行

F90
51
字号
! { dg-do compile }! Tests the fix for PR33550, in which an ICE would occur, instead of! the abiguous reference error.!! Found at! http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/1abc1549a6a164f1/! by James Van Buskirk:!module M1   real xend module M1module M2   contains      subroutine y      end subroutine yend module M2module M3   use M2, x => yend module M3module M4   use M1   use M3end module M4module M5   use M4             ! 'x' is ambiguous here but is not referred toend module M5module M6   use M5             ! dittoend module M6program test   use M1   use M3   interface      function x(z)   ! { dg-error "ambiguous reference" }      end function x  ! { dg-error "Expecting END INTERFACE" }   end interface   write(*,*) 'Hello, world!'end program testfunction x(z)   x = zend function x! { dg-final { cleanup-modules "m1 m2 m3 m4 m5 m6" } }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?