This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/65270] issues with merging memory accesses from different code paths
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 05 Mar 2015 20:11:42 +0000
- Subject: [Bug ipa/65270] issues with merging memory accesses from different code paths
- Auto-submitted: auto-generated
- References: <bug-65270-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65270
--- Comment #27 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
here is a variant of orignal testcase for tree-tail-merge
struct a
{
int a[100000];
};
typedef struct a misaligned_t __attribute__ ((aligned (8)));
typedef struct a aligned_t __attribute__ ((aligned (32)));
__attribute__ ((used))
__attribute__ ((noinline))
t(void *a, int misaligned, aligned_t *d)
{
int i,v;
for (i=0;i<100000;i++)
{
if (misaligned)
v=((misaligned_t *)a)->a[i];
else
v=((aligned_t *)a)->a[i];
d->a[i]+=v;
}
}
struct b {int v; misaligned_t m;aligned_t aa;} b;
aligned_t d;
main()
{
t(&b.m, 1, &d);
}
$ ./xgcc -B ./ -O3 t.c -fdump-tree-all-details
t.c:10:1: warning: return type defaults to ïintï [-Wimplicit-int]
t(void *a, int misaligned, aligned_t *d)
^
t.c:24:1: warning: return type defaults to ïintï [-Wimplicit-int]
main()
^
$ ./a.out
Segmentation fault
It works (by accident) for GCC 4.7, so it is a regression again...