[Bug fortran/92956] 'libgomp.fortran/examples-4/async_target-2.f90' offloading compilation regression
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 17 12:23:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92956
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Make that:
struct T { char a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p; };
struct S { long l; struct T t; };
void
foo (long l, struct S *p)
{
p->l = l;
p->t.a = 2;
p->t.b = 3;
p->t.c = 4;
p->t.d = 5;
p->t.e = 6;
p->t.f = 7;
p->t.g = 8;
p->t.h = 9;
p->t.i = 10;
p->t.j = 11;
p->t.k = 12;
p->t.l = 13;
p->t.m = 14;
p->t.n = 15;
p->t.o = 16;
p->t.p = 17;
}
and at -O3 slp2 doing:
+ vect_cst__21 = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 };
p_2(D)->l = l_3(D);
- p_2(D)->t.a = 2;
- p_2(D)->t.b = 3;
- p_2(D)->t.c = 4;
- p_2(D)->t.d = 5;
- p_2(D)->t.e = 6;
- p_2(D)->t.f = 7;
- p_2(D)->t.g = 8;
- p_2(D)->t.h = 9;
- p_2(D)->t.i = 10;
- p_2(D)->t.j = 11;
- p_2(D)->t.k = 12;
- p_2(D)->t.l = 13;
- p_2(D)->t.m = 14;
- p_2(D)->t.n = 15;
- p_2(D)->t.o = 16;
- p_2(D)->t.p = 17;
+ vectp.4_22 = &p_2(D)->t.a;
+ MEM <vector(16) char> [(char *)vectp.4_22] = vect_cst__21;
pr92956.c: In function ‘foo’:
pr92956.c:8:10: warning: writing 16 bytes into a region of size 1
[-Wstringop-overflow=]
8 | p->t.a = 2;
| ~~~~~~~^~~
pr92956.c:1:17: note: at offset 0 to object ‘a’ with size 1 declared here
1 | struct T { char a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p; };
| ^
More information about the Gcc-bugs
mailing list