Debian Codegraph @

gcc/testsuite/gfortran.dg/linefile.f90

raw
1 ! { dg-do compile }
2 ! { dg-options "-Wall" }
3
4 ! This will verify that the # <line> <file> directive later does not
5 ! mess up the diagnostic on this line
6 SUBROUTINE s(dummy) ! { dg-warning "Unused" }
7 INTEGER, INTENT(in) :: dummy
8 END SUBROUTINE
9
10 # 12345 "foo-f"
11 SUBROUTINE s2(dummy)
12 INTEGER, INTENT(in) :: dummy
13 END SUBROUTINE
14 ! We want to check that the # directive changes the filename in the
15 ! diagnostic. Nothing else really matters here. dg-regexp allows us
16 ! to see the entire diagnostic. We just have to make sure to consume
17 ! the entire message.
18 ! { dg-regexp "foo-f\[^\n]*" }