public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/113562] [14 Regression] FAIL: gcc.dg/guality/pr54796.c
Date: Wed, 24 Jan 2024 08:13:08 +0000	[thread overview]
Message-ID: <bug-113562-4-TaVHID2NrY@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113562-4@http.gcc.gnu.org/bugzilla/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |i?86-*-*
   Last reconfirmed|                            |2024-01-24
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
   Target Milestone|---                         |14.0
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
With -m32 only.  Code generated is

Dump of assembler code for function foo:
   0x080483ef <+0>:     push   %ebp
   0x080483f0 <+1>:     mov    %esp,%ebp
   0x080483f2 <+3>:     push   %ebx
   0x080483f3 <+4>:     sub    $0x4,%esp
   0x080483f6 <+7>:     mov    0xc(%ebp),%eax
   0x080483f9 <+10>:    add    $0xf,%eax
   0x080483fc <+13>:    and    $0xfffffff0,%eax
   0x080483ff <+16>:    sub    %eax,%esp
   0x08048401 <+18>:    mov    %esp,%ebx
   0x08048403 <+20>:    sub    $0x8,%esp
   0x08048406 <+23>:    push   $0x2
   0x08048408 <+25>:    push   %ebx
   0x08048409 <+26>:    call   0x80483e6 <bar>
=> 0x0804840e <+31>:    add    $0x8,%esp
   0x08048411 <+34>:    push   $0x4
   0x08048413 <+36>:    push   %ebx
   0x08048414 <+37>:    call   0x80483e6 <bar>
   0x08048419 <+42>:    add    $0x10,%esp
   0x0804841c <+45>:    mov    -0x4(%ebp),%ebx
   0x0804841f <+48>:    leave  
   0x08048420 <+49>:    ret    

the PC is where the function arguments and the 'c' stack local are no
longer visible to gdb.  Code generation without the changes is the same
so it's very likely var-tracking that is affected by the alias analysis
changes possibly no longer disambiguating stack operations.  In fact
after the

   push $0x2

the variables are gone (I would have expected the call here).  The
pushes are

(insn 22 21 23 2 (set (mem:SI (pre_dec:SI (reg/f:SI 7 sp)) [2  S4 A32])
        (const_int 2 [0x2]))
"/space/rguenther/src/gcc/gcc/testsuite/gcc.dg/guality/pr54796.c":16:3 60
{*pushsi2}
     (expr_list:REG_ARGS_SIZE (const_int 12 [0xc])
        (nil)))
(insn 23 22 24 2 (set (mem/f:SI (pre_dec:SI (reg/f:SI 7 sp)) [1  S4 A32])
        (reg/f:SI 3 bx [108]))
"/space/rguenther/src/gcc/gcc/testsuite/gcc.dg/guality/pr54796.c":16:3 60
{*pushsi2}
     (expr_list:REG_ARGS_SIZE (const_int 16 [0x10])
        (nil)))

but the SP operation that's likely problematical is the feeding

(insn 16 15 17 2 (parallel [
            (set (reg/f:SI 7 sp)
                (minus:SI (reg/f:SI 7 sp)
                    (reg:SI 0 ax [107])))
            (clobber (reg:CC 17 flags))
        ])
"/space/rguenther/src/gcc/gcc/testsuite/gcc.dg/guality/pr54796.c":15:8 361
{*subsi_1}
     (expr_list:REG_DEAD (reg:SI 0 ax [107])
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (nil))))

but we must come here via VALUE and

      if (cselib_sp_based_value_p (val))
        return static_reg_base_value[STACK_POINTER_REGNUM];

should still deal with this then (var-tracking sets this flag).

  reply	other threads:[~2024-01-24  8:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23 15:55 [Bug debug/113562] New: " hjl.tools at gmail dot com
2024-01-24  8:13 ` rguenth at gcc dot gnu.org [this message]
2024-01-24 11:00 ` [Bug debug/113562] " rguenth at gcc dot gnu.org
2024-01-29 14:48 ` rguenth at gcc dot gnu.org
2024-01-30  7:34 ` rguenth at gcc dot gnu.org
2024-03-07 20:45 ` law at gcc dot gnu.org
2024-05-07  7:44 ` [Bug debug/113562] [14/15 " rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-113562-4-TaVHID2NrY@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).