Commit 5cfcd771 by Olivier Hainque Committed by Olivier Hainque

dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83 for Ada with strict dwarf2.

2018-06-11  Olivier Hainque  <hainque@adacore.com>

        * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
        for Ada with strict dwarf2.

	testsuite/

        * gnat.dg/lang-dw2.adb: New test.
        * gnat.dg/lang-dw3.adb: New test.

From-SVN: r261432
parent 259cc9a7
2018-06-11 Olivier Hainque <hainque@adacore.com>
* dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
for Ada with strict dwarf2.
2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
PR target/85755
......
......@@ -24460,6 +24460,9 @@ gen_compile_unit_die (const char *filename)
/* Use a degraded Fortran setting in strict DWARF2 so is_fortran works. */
else if (strncmp (language_string, "GNU Fortran", 11) == 0)
language = DW_LANG_Fortran90;
/* Likewise for Ada. */
else if (strcmp (language_string, "GNU Ada") == 0)
language = DW_LANG_Ada83;
add_AT_unsigned (die, DW_AT_language, language);
......
2018-06-11 Olivier Hainque <hainque@adacore.com>
* gnat.dg/lang-dw2.adb: New test.
* gnat.dg/lang-dw3.adb: New test.
2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
* gnat.dg/assertion_policy1.adb, gnat.dg/assertion_policy1_pkg.adb,
......
-- with strict dwarf2, we should produce DW_LANG_Ada83 (0x3) as AT_language
-- { dg-do compile }
-- { dg-skip-if "No dwarf-2 support" { hppa*-*-hpux* } }
-- { dg-options "-cargs -gdwarf-2 -gstrict-dwarf -dA -margs" }
-- { dg-final { scan-assembler "0x3\[^\n\r\]*AT_language" } }
procedure Langdw2 is begin null; end;
-- with dwarf3+ or !strict-dwarf, we should produce DW_LANG_Ada95 (0xd)
-- as AT_language
-- { dg-do compile }
-- { dg-skip-if "No dwarf-2 support" { hppa*-*-hpux* } }
-- { dg-options "-cargs -gdwarf-3 -dA -margs" }
-- { dg-final { scan-assembler "0xd\[^\n\r\]*AT_language" } }
procedure Langdw3 is begin null; end;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment