Debian Codegraph @

gcc/testsuite/gfortran.dg/external_implicit_none_3.f08

raw
1 ! { dg-do compile }
2 ! { dg-options "-std=f2018" }
3 ! Tests fix for PR100972 - Fails to warn about missing EXTERNAL attribute
4 ! Contributed by Gerhard Steinmetz
5
6 program p
7 implicit none (external)
8 real, external :: f
9 real :: a
10 real :: b
11 integer :: i
12 character :: c
13 a = f() ! OK
14 b = g() ! { dg-error "Missing explicit declaration with EXTERNAL attribute" }
15 i = h() ! { dg-error "Missing explicit declaration with EXTERNAL attribute" }
16 c = j() ! { dg-error "Missing explicit declaration with EXTERNAL attribute" }
17 end