https://gcc.gnu.org/g:4ac792710dd405465e6aa93051bff83647a9831f

commit r17-5547-g4ac792710dd405465e6aa93051bff83647a9831f
Author: John David Anglin <[email protected]>
Date:   Sat Oct 24 15:34:53 2026 -0400

    testsuite: Fix pr126355.c scan-assembler failure on hppa64-hp-hpux11.11
    
    The test pr126355.c fails on hppa64-hp-hpux11.11 because the
    target generates trailing assembler comments for DWARF attributes
    (e.g., '.ascii "name\0" ; DW_AT_name') rather than the standard
    'DW_AT_name: "name"' layout format.
    
    This patch updates the scan-assembler regex to support an alternative
    match group, allowing the test to pass on both standard ELF targets
    and HPPA targets without splitting the validation check.
    
    2026-10-24  John David Anglin  <[email protected]>
    
    gcc/testsuite/ChangeLog:
    
            * gcc.dg/debug/dwarf2/pr126355.c: Adjust scan-assembler regex
            to accommodate HPPA trailing assembler comment layout.

Diff:
---
 gcc/testsuite/gcc.dg/debug/dwarf2/pr126355.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr126355.c 
b/gcc/testsuite/gcc.dg/debug/dwarf2/pr126355.c
index 35e321008aa9..11b97758de56 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr126355.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr126355.c
@@ -32,4 +32,4 @@ main (int argc, char **argv)
    pr_icf_wrapper_b, the wrapper.  */
 /* { dg-final { scan-ipa-dump "Semantic equality 
hit:pr_icf_wrapper_a/\[0-9+\]+->pr_icf_wrapper_b/\[0-9+\]+" "icf" } } */
 /* { dg-final { scan-ipa-dump "Wrapper has been created" "icf" } } */
-/* { dg-final { scan-assembler "\\(DIE \\(0x\[0-9a-f\]+\\) 
DW_TAG_subprogram\\)\[\r\n\]+(\[^\r\n\]*\[\r\n\]+){1,12}\[^\r\n\]*DW_AT_name: 
\"pr_icf_wrapper_b\"\[\r\n\]+(\[^\r\n\]*\[\r\n\]+){1,12}\[^\r\n\]*DW_AT_low_pc" 
} } */
+/* { dg-final { scan-assembler "\\(DIE \\(0x\[0-9a-f\]+\\) 
DW_TAG_subprogram\\)\[\r\n\]+(\[^\r\n\]*\[\r\n\]+){1,12}\[^\r\n\]*(DW_AT_name: 
\"pr_icf_wrapper_b\"|\"pr_icf_wrapper_b\\\\0\"\[^\r\n\]*DW_AT_name)\[\r\n\]+(\[^\r\n\]*\[\r\n\]+){1,12}\[^\r\n\]*DW_AT_low_pc"
 } } */

Reply via email to