Hi Tobias, > In other cases, it requires some careful weighting whether error should > have the error location "use m" or where the symbol is used. (Here, it > cannot occur as the module won't get generated and an error is already > printed at the proper location.)
I had though about this but couldn't come up with a way to create a module file from an invalid type definition. The closest is sth. which imports it, such as in program p type t integer :: a([2]) ! { dg-error "must be scalar" } end type type(t) :: x = t([3, 4]) ! { dg-error "Bad array spec of component" } interface subroutine foo (x) import t type(t) :: x type(t), parameter :: y = t([5, 6]) ! { dg-error "Bad array spec of component" } end subroutine foo end interface end However (= fortunately) this works just fine. > > Regtested on x86_64-pc-linux-gnu. OK? > > OK. Will commit tonight. Thanks for the review! Harald > Tobias > > ----------------- > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 > München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas > Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht > München, HRB 106955 >