This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/51994] [4.6/4.7 Regression] git-1.7.8.3 miscompiled due to negative bitpos from get_inner_reference
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Jan 2012 13:19:32 +0000
- Subject: [Bug middle-end/51994] [4.6/4.7 Regression] git-1.7.8.3 miscompiled due to negative bitpos from get_inner_reference
- Auto-submitted: auto-generated
- References: <bug-51994-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51994
--- Comment #7 from Uros Bizjak <ubizjak at gmail dot com> 2012-01-25 13:19:32 UTC ---
Testcase that crashes on alpha:
--cut here--
extern void abort (void);
char __attribute__((noinline))
test (int a)
{
char buf[] = "0123456789";
char *output = buf;
output += a;
output -= 1;
return output[0];
}
int main ()
{
if (test (2) != '1')
abort ();
return 0;
}
--cut here--