https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92956

--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #7)
> testsuite/libgomp.fortran/examples-4/async_target-2.f90:34: warning: writing
> 2 bytes into a region of size 1 [-Wstringop-overflow=]
>    34 |         allocate (v1(N), v2(N))
> lto1: note: at offset 0 to object ‘rank’ with size 1 declared here

First, I want to note that there is no string (STRING_TYPE) around but only
numeric data types.

My feeling is that the following goes wrong, in -fdump-tree-omplower(-lineno),
one has:
  D.4378 = .omp_data_i->v1;
  D.4378->dtype.rank = 1;
  D.4379 = .omp_data_i->v1;
  D.4379->dtype.type = 3;
which later becomes (-fdump-dtree-strlen):
   vectp.205_27 = & *_7.dtype.rank
   MEM <vector(2) signed char> [(signed char *)vectp.205_27] = { 1, 3 };

See libgfortran/libgfortran.h for how the struct is organized; namely:
  signed char rank;
  signed char type;

Reply via email to