aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
diff options
context:
space:
mode:
authorPeter Klausler <pklausler@nvidia.com>2023-08-18 11:57:43 -0700
committerPeter Klausler <pklausler@nvidia.com>2023-08-29 10:14:41 -0700
commit48a8262cb8dce16b0e64cb1aec1d74dc96e5d551 (patch)
treefa234834031d5c9c1eac3003ffeb59a8414f4bfe /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
parent3c28ce6bec7699670a483b8cb254fe620e533eeb (diff)
downloadllvm-48a8262cb8dce16b0e64cb1aec1d74dc96e5d551.zip
llvm-48a8262cb8dce16b0e64cb1aec1d74dc96e5d551.tar.gz
llvm-48a8262cb8dce16b0e64cb1aec1d74dc96e5d551.tar.bz2
[flang] Allow GOTO to containing END IF after ELSE
Label resolution gets into an infinite loop trying to emit an inappropriate error or warning for a GOTO whose target is on an enclosing END IF statement with an intervening ELSE or ELSE IF. The scope tracking mechanism viewed the END IF as being part of the ELSE block's scope. Fix with the same means that was used to fix a similar bogus error on GOTOs to END SELECT in SELECT CASE blocks: nest the THEN/ELSE IF/ELSE blocks one level deeper than before, so that the END IF is in the IF block but not in any of its parts. Fixes https://github.com/llvm/llvm-project/issues/64654 for llvm-test-suite/Fortran/gfortran/regression/goto_5.f90. Differential Revision: https://reviews.llvm.org/D159040
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions