Issue 89560
Summary [Flang][OpenMP] Compilation error of Fixed Source Form Conditional Compilation Sentinels
Labels openmp, flang
Assignees
Reporter ohno-fj
    ```
Version of flang-new : 19.0.0(4f19f15a601a5761b12c9c66d99d97dbc89ef90d)/AArch64
```

The third line of the following program does not meet the criteria of the following standard,
so this line should remain unchanged and be considered a comment line.
- OpenMP 5.2 / 3.3.1 Fixed Source Form Conditional Compilation Sentinels

However, this line results in a compilation error.


The following are the test program, Flang-new, Gfortran and ifort compilation/execution result.

sngg075g_2.f:
```fortran
 program main
      k01=-1
c$ x
      print *,'pass'
 end

```

```
$ flang-new -fopenmp sngg075g_2.f
error: Could not parse sngg075g_2.f
./sngg075g_2.f:4:1: warning: Character in fixed-form label field must be a digit
        print *,'pass'
 ^
./sngg075g_2.f:3:5: error: expected '=>'
  c$ x
 ^
./sngg075g_2.f:3:4: in the context: pointer assignment statement
  c$ x
     ^
./sngg075g_2.f:3:3: in the context: execution part construct
  c$ x
    ^
./sngg075g_2.f:2:7: in the context: execution part
        k01=-1
        ^
./sngg075g_2.f:1:7: in the context: main program
        program main
        ^
./sngg075g_2.f:3:5: error: expected '('
  c$ x
      ^
./sngg075g_2.f:3:4: in the context: pointer assignment statement
  c$ x
 ^
./sngg075g_2.f:3:3: in the context: execution part construct
  c$ x
    ^
./sngg075g_2.f:2:7: in the context: execution part
 k01=-1
        ^
./sngg075g_2.f:1:7: in the context: main program
 program main
        ^
./sngg075g_2.f:3:5: error: expected '='
 c$ x
      ^
./sngg075g_2.f:3:4: in the context: assignment statement
  c$ x
     ^
./sngg075g_2.f:3:3: in the context: execution part construct
  c$ x
    ^
./sngg075g_2.f:2:7: in the context: execution part
        k01=-1
        ^
./sngg075g_2.f:1:7: in the context: main program
        program main
 ^
./sngg075g_2.f:3:5: error: expected ':'
  c$ x
 ^
./sngg075g_2.f:3:4: in the context: nonlabel DO statement
  c$ x
 ^
./sngg075g_2.f:3:3: in the context: DO construct
  c$ x
 ^
./sngg075g_2.f:3:3: in the context: execution part construct
  c$ x
    ^
./sngg075g_2.f:2:7: in the context: execution part
 k01=-1
        ^
./sngg075g_2.f:1:7: in the context: main program
 program main
        ^
$
```

```
$ gfortran -fopenmp sngg075g_2.f; ./a.out
 pass
$
```

```
$ ifort -qopenmp -diag-disable=10448 sngg075g_2.f; ./a.out
 pass
$
```

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to