From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30801 invoked by alias); 28 Jul 2010 09:54:27 -0000 Received: (qmail 30736 invoked by uid 48); 28 Jul 2010 09:54:05 -0000 Date: Wed, 28 Jul 2010 09:54:00 -0000 Subject: [Bug debug/45103] New: DW_OP_reg* has too large valid range for noreturn funcs X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jan dot kratochvil at redhat dot com" 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-07/txt/msg03058.txt.bz2 Use -g -O2. DW_OP_reg5 is there valid for each PC, despite there si a `call' and reg5 is caller-saved register. Its value therefore gets corrupted in the callee. FAIL all these: gcc (GCC) 4.6.0 20100724 (experimental) gcc (GCC) 4.5.1 20100728 (prerelease) gcc (GCC) 4.4.5 20100724 (prerelease) gcc-4.4.4-10.fc13.x86_64 GNU gdb (GDB) 7.2.50.20100724-cvs #0 breakat (q=0) at 1.c:7 #1 0x000000000040053b in f (a1=, a2=2, a3=3, a4=4, a5=5, a6=6, a7=7) at 2.c:6 #2 0x00000000004004fc in g (x=0) at 1.c:14 ^^^ x=10 here, it should be #3 0x000000000040051e in main () at 2.c:14 ==> 1.c <== #include extern __attribute__((noreturn)) void f (long a1, long a2, long a3, long a4, long a5, long a6, long a7); __attribute__((noreturn)) void breakat (long q) { exit (0); } __attribute__((noinline)) void g (long x) { f (x, 2, 3, 4, 5, 6, 7); } ==> 2.c <== extern __attribute__((noreturn)) void breakat (long q); __attribute__((noreturn)) void f (long a1, long a2, long a3, long a4, long a5, long a6, long a7) { breakat (0); } extern __attribute__((noinline)) void g (long x); int main (void) { g (10); return 0; } -- Summary: DW_OP_reg* has too large valid range for noreturn funcs Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jan dot kratochvil at redhat dot com GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45103