diff --git a/flang/test/Parser/OpenMP/threadprivate-blank-common-block.f90 b/flang/test/Parser/OpenMP/threadprivate-blank-common-block.f90 new file mode 100644 index 0000000000000..6317258e6ec8d --- /dev/null +++ b/flang/test/Parser/OpenMP/threadprivate-blank-common-block.f90 @@ -0,0 +1,9 @@ +! RUN: not %flang_fc1 -fsyntax-only %s -fopenmp 2>&1 | FileCheck %s +! From Standard: A blank common block cannot appear in a threadprivate directive. + +program main + integer :: a + common//a + !CHECK: error: expected one of '$@ABCDEFGHIJKLMNOPQRSTUVWXYZ_' + !$omp threadprivate(//) + end