This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Apr 2006 18:46:34 -0000
- Subject: [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Testcase (at -O2 and above):
typedef long atype[];
typedef long atype1[];
int NumSift (atype *a, atype1 *a1)
{
(*a)[0] = 0;
(*a1)[0] = 1;
return (*a)[0];
}
int main(void)
{
long a[2];
if (!NumSift(&a, &a))
__builtin_abort ();
return 0;
}
------
Orginally reported here:
http://gcc.gnu.org/ml/gcc/2006-03/msg00638.html
--
Summary: [4.0/4.1/4.2 Regression] Wrong code with pointers to
arrays and types and strict aliasing
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27184