This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gnats problem?



--- Begin Message ---
Hi. This is the qmail-send program at sources.redhat.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<gnats-admin@gcc.gnu.org>:
Sorry, no mailbox here by that name. (#5.1.1)

--- Below this line is a copy of the message.

Return-Path: <rz@linux-m68k.org>
Received: (qmail 4091 invoked by uid 71); 14 Aug 2002 11:36:01 -0000
Resent-Date: 14 Aug 2002 11:36:01 -0000
Resent-Message-ID: <20020814113601.4088.qmail@sources.redhat.com>
Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer)
Resent-To: gnats-admin@gcc.gnu.org
Resent-Reply-To: gcc-gnats@gcc.gnu.org, Richard Zidlicky <rz@linux-m68k.org>
Received: (qmail 25274 invoked from network); 14 Aug 2002 11:31:00 -0000
Received: from unknown (HELO faui02.informatik.uni-erlangen.de) (131.188.30.102)
  by sources.redhat.com with SMTP; 14 Aug 2002 11:31:00 -0000
Received: from rz.de (root@faui02b.informatik.uni-erlangen.de [131.188.30.151])
	by faui02.informatik.uni-erlangen.de (8.9.1/8.1.16-FAU) with ESMTP id NAA08784
	for <gcc-gnats@gcc.gnu.org>; Wed, 14 Aug 2002 13:30:58 +0200 (MEST)
Received: (from rz@localhost)
	by rz.de (8.8.8/8.8.8) id NAA00392;
	Wed, 14 Aug 2002 13:09:32 +0200
Message-Id: <200208141109.NAA00392@rz.de>
Date: Wed, 14 Aug 2002 13:09:32 +0200
From: Richard Zidlicky <rz@linux-m68k.org>
To: gcc-gnats@gcc.gnu.org
X-Send-Pr-Version: 3.113
Subject: pending/7595: global register variable problem


>Number:         7595
>Category:       pending
>Synopsis:       store in global register variable improperly eliminated
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 14 04:36:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Richard Zidlicky
>Release:        3.2 20020806 (prerelease) and 3.1.1
>Organization:
>Environment:
m68k-linux native and crosscompiled
configured with: ../gcc-3.2-cvs/configure --enable-languages=c --disable-checking --with-newlib --without-headers --target=m68k-linux : (reconfigured) ../gcc-3.2-cvs/configure --enable-languages=c --disable-checking --with-newlib --without-headers --target=m68k-linux
>Description:

in following testcase the store to 'g1' is improperly eliminated
on m68k-linux, depending on version and configuration the compiler
may also die with 
 Internal compiler error in verify_wide_reg, at flow.c:557

>From the other architectures I have tested only ppc which doesn't 
seem to have a problem with this particular testcase. 


##### compile with -O2 ########
void bar(void);

#ifdef __mc68000
register int g1 asm("%d7");
#elif defined(powerpc)
register int g1 asm("r13");
#elif defined(sparc)
register int g1 asm("g7");
#elif defined(hppa)
register int g1 asm("r7");
#elif defined(mips)
register int g1 asm("$21");
#endif


void foo(void)
{
     g1=999;
     bar();
}

#############################
>How-To-Repeat:
>Fix:

This patch does cure the problem:

--- gcc-3.2-cvs/gcc/flow.c.rz   Thu Apr 18 22:21:09 2002
+++ gcc-3.2-cvs/gcc/flow.c      Fri Aug  9 23:56:52 2002
@@ -1770,8 +1770,11 @@
             so they are made live.  */
          for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
            if (global_regs[i])
-             mark_used_reg (pbi, gen_rtx_REG (reg_raw_mode[i], i),
-                            cond, insn);
+             {
+               SET_REGNO_REG_SET (pbi->reg_live, i);
+               mark_used_reg (pbi, gen_rtx_REG (reg_raw_mode[i], i),
+                              cond, insn);
+             }
        }
     }
 

	
>Release-Note:
>Audit-Trail:
>Unformatted:
--- End Message ---

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]