From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21789 invoked by alias); 28 Oct 2012 15:30:59 -0000 Received: (qmail 21734 invoked by uid 48); 28 Oct 2012 15:30:38 -0000 From: "schwab@linux-m68k.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/54993] [4.8 regression] PIC register not marked as live Date: Sun, 28 Oct 2012 15:30:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: schwab@linux-m68k.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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/msg02637.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54993 --- Comment #2 from Andreas Schwab 2012-10-28 15:30:37 UTC --- What exactly did you test? The bug is clearly present before r192890. Here is the diff between r192889 and r192890: @@ -1663,16 +1663,17 @@ _Z6test01v: .cfi_startproc .cfi_personality 0,__gxx_personality_v0 .cfi_lsda 0,.LLSDA2633 - link.w %fp,#-68 + link.w %fp,#-72 .cfi_offset 14, -8 .cfi_def_cfa 14, 8 movem.l #12348,-(%sp) - .cfi_offset 2, -100 - .cfi_offset 3, -96 - .cfi_offset 10, -92 - .cfi_offset 11, -88 - .cfi_offset 12, -84 - .cfi_offset 13, -80 + .cfi_offset 2, -104 + .cfi_offset 3, -100 + .cfi_offset 10, -96 + .cfi_offset 11, -92 + .cfi_offset 12, -88 + .cfi_offset 13, -84 + lea (%pc, _GLOBAL_OFFSET_TABLE_@GOTPC), %a5 clr.l -48(%fp) clr.l -44(%fp) pea 104.w @@ -1791,22 +1792,22 @@ _Z6test01v: jsr _ZNSt6thread15_M_start_threadESt10shared_ptrINS_10_Impl_baseEE .LEHE14: addq.l #8,%sp - move.l -16(%fp),%a5 - tst.l %a5 + move.l -16(%fp),%a1 + tst.l %a1 jeq .L329 - lea (4,%a5),%a0 + lea (4,%a1),%a0 move.l #_ZL28__gthrw___pthread_key_createPjPFvPvE,%d2 jeq .L323 move.l (%a0),%d0 .L324: - move.l %d0,%a1 + move.l %d0,%d3 move.l %d0,%d1 subq.l #1,%d1 cas.l %d0,%d1,(%a0) seq %d1 tst.b %d1 jeq .L324 - move.l %a1,%d0 + move.l %d3,%d0 moveq #1,%d1 cmp.l %d0,%d1 jeq .L446 @@ -1925,7 +1926,7 @@ _Z6test01v: cmp.l %a0,%d1 jeq .L450 .L309: - movem.l -92(%fp),#15372 + movem.l -96(%fp),#15372 unlk %fp rts .L351: @@ -2005,30 +2006,32 @@ _Z6test01v: sub.l %a0,%a0 jra .L321 .L446: - move.l (%a5),%a0 - move.l %a5,-(%sp) + move.l (%a1),%a0 + move.l %a1,-(%sp) move.l 8(%a0),%a0 + move.l %a1,-72(%fp) jsr (%a0) - lea (8,%a5),%a0 + move.l -72(%fp),%a1 + lea (8,%a1),%a0 addq.l #4,%sp tst.l %d2 jeq .L326 move.l (%a0),%d0 .L327: - move.l %d0,%a1 + move.l %d0,%d2 move.l %d0,%d1 subq.l #1,%d1 cas.l %d0,%d1,(%a0) seq %d1 tst.b %d1 jeq .L327 - move.l %a1,%d0 + move.l %d2,%d0 moveq #1,%d1 cmp.l %d0,%d1 jne .L329 .L452: - move.l (%a5),%a0 - move.l %a5,-(%sp) + move.l (%a1),%a0 + move.l %a1,-(%sp) move.l 12(%a0),%a0 jsr (%a0) addq.l #4,%sp @@ -2056,7 +2059,7 @@ _Z6test01v: move.l 12(%a0),%a0 jsr (%a0) addq.l #4,%sp - movem.l -92(%fp),#15372 + movem.l -96(%fp),#15372 unlk %fp rts .L449: @@ -2147,19 +2150,19 @@ _Z6test01v: addq.l #1,4(%a2) jra .L312 .L323: - move.l 4(%a5),%d0 + move.l 4(%a1),%d0 move.l %d0,%d1 subq.l #1,%d1 - move.l %d1,4(%a5) + move.l %d1,4(%a1) moveq #1,%d1 cmp.l %d0,%d1 jne .L329 jra .L446 .L326: - move.l 8(%a5),%d0 + move.l 8(%a1),%d0 move.l %d0,%d1 subq.l #1,%d1 - move.l %d1,8(%a5) + move.l %d1,8(%a1) moveq #1,%d1 cmp.l %d0,%d1 jne .L329