[flang] Fix dangling pointer in LabelEnforce
`DirectiveStructureChecker` was passing in a pointer to a temporary string for the `construct` argument to the constructor for `LabelEnforce`. The `LabelEnforce` object had a lifetime longer than the temporary, resulting in accessing a dangling pointer when emitting an error message for `omp-parallell01.f90`. The fix is to make the lifetime of the temporary as long as the lifetime of the `LabelEnforce` object. Differential Revision: https://reviews.llvm.org/D94618
Loading
Please sign in to comment