aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorPeter Steinfeld <psteinfeld@nvidia.com>2021-03-10 08:09:57 -0800
committerPeter Steinfeld <psteinfeld@nvidia.com>2021-03-10 09:38:29 -0800
commit40e261803bd40099ee2f322670157b0b57d7bf3e (patch)
treef94877005053a018035a7b302d198528b01794fb /llvm/lib/Transforms/Utils/Local.cpp
parentf47a84bc335775273688b76df8ddc7daae7f132e (diff)
downloadllvm-40e261803bd40099ee2f322670157b0b57d7bf3e.zip
llvm-40e261803bd40099ee2f322670157b0b57d7bf3e.tar.gz
llvm-40e261803bd40099ee2f322670157b0b57d7bf3e.tar.bz2
[flang] Fix call to CHECK() on overriding an erroneous type-bound procedure
You can define a base type with a type-bound procedure which is erroneously missing a NOPASS attribute and then define another type that extends the base type and overrides the erroneous procedure. In this case, when we perform semantic checking on the overriding procedure, we verify the "pass index" of the overriding procedure. The attempt to get the procedure's pass index fails a call to CHECK(). I fixed this by calling SetError() on the symbol of the overridden procedure in the base type. Then, I check HasError() before executing the code that invokes the failing call to CHECK(). I also added a test that will cause the compiler to fail the call to CHECK() without this change. Differential Revision: https://reviews.llvm.org/D98355
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
0 files changed, 0 insertions, 0 deletions