Hi,
I am encountering an issue when using polymorphic types in modern fortran. I have a routine that takes in a string and a variable that is declared in the routine as class(*). I then use select type to then select the type of var and convert the string to the variable.
I, however, encounter problems when using allocatable arrays in a particular set of circumstances. A simple example code that reproduces the error can be found here. https://drive.google.com/drive/folders/1GLbcVJZmb-Mslbjy20YaKWcb3hzgNxVv?usp=sharing
This error has only occurred since upgrading to pgfortran 19.4, compared to say 19.1. When compiled with -O0 there isn’t an issue, but when I use -O1 or higher I get the error FIO-F-225/list-directed read/internal file/lexical error-- unknown token type.
Any suggestions would be great.
Thanks,
Will
p.s. I’m aware I could probably use pattern matching in an explicit interface in this example, but due to other dependancies on read_str2polymorphic that wouldn’t be an option in the production code.