[PATCH] D100648: [flang][f18] Add an additional check for semantic errors
Andrzej Warzynski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 19 02:25:39 PDT 2021
awarzynski added a comment.
In D100648#2695283 <https://reviews.llvm.org/D100648#2695283>, @klausler wrote:
> So AnyFatalError() is true after the derived type tables are built for the runtime? Were there additional Messages?
Yes. You can reproduce it with this file (extracted from offset01.f90):
subroutine s5(n)
integer :: n
type :: t1(l)
integer, len :: l
real :: a(l)
end type
type :: t2(l1, l2)
integer, len :: l1
integer, len :: l2
real :: b(l1, l2)
end type
type(t1(n)) :: x1 !CHECK: x1 size=48 offset=
type(t2(n,n)) :: x2 !CHECK: x2 size=56 offset=
end
And here are the errors:
$ f18 -fdebug-dump-symbols offsets01.f90 > dump.txt
f18: Semantic errors in offsets01.f90
offsets01.f90:5:13: error: Specification expression 'int(int(int(n,kind=8),kind=4),kind=8)' is neither constant nor a length type parameter
real :: a(l)
^
offsets01.f90:10:13: error: Specification expression 'int(int(int(n,kind=8),kind=4),kind=8)' is neither constant nor a length type parameter
real :: b(l1, l2)
^
offsets01.f90:10:13: error: Specification expression 'int(int(int(n,kind=8),kind=4),kind=8)' is neither constant nor a length type parameter
real :: b(l1, l2)
^
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100648/new/
https://reviews.llvm.org/D100648
More information about the llvm-commits
mailing list