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 14:41:39 +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 #10 from Uros Bizjak <ubizjak at gmail dot com> 2012-01-25 14:41:39 UTC ---
(In reply to comment #7)
> Testcase that crashes on alpha:
Actually, the test in comment #7 exposed the problem, but was not 100% correct.
This one is:
--cut here--
#include <string.h>
extern void abort (void);
char __attribute__((noinline))
test (int a)
{
char buf[16];
char *output = buf;
strcpy (&buf[0], "0123456789");
output += a;
output -= 1;
return output[0];
}
int main ()
{
if (test (2) != '1')
abort ();
return 0;
}
--cut here--