From a8ae8f9c2ed055b9e4408209f1c724493c5a3e3c Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Fri, 23 Aug 2024 06:22:55 +0200 Subject: [PATCH] Fix test failure on powerpc targets Apparently due to slightly different optimization levels not always both subroutines have multiple subranges, but having at least one such, and no lexical blocks is sufficient to prove that the fix worked. Q.E.D. So reduce the test expectations to only at least one inlined subroutine with multiple subranges. gcc/testsuite/ChangeLog: PR other/116462 * gcc.dg/debug/dwarf2/inline7.c: Reduce test expectations. --- gcc/testsuite/gcc.dg/debug/dwarf2/inline7.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/inline7.c b/gcc/testsuite/gcc.dg/debug/dwarf2/inline7.c index 48d457216b1..083df5b586c 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/inline7.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/inline7.c @@ -1,9 +1,9 @@ -/* Verify that both inline instances have a DW_AT_ranges but - no extra DW_TAG_lexical_block. */ +/* Verify that at least one of both inline instances have + a DW_AT_ranges but no extra DW_TAG_lexical_block. */ /* { dg-options "-O -gdwarf -dA" } */ /* { dg-do compile } */ /* { dg-final { scan-assembler-times "\\(DIE \\(\[^\n\]*\\) DW_TAG_inlined_subroutine" 2 } } */ -/* { dg-final { scan-assembler-times " DW_AT_ranges" 2 } } */ +/* { dg-final { scan-assembler " DW_AT_ranges" } } */ /* { dg-final { scan-assembler-times "\\(DIE \\(\[^\n\]*\\) DW_TAG_lexical_block" 0 } } */ static int foo (int i) -- 2.47.2