[llvm-bugs] [Bug 51219] New: Flang not failing for invalid fixed-form files
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jul 26 08:02:49 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51219
Bug ID: 51219
Summary: Flang not failing for invalid fixed-form files
Product: flang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedbugs at nondot.org
Reporter: andrzej.warzynski at gmail.com
CC: David.Truby at arm.com, jperier at nvidia.com,
kirankumartp at gmail.com, llvm-bugs at lists.llvm.org,
sscalpone at nvidia.com
Hi,
The following input file is a valid _free-form_, but incorrectly formatted
_fixed-form_ file:
```input.f90
PROGRAM HELLO
write(*, *), "hello, world!"
END PROGRAM
```
Flang issues the following diagnostics when trying to parse this file as
fixed-form:
```
f18 -fsyntax-only -ffixed-form input.f90
./parse-preprocessed.F:1:1: Character in fixed-form label field must be a digit
PROGRAM HELLO
^
./parse-preprocessed.F:2:3: Character in fixed-form label field must be a digit
write(*, *), "hello, world!"
^
./parse-preprocessed.F:3:1: Character in fixed-form label field must be a digit
END PROGRAM
^
```
However, it does not fail (i.e. `$?` is O). `gfortran` does return an error in
this situation. I believe that so should Flang. Or am I missing something here?
Tested with trunk: 81600160b3f9
Thanks,
Andrzej
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210726/c5a5b6db/attachment.html>
More information about the llvm-bugs
mailing list