Issue 176994
Summary [Flang] Error when parsing multiple semicolons
Labels flang
Assignees
Reporter timsmith78
    An internal regression test fails when trying to parse a line containing multiple semicolons.  From my reading of the latest spec, I believe the syntax is valid, as it is correctly parsed by both gfortran and Cray Fortran. Here is the command and error:

```
flang -c semicolon-reduce.f90 
error: Could not parse semicolon-reduce.f90
./semicolon-reduce.f90:7:9: error: expected end of line
  end ; ; subroutine test( arg1, arg2 );real arg1, arg2;;;; arg1=arg2; ; ; end;;;
 ^
./semicolon-reduce.f90:8:2: error: expected declaration construct
  ;;
 ^
./semicolon-reduce.f90:8:1: in the context: specification part
  ;;
 ^
./semicolon-reduce.f90:8:3: error: end of file
  ;;
    ^
in the context: END PROGRAM statement
./semicolon-reduce.f90:8:1: in the context: main program
  ;;
  ^
error: expected declaration construct
./semicolon-reduce.f90:8:1: in the context: specification part
 ;;
  ^
```
Here is a link to the source file attachment:
[semicolon-reduce.f90.txt](https://github.com/user-attachments/files/24748139/semicolon-reduce.f90.txt)

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to