From ad2e830fe2f791ef37faa2238caed0a73e0cc51d Mon Sep 17 00:00:00 2001 From: Andrzej Warzynski Date: Mon, 2 Aug 2021 10:22:08 +0000 Subject: [PATCH] [flang][nfc] Add a regression test for #50993 https://bugs.llvm.org/show_bug.cgi?id=50993 was effectively fixed in https://reviews.llvm.org/D106727. This patch adds a regression test specifically for the use case reported in 50993. Differential Revision: https://reviews.llvm.org/D107260 --- flang/test/Preprocessing/parse-preprocessed.F | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 flang/test/Preprocessing/parse-preprocessed.F diff --git a/flang/test/Preprocessing/parse-preprocessed.F b/flang/test/Preprocessing/parse-preprocessed.F new file mode 100644 index 000000000000..c60be7665618 --- /dev/null +++ b/flang/test/Preprocessing/parse-preprocessed.F @@ -0,0 +1,15 @@ +! Verify that the output from `-E` is valid fixed-form source. See +! https://bugs.llvm.org/show_bug.cgi?id=50993. + +! RUN: %flang_fc1 -E %s 2>&1 | %flang_fc1 -fsyntax-only -ffixed-form 2>&1 | FileCheck %s --allow-empty + +! CHECK-NOT: error +! CHECK-NOT: warning + +! https://bugs.llvm.org/show_bug.cgi?id=51219 +! CHECK-NOT: Character in fixed-form label field must be a digit + + PROGRAM HELLO + write(*, *), "hello, world!" +c Some irrelevant comment that's only valid in fixed-form + END PROGRAM