public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/116462] New: [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails
@ 2024-08-22 19:15 seurer at gcc dot gnu.org
  2024-08-22 20:13 ` [Bug other/116462] " bernd.edlinger at hotmail dot de
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: seurer at gcc dot gnu.org @ 2024-08-22 19:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116462

            Bug ID: 116462
           Summary: [15 regression] new test case
                    gcc.dg/debug/dwarf2/inline7.c from
                    r15-3083-gbcb33b1237042e fails
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

g:bcb33b1237042e9540a905d9de19219f876e26c0, r15-3083-gbcb33b1237042e
make  -k check-gcc RUNTESTFLAGS="dwarf2.exp=gcc.dg/debug/dwarf2/inline7.c"
FAIL: gcc.dg/debug/dwarf2/inline7.c scan-assembler-times  DW_AT_ranges 2
# of expected passes            3
# of unexpected failures        1


commit bcb33b1237042e9540a905d9de19219f876e26c0 (HEAD)
Author: Bernd Edlinger <bernd.edlinger@hotmail.de>
Date:   Fri Aug 16 12:26:27 2024 +0200

    Do not emit a redundant DW_TAG_lexical_block for inlined subroutines

            * gcc.dg/debug/dwarf2/inline7.c: New test.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug other/116462] [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails
  2024-08-22 19:15 [Bug other/116462] New: [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails seurer at gcc dot gnu.org
@ 2024-08-22 20:13 ` bernd.edlinger at hotmail dot de
  2024-08-22 21:08 ` bernd.edlinger at hotmail dot de
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2024-08-22 20:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116462

Bernd Edlinger <bernd.edlinger at hotmail dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bernd.edlinger at hotmail dot de

--- Comment #1 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Ah, nice, it worked with arm, aarch64, x86_64, riscv, riscv64 so far...
only one of two inlined_subroutines have multiple subranges.

Can you try this:
index 48d457216b1..5342b87cd0f 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/inline7.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/inline7.c
@@ -10,7 +10,7 @@ static int foo (int i)
 {
   volatile int j = i + 3;
   if (j == 3)
-    return 0;
+    return j - 3;
   return j - 2;
 }
 int main()

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug other/116462] [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails
  2024-08-22 19:15 [Bug other/116462] New: [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails seurer at gcc dot gnu.org
  2024-08-22 20:13 ` [Bug other/116462] " bernd.edlinger at hotmail dot de
@ 2024-08-22 21:08 ` bernd.edlinger at hotmail dot de
  2024-08-23  3:03 ` linkw at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2024-08-22 21:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116462

--- Comment #2 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
no forget it, this might make arm unhappy...

lets try this instead:

--- 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)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug other/116462] [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails
  2024-08-22 19:15 [Bug other/116462] New: [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails seurer at gcc dot gnu.org
  2024-08-22 20:13 ` [Bug other/116462] " bernd.edlinger at hotmail dot de
  2024-08-22 21:08 ` bernd.edlinger at hotmail dot de
@ 2024-08-23  3:03 ` linkw at gcc dot gnu.org
  2024-08-23  5:06 ` bernd.edlinger at hotmail dot de
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: linkw at gcc dot gnu.org @ 2024-08-23  3:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116462

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |15.0
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |bernd.edlinger at hotmail dot de
   Last reconfirmed|                            |2024-08-23
                 CC|                            |linkw at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #3 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Bernd Edlinger from comment #2)
> no forget it, this might make arm unhappy...
> 
> lets try this instead:
> 
> --- 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)

This works well on Power, thanks for fixing! I'm curious why the DW_AT_ranges
on Power is different from what's on most others, does the information depend
on some specific handling in port?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug other/116462] [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails
  2024-08-22 19:15 [Bug other/116462] New: [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails seurer at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-08-23  3:03 ` linkw at gcc dot gnu.org
@ 2024-08-23  5:06 ` bernd.edlinger at hotmail dot de
  2024-08-23  9:35 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2024-08-23  5:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116462

--- Comment #4 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
The DW_AT_ranges indicates that the subroutine is split over
more than one area, in most cases both subroutines do have
multiple subranges, but apparently due to slightly different
optimization levels only one of them has multiple subranges here,
but that is sufficient to see, that this subroutine has no
lexical blocks, you could see in an unpatched gcc that for the
one subroutine that has the DW_AT_ranges, there is also
a DW_TAG_lexical_block which is what we want to avoid.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug other/116462] [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails
  2024-08-22 19:15 [Bug other/116462] New: [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails seurer at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-08-23  5:06 ` bernd.edlinger at hotmail dot de
@ 2024-08-23  9:35 ` cvs-commit at gcc dot gnu.org
  2024-08-23 11:20 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-08-23  9:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116462

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Bernd Edlinger <edlinger@gcc.gnu.org>:

https://gcc.gnu.org/g:a8ae8f9c2ed055b9e4408209f1c724493c5a3e3c

commit r15-3118-ga8ae8f9c2ed055b9e4408209f1c724493c5a3e3c
Author: Bernd Edlinger <bernd.edlinger@hotmail.de>
Date:   Fri Aug 23 06:22:55 2024 +0200

    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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug other/116462] [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails
  2024-08-22 19:15 [Bug other/116462] New: [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails seurer at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-08-23  9:35 ` cvs-commit at gcc dot gnu.org
@ 2024-08-23 11:20 ` rguenth at gcc dot gnu.org
  2024-08-26 16:22 ` edlinger at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-08-23 11:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116462

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Should be fixed.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug other/116462] [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails
  2024-08-22 19:15 [Bug other/116462] New: [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails seurer at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-08-23 11:20 ` rguenth at gcc dot gnu.org
@ 2024-08-26 16:22 ` edlinger at gcc dot gnu.org
  2024-08-27  5:54 ` cvs-commit at gcc dot gnu.org
  2024-08-27  5:56 ` edlinger at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: edlinger at gcc dot gnu.org @ 2024-08-26 16:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116462

Bernd Edlinger <edlinger at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |---
             Status|RESOLVED                    |REOPENED

--- Comment #7 from Bernd Edlinger <edlinger at gcc dot gnu.org> ---
I've been informed that this test case does still fail on sparc:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116470#c12

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug other/116462] [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails
  2024-08-22 19:15 [Bug other/116462] New: [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails seurer at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2024-08-26 16:22 ` edlinger at gcc dot gnu.org
@ 2024-08-27  5:54 ` cvs-commit at gcc dot gnu.org
  2024-08-27  5:56 ` edlinger at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-08-27  5:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116462

--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Bernd Edlinger <edlinger@gcc.gnu.org>:

https://gcc.gnu.org/g:103127cd9398d140222c9da44715d447641bf791

commit r15-3209-g103127cd9398d140222c9da44715d447641bf791
Author: Bernd Edlinger <bernd.edlinger@hotmail.de>
Date:   Mon Aug 26 18:06:52 2024 +0200

    Fix another inline7.c test failure on sparc targets

    This new test was reported to be still failing on sparc targets.
    Here the number of DW_AT_ranges dropped to zero.
    The test should pass on this architecture with -Os, -O2 and -O3.
    I tried to improve also different known problematic targets,
    where only one subroutine had DW_AT_ranges:
    Those are armhf (arm with hard float), powerpc and powerpc64.
    The best option is to use -Os: So far the only one, where
    all two inline instances in this test had two DW_AT_ranges.

    gcc/testsuite/ChangeLog:

            PR other/116462
            * gcc.dg/debug/dwarf2/inline7.c: Switch to -Os optimization.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug other/116462] [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails
  2024-08-22 19:15 [Bug other/116462] New: [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails seurer at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2024-08-27  5:54 ` cvs-commit at gcc dot gnu.org
@ 2024-08-27  5:56 ` edlinger at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: edlinger at gcc dot gnu.org @ 2024-08-27  5:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116462

Bernd Edlinger <edlinger at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|REOPENED                    |RESOLVED

--- Comment #9 from Bernd Edlinger <edlinger at gcc dot gnu.org> ---
fixed

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-08-27  5:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-22 19:15 [Bug other/116462] New: [15 regression] new test case gcc.dg/debug/dwarf2/inline7.c from r15-3083-gbcb33b1237042e fails seurer at gcc dot gnu.org
2024-08-22 20:13 ` [Bug other/116462] " bernd.edlinger at hotmail dot de
2024-08-22 21:08 ` bernd.edlinger at hotmail dot de
2024-08-23  3:03 ` linkw at gcc dot gnu.org
2024-08-23  5:06 ` bernd.edlinger at hotmail dot de
2024-08-23  9:35 ` cvs-commit at gcc dot gnu.org
2024-08-23 11:20 ` rguenth at gcc dot gnu.org
2024-08-26 16:22 ` edlinger at gcc dot gnu.org
2024-08-27  5:54 ` cvs-commit at gcc dot gnu.org
2024-08-27  5:56 ` edlinger at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).