[all-commits] [llvm/llvm-project] c75741: [flang] Failed call to CHECK() for call to ASSOCIA...
Pete Steinfeld via All-commits
all-commits at lists.llvm.org
Fri Oct 16 07:17:44 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: c757418869c01f5ee08f05661debabbba92edcf9
https://github.com/llvm/llvm-project/commit/c757418869c01f5ee08f05661debabbba92edcf9
Author: Peter Steinfeld <psteinfeld at nvidia.com>
Date: 2020-10-16 (Fri, 16 Oct 2020)
Changed paths:
M flang/include/flang/Evaluate/characteristics.h
M flang/include/flang/Evaluate/tools.h
M flang/include/flang/Evaluate/type.h
M flang/lib/Evaluate/characteristics.cpp
M flang/lib/Evaluate/fold-logical.cpp
M flang/lib/Evaluate/intrinsics.cpp
M flang/lib/Evaluate/tools.cpp
M flang/lib/Semantics/check-call.cpp
M flang/lib/Semantics/expression.cpp
M flang/lib/Semantics/pointer-assignment.cpp
M flang/test/Evaluate/folding06.f90
A flang/test/Semantics/associated.f90
M flang/test/Semantics/call02.f90
M flang/test/Semantics/call09.f90
M flang/test/Semantics/resolve63.f90
Log Message:
-----------
[flang] Failed call to CHECK() for call to ASSOCIATED(NULL())
Calling "ASSOCATED(NULL()) was causing an internal check of the compiler to
fail.
I fixed this by changing the entry for "ASSOCIATED" in the intrinsics table to
accept "AnyPointer" which contains a new "KindCode" of "pointerType". I also
changed the function "FromActual()" to return a typeless intrinsic when called
on a pointer, which duplicates its behavior for BOZ literals. This required
changing the analysis of procedure arguments. While testing processing for
procedure arguments, I found another bad call to `CHECK()` which I fixed.
I made several other changes:
-- I implemented constant folding for ASSOCIATED().
-- I fixed handling of NULL() in relational operations.
-- I implemented semantic analysis for ASSOCIATED().
-- I noticed that the semantics for ASSOCIATED() are similar to those for
pointer assignment. So I extracted the code that pointer assignment uses
for procedure pointer compatibility to a place where it could be used by
the semantic analysis for ASSOCIATED().
-- I couldn't figure out how to make the general semantic analysis for
procedure arguments work with ASSOCIATED()'s second argument, which can
be either a pointer or a target. So I stopped using normal semantic
analysis for arguments for ASSOCIATED().
-- I added tests for all of this.
Differential Revision: https://reviews.llvm.org/D88313
More information about the All-commits
mailing list