From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6983 invoked by alias); 25 Feb 2005 02:04:39 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 6928 invoked by uid 48); 25 Feb 2005 02:04:33 -0000 Date: Fri, 25 Feb 2005 15:02:00 -0000 Message-ID: <20050225020433.6927.qmail@sourceware.org> From: "rearnsha at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040623061022.16152.debian-gcc@lists.debian.org> References: <20040623061022.16152.debian-gcc@lists.debian.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug rtl-optimization/16152] perl-5.8.4 fails to build using gcc-3.3.4 on {ia64,arm,m68k}-linux X-Bugzilla-Reason: CC X-SW-Source: 2005-02/txt/msg03100.txt.bz2 List-Id: ------- Additional Comments From rearnsha at gcc dot gnu dot org 2005-02-25 02:04 ------- It's hard to be completely sure what's wrong here, but something *very* suspcision appears near original source line 2669. The good code (on ARM) contains: .L1706: .LBB453: ldr r3, [r6, #4] .LBE453: .LBB454: add r3, r3, #2 str r3, [r6, #4] .LBE454: mov r0, r5 mov r1, r6 bl Perl_save_freesv but the bad code has .L1705: .LBB457: ldr r3, [r6, #4] add r3, r3, #1 str r3, [r6, #4] .LBE457: mov r0, r5 mov r1, r6 bl Perl_save_freesv b .L1665 Note that in the second case r3 is only incremented by 1 not 2. This seems to have come from the following pre-processed sequence: cx->cx_u.cx_blk.blk_u.blku_sub.cv = cv; cx->cx_u.cx_blk.blk_u.blku_sub.o lddepth = ((XPVCV*)(cv)->sv_any)->xcv_depth; cx->cx_u.cx_blk.blk_u.blku_sub.hasa rgs = hasargs; if (!((XPVCV*)(cv)->sv_any)->xcv_depth) { (void)({ SV *_sv = (SV* )(cv); if (_sv) (++(_sv)->sv_refcnt); _sv; }); (void)({ SV *_sv = (SV*)(cv); if (_sv) (++(_sv)->sv_refcnt); _sv; }); Perl_save_freesv(my_perl, (SV*)(cv)); } cx- >cx_u.cx_blk.blk_u.blku_sub.lval = (my_perl->Top)->op_private & (128|4);; Note the double increment of sv->sv_refcnt. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16152