This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/17739] New: tree-optimizers extend the lifetime of a hard register variable
- From: "rth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Sep 2004 21:26:29 -0000
- Subject: [Bug tree-optimization/17739] New: tree-optimizers extend the lifetime of a hard register variable
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
#define REGISTER "0"
static inline int source(void)
{
register int hardreg __asm__(REGISTER);
asm("" : "=r"(hardreg));
return hardreg;
}
void test(void)
{
int t = source();
foo(t);
bar(t);
}
Optimization should not turn "bar(t_4)" into "bar(hardreg)",
since the hard register gets clobbered by foo.
This test case is reduced from java/lang/natObject.cc affecting Alpha.
--
Summary: tree-optimizers extend the lifetime of a hard register
variable
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: rth at gcc dot gnu dot org
ReportedBy: rth at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17739