From 02391b8be4fcb3366c23ed53e7e9aaeef734f78d Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 21 Aug 2020 13:26:07 +0200 Subject: [PATCH] Recognize DW_LANG_C11 in readelf testsuite. readelf_wi_test checks the DW_AT_LANGUAGE is recognized by matching against ANSI C. But for the new DWARF5 DW_LANG_C11 readelf simply prints "C11", not prefixed with ANSI (DW_LANG_C is "non-ANSI C", DW_LANG_C89 is "ANSI C" and DW_LANG_C99 is "ANSI-C99"). Adjust the testcase instead of readelf because C11 seems a fine name. binutils/ChangeLog: * testsuite/binutils-all/readelf.exp (readelf_wi_test): Also recognize DW_LANG_C11. --- binutils/ChangeLog | 5 +++++ binutils/testsuite/binutils-all/readelf.exp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 37558efc5e8..1f5bd36e7a9 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2020-08-21 Mark Wielaard + + * testsuite/binutils-all/readelf.exp (readelf_wi_test): Also + recognize DW_LANG_C11. + 2020-08-19 Alan Modra PR 26349 diff --git a/binutils/testsuite/binutils-all/readelf.exp b/binutils/testsuite/binutils-all/readelf.exp index d7f47da68de..1fb36ae5c49 100644 --- a/binutils/testsuite/binutils-all/readelf.exp +++ b/binutils/testsuite/binutils-all/readelf.exp @@ -188,7 +188,7 @@ proc readelf_wi_test {} { ".*DW_TAG_subprogram.*" ".*DW_TAG_base_type.*" ".*DW_AT_producer.*(GNU C|indirect string).*" - ".*DW_AT_language.*ANSI C.*" + ".*DW_AT_language.*(ANSI C|C11).*" ".*DW_AT_name.*(testprog.c|indirect string).*" ".*DW_AT_name.*fn.*" ".*DW_AT_name.*(main|indirect string).*" -- 2.30.2