[flang] Fix bug with intrinsic in type declaration stmt
authorTim Keith <tkeith@nvidia.com>
Wed, 29 Jul 2020 14:23:28 +0000 (07:23 -0700)
committerTim Keith <tkeith@nvidia.com>
Wed, 29 Jul 2020 14:23:31 +0000 (07:23 -0700)
commit2c662f3d3d957365ad86f35eee0bea05e4cf0188
treea320dd618d97dac474f981433bb7d3395a4a5c81
parent672df0fc670e79ce7ac710ce4b5f47804f54a18a
[flang] Fix bug with intrinsic in type declaration stmt

When an instrinsic function is declared in a type declaration statement
we need to set the INTRINSIC attribute and (per 8.2(3)) ignore the
specified type.

To simplify the check, add IsIntrinsic utility to BaseVisitor.

Also, intrinsics and external procedures were getting assigned a size
and offset and they shouldn't be.

Differential Revision: https://reviews.llvm.org/D84702
flang/include/flang/Semantics/symbol.h
flang/lib/Semantics/compute-offsets.cpp
flang/lib/Semantics/resolve-names.cpp
flang/test/Semantics/symbol18.f90 [new file with mode: 0644]