]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
a68: set LVERSION for Algol 68 and fix guard [PR algol68/122964]
authorJose E. Marchesi <jose.marchesi@oracle.com>
Wed, 3 Dec 2025 14:16:55 +0000 (15:16 +0100)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Wed, 3 Dec 2025 14:41:28 +0000 (15:41 +0100)
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 <jemarch@gnu.org>
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

index 16f9b855a993cab8bfe3b877e097bc5022141b4f..c637f9d93f05a19fbdcd557c65e574a156a72151 100644 (file)
@@ -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"))