[flang] Nonconformant assigned gotos
authorV Donaldson <vdonaldson@nvidia.com>
Wed, 5 Apr 2023 18:13:36 +0000 (11:13 -0700)
committerV Donaldson <vdonaldson@nvidia.com>
Wed, 5 Apr 2023 21:53:23 +0000 (14:53 -0700)
commitfd922e6ab0b5324cdf36e2646132d802d3a04ce0
tree4f6be0d688e9f33a3dbfc8a0a53e1d12b995bdab
parent5c614bd88f1252927ca1f9d9f8e802ef5e1eebe2
[flang] Nonconformant assigned gotos

Modify code generation for assigned gotos to generate a runtime error
for most cases that violate F90 Clause 8.2.4, rather than treating a
nonconformant GOTO as a nop. For example, generate a runtime error for
a GOTO that attempts to branch to a label for a FORMAT statement.
Relax the requirement that an assigned GOTO with a label list must
branch to a label in the list, and instead allow a branch to any valid
assigned GOTO target in scope.
flang/lib/Lower/Bridge.cpp
flang/test/Lower/assigned-goto.f90