On 4/8/24 2:53 AM, Tobias Burnus wrote:
Jerry D wrote:
See attached updated patch.
It turned rather quickly out that this patch – committed as
r14-9822-g93adf88cc6744a – caused regressions.
Namely, real-world code use tab(s) as separator instead of spaces.
[For instance, PR114304 which contains a named-list input file from SPEC CPU
2017; that example uses tabs before the '=' sign, but the issue is more
generic.]
I think the ISO Fortran standard only permits spaces, but as it feels natural
and is widely supported, tabs are used and should remain supported.
It is not quite clear how '\r' are or should be handled, but as eat_spaces did
use it, I thought I would add one testcase using them as well.
That test is not affected by my change; it did work before with GCC and still does – but it does fail with ifort/ifx/flang. I have not thought deeply whether it should be supported or not – and
looking at the libgfortran source file, it often but (→ testcase) not consistently requires that an \n follows the \r.
OK for mainline? [And: When the previous patch gets backported, this surely
needs to be included as well.]
Tobias
Good catch. I did not even think about tabs.
OK to commit and I will take care of it when I do the backport to 13.
Thanks!
Jerry