public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/30383] New: [gdb/testsuite, -std=gnu90] FAIL: gdb.opt/inline-locals.exp: info locals above bar 2
@ 2023-04-23  8:57 vries at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: vries at gcc dot gnu.org @ 2023-04-23  8:57 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30383

            Bug ID: 30383
           Summary: [gdb/testsuite, -std=gnu90] FAIL:
                    gdb.opt/inline-locals.exp: info locals above bar 2
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Using this patch and gcc 7.5.0 we have:
...
diff --git a/gdb/testsuite/gdb.opt/inline-locals.exp
b/gdb/testsuite/gdb.opt/inline-locals.exp
index 3980f4ddd2a..60f62eca90d 100644
--- a/gdb/testsuite/gdb.opt/inline-locals.exp
+++ b/gdb/testsuite/gdb.opt/inline-locals.exp
@@ -16,7 +16,7 @@
 standard_testfile .c inline-markers.c

 if {[prepare_for_testing "failed to prepare" $testfile \
-        [list $srcfile $srcfile2] {debug additional_flags=-Winline}]} {
+        [list $srcfile $srcfile2] {debug additional_flags=-Winline
additional_flags=-std=gnu90}]} {
     return -1
 }

...
we have:
...
FAIL: gdb.opt/inline-locals.exp: info locals above bar 2
FAIL: gdb.opt/inline-locals.exp: info locals above bar 3
FAIL: gdb.opt/inline-locals.exp: print local 3
FAIL: gdb.opt/inline-locals.exp: scoped info locals at bp for locals 1
FAIL: gdb.opt/inline-locals.exp: scoped info locals at bp for locals 2
FAIL: gdb.opt/inline-locals.exp: scoped info locals at bp for locals 3
...

First sign of trouble is:
...
(gdb) PASS: gdb.opt/inline-locals.exp: func1 inlined 2
info locals^M
array = {0 <repeats 58 times>, 4195280, 0, -11296, 32767, 0, 0}^M
array = <optimized out>^M
(gdb) FAIL: gdb.opt/inline-locals.exp: info locals above bar 2
...

The problem seems to be that there's a difference of option about the address
of array:
...
(gdb) s
func1 (arg1=0) at /data/vries/gdb/src/gdb/testsuite/gdb.opt/inline-locals.c:43
43        init_array (array, 64);
(gdb) p &array
$1 = (int (*)[64]) 0x7fffffffda50
(gdb) s
init_array (array=0x7fffffffda30, n=64) at
/data/vries/gdb/src/gdb/testsuite/gdb.opt/inline-locals.c:36
36        for (i = 0; i < n; ++i)
...

Then with gcc 8.2.1:
...
FAIL: gdb.opt/inline-locals.exp: scoped info locals at bp for locals 1
FAIL: gdb.opt/inline-locals.exp: scoped info locals at bp for locals 2
...
and all clear with gcc 9.3.1.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-23  8:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-23  8:57 [Bug testsuite/30383] New: [gdb/testsuite, -std=gnu90] FAIL: gdb.opt/inline-locals.exp: info locals above bar 2 vries 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).