From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25547 invoked by alias); 12 Feb 2010 13:27:49 -0000 Received: (qmail 25494 invoked by uid 48); 12 Feb 2010 13:27:33 -0000 Date: Fri, 12 Feb 2010 13:27:00 -0000 Subject: [Bug debug/43051] New: [4.5 Regression] VTA causes a stack living parameter unavailable in most of the function X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" 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: 2010-02/txt/msg01169.txt.bz2 static void __attribute__((noinline)) foo (const char *x, long long y, int z) { asm volatile ("" : : "r" (x), "r" ((int) y), "r" (z) : "memory"); } typedef struct S { struct S *n; int v; } *P; P bar (P c, int v, P e) { register int si asm ("esi"), di asm ("edi"), bx asm ("ebx"); asm volatile ("" : "=r" (si), "=r" (di), "=r" (bx)); while (c < e) { foo ("c", (unsigned int) c, 0); foo ("v", v, 0); foo ("e", (unsigned int) e, 0); if (c->v == v) return c; foo ("c", (unsigned int) c, 0); foo ("v", v, 0); foo ("e", (unsigned int) e, 0); c++; } asm volatile ("" : : "r" (si), "r" (di), "r" (bx)); return 0; } at -g -O2 -m32 makes c unavailable in most of the function, while the c var is for the whole time living in the parameter stack slot. GCC 4.4.x and earlier emit correct location info in this case. -- Summary: [4.5 Regression] VTA causes a stack living parameter unavailable in most of the function Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: wrong-debug Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jakub at gcc dot gnu dot org GCC target triplet: i686-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43051