Fortls bug not matching statement labels with different numbers of leading zero Fortls, the Fortran language server, fails to treat statement labels as equivalent when they differ in leading zeros, flagging a "Unexpected end of scope" error for code where a `do 10` loop closes on `0010 continue`. The reporter, who encountered the bug while bringing legacy code into a modern project, said an AI agent inspected fortls's Python source and found it compares statement labels as text strings rather than integers, a likely cause of the mismatch. It seems fortls doesn’t recognize statement labels as equivalent when they have different numbers of leading zeros, such as 10 and 0010 . It reports an error for “Unexpected end of scope…” I encountered this when bringing some legacy code into a modern project. Here’s a minimal reproducible example: do 10 i=1,3 print , i 0010 continue end My AI agent told me it looked at the Python source code of fortls and discovered it treats statement labels as text strings rather than integers. That may be the reason for the bug.