Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave ---
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 --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr126355.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr126355.c index 35e321008aa..11b97758de5 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" } } */
signature.asc
Description: PGP signature
