From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15162 invoked by alias); 3 Oct 2012 15:30:06 -0000 Received: (qmail 14902 invoked by uid 48); 3 Oct 2012 15:29:40 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/54796] New: [4.8 Regression] Non-addressable stack parameter debug quality regression Date: Wed, 03 Oct 2012 15:30:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-10/txt/msg00217.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54796 Bug #: 54796 Summary: [4.8 Regression] Non-addressable stack parameter debug quality regression Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned@gcc.gnu.org ReportedBy: jakub@gcc.gnu.org CC: aoliva@gcc.gnu.org Target: i686-linux /* PR debug/NNNNN */ /* { dg-do run } */ /* { dg-options "-g" } */ __attribute__((noinline, noclone)) void bar (char *a, int b) { __asm volatile ("" : "+r" (a), "+r" (b) : : "memory"); } __attribute__((noinline, noclone)) void foo (int a, int b) { int c = a; char d[b];/* { dg-final { gdb-test 17 "a" "5" } } */ bar (d, 2);/* { dg-final { gdb-test 17 "b" "6" } } */ bar (d, 4);/* { dg-final { gdb-test 17 "c" "5" } } */ } int main () { foo (5, 6); return 0; } (line 17 is the second call to bar) regressed for -m32 -Os -g on {i686,x86_64}-linux supposedly with the http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188871 change. I've mentioned this already in http://gcc.gnu.org/ml/gcc-patches/2012-10/msg00262.html but filing it now on a testcase that is not dependent on any GCC patches. The problem is that vt_canon_true_dep/canon_true_dependence doesn't figure out that the stack stores (after prologue where hard fp is initialized) can't alias argp. Without the VLA or other reasons forcing use of frame pointer var-tracking replaces sp accesses with argp + offset accesses and canon_true_dependence then disambiguates it using the offsets.