[Flang-dev] Should this code compile?

blubee blubeeme gurenchan at gmail.com
Tue Sep 18 09:56:41 EDT 2018


On Tue, Sep 18, 2018 at 12:57 AM blubee blubeeme <gurenchan at gmail.com>
wrote:

>         program main
> #ifndef __GNUC__
>         choke me
> #endif
>         end
>
> I am trying to compile this code with numerous extensions, F, f, f90, F90
>
> They all return error codes.
>
> I am using the -ffree-form flag with flang
> I either get these results:
>
> flang -ffree-form choke.F90
> F90-W-0915-Illegal macro name (choke.F90: -1)
> F90-W-0915-Illegal macro name (choke.F90: -1)
> F90-F-0952-Unexpected EOF following # directive (choke.F90: -1)
> F90/amd64-FreeBSD FreeBSD Flang - 1.5 2017-05-01: compilation aborted
>
>
> flang -ffree-form choke.F
> F90-W-0915-Illegal macro name (choke.F: -1)
> F90-W-0915-Illegal macro name (choke.F: -1)
> F90-F-0952-Unexpected EOF following # directive (choke.F: -1)
> F90/amd64-FreeBSD FreeBSD Flang - 1.5 2017-05-01: compilation aborted
>
>
> flang -ffree-form choke.f
> F90-S-0021-Label field of continuation line is not blank (choke.f: 2)
> F90-S-0021-Label field of continuation line is not blank (choke.f: 4)
>   0 inform,   0 warnings,   2 severes, 0 fatal for main
>
>
> flang -ffree-form choke.f90
> F90-S-0021-Label field of continuation line is not blank (choke.f90: 2)
> F90-S-0021-Label field of continuation line is not blank (choke.f90: 4)
>   0 inform,   0 warnings,   2 severes, 0 fatal for main
>
>
> Is it possible to compile this code? If not are there any edits that I can
> make to allow it to successfully compile?
>
> Best,
> Owen
>
Can I bump this issue?

I've tried changing the file extension from f, F, f90, F90 and I've tried
with -cpp, -c, -Mpreprocess and a few others.

The program just fails to compile.

Am I missing some compiler flags or is this just a bug in Flang?

Best,
Owen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.flang-compiler.org/pipermail/flang-dev_lists.flang-compiler.org/attachments/20180918/f10120d9/attachment.html>


More information about the flang-dev mailing list