https://gcc.gnu.org/g:243736b98f1b781894bf4619dc1e98d02318f1c9

commit r16-5867-g243736b98f1b781894bf4619dc1e98d02318f1c9
Author: Jose E. Marchesi <[email protected]>
Date:   Wed Dec 3 15:16:55 2025 +0100

    a68: set LVERSION for Algol 68 and fix guard [PR algol68/122964]
    
    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.

Diff:
---
 gcc/dwarf2out.cc | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
index 16f9b855a993..c637f9d93f05 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"))

Reply via email to