This commits sets LVERSION for Algol 68 to 1978, which is the year of
the publication of the Revised Report that defines the revised
language.

It also fixes the guard so LANGUAGE, LNAME and LVERSION is only
emitted when generating DWARF5 or later.

Signed-off-by: Jose E. Marchesi <[email protected]>

gcc/ChangeLog

        PR algol68/122964
        * dwarf2out.cc (gen_compile_unit_die): Set LVERSION to 1978 for
        Algol 68 and add dwarf_version >= 5 to guard.
---
 gcc/dwarf2out.cc | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
index 16f9b855a99..c637f9d93f0 100644
--- a/gcc/dwarf2out.cc
+++ b/gcc/dwarf2out.cc
@@ -25820,15 +25820,14 @@ gen_compile_unit_die (const char *filename)
            language = DW_LANG_Go;
          else if (strcmp (language_string, "GNU Rust") == 0)
            language = DW_LANG_Rust;
-       }
-      else if (!dwarf_strict)
-        {
-          if (strcmp (language_string, "GNU Algol 68") == 0)
+          else if (strcmp (language_string, "GNU Algol 68") == 0)
            {
              language = DW_LANG_Algol68;
              lname = DW_LNAME_Algol68;
+             lversion = 1978; /* Not a typo.  The revised language of the
+                                 Revised Report.  */
            }
-        }
+       }
     }
   /* Use a degraded Fortran setting in strict DWARF2 so is_fortran works.  */
   else if (startswith (language_string, "GNU Fortran"))
-- 
2.30.2

Reply via email to