This patch fixes #72748 by modifying the processing of program units to search for a symbol to which OpenMP REQUIRES clauses can bind to. Rather than picking up the first PFT node with a source reference and getting its associated scope, it picks up the last one. This avoids using the source from the first specification construct of a nameless program, which can sometimes not be associated to any scope, causing an ICE due to an invalid source location.
155 B
155 B