Issue 239623
Summary [flang][OpenMP] DO variable that names the enclosing subroutine: `OmpStructureChecker::CheckIterationVariables` calls `IsNumeric` on a null `DeclTypeSpec`
Labels crash, flang, generated by fuzzer
Assignees
Reporter YuanchengJiang
    The following code:
```fortran
subroutine foo
!$omp parallel do
do foo = 1, 10
end do
end
```

Resulted in this output:
```
Program terminated with signal SIGSEGV (11)
Stack dump:
 #3 Fortran::semantics::DeclTypeSpec::IsNumeric
 #4 Fortran::semantics::OmpStructureChecker::CheckIterationVariables
 #5 Fortran::semantics::OmpStructureChecker::Enter
 #6 void Fortran::common::log2visit::Log2VisitHelper
 #7 std::enable_if::type Fortran::parser::detail::ParseTreeVisitorLookupScope::Walk
 #8 void Fortran::parser::detail::ParseTreeVisitorLookupScope::Walk
 #9 void Fortran::parser::detail::ParseTreeVisitorLookupScope::Walk
#10 Fortran::semantics::SemanticsVisitor::Walk
```

Trunk reproducer (`-fsyntax-only -fopenmp`): https://godbolt.org/z/zEq9e67Ko
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to