Error while compiling using PG fortran 19.4 version


When I tried to compile with PG Fortran 19.4 version, I get the error “Expected Value Token”. I don’t understand this error. It never happened before. It used to compile with older 2015 version without any problem. Can you please check this up?


Hi Venkat,

A “Expected Value Token” could be a LLVM code generation error, but there’s not enough information here to tell.

Can you please post a minimal reproducing example along with the full error message?


Hi Mat,

Many thanks for your quick response. The error I get is shown below.

/opt/pgi/linux86-64-llvm/19.4/share/llvm/bin/llc: error: /opt/pgi/linux86-64-llvm/19.4/share/llvm/bin/llc: /tmp/pgf90RBmbbDei9bpQ.ll:186:13: error: expected value token

call void spillsmoothandfillcells_ (), !dbg !10361

You are absolutely right as to where the error is. It is related to LLVM. I have been using the code for many years. Recently we moved to 19.4 and when I tried to compile using the same arguments as I used to have before, I got the above error message. I have attached code in case you want to review it. It has Entry and Subroutine codes along with some many Use statements.

Since I could not figure it out, I tried to convert the Entry statements into Subroutine to avoid these errors. But this will be a tedious process to do for the entire model .



SpillContourSubs_v1_Test.f90 (17.3 KB)

Thanks Venkat, however this file contains several dependent modules and source files so I can’t compile it to recreate the issue.

Are you able to reduce the test case so the dependencies are not needed or provide a package with all dependencies included?