[petsc-dev] array bounds exceeded?

Adrian Croucher a.croucher at auckland.ac.nz
Mon Jan 23 16:30:49 CST 2017


I just pulled the latest 'next' branch and compiled. I noticed the 
following warning- can this be ignored or is it possibly trouble?

           CC linux-gnu-c-opt/obj/src/dm/impls/plex/plexgeometry.o
/home/acro018/software/PETSc/code/src/dm/impls/plex/plexgeometry.c: In 
function ‘DMPlexComputeGridHash_Internal’:
/home/acro018/software/PETSc/code/src/dm/impls/plex/plexgeometry.c:493:90: 
warning: array subscript is above array bounds [-Warray-bounds]
              for (d = 0; d < dim; ++d) {segA[d] = 
PetscRealPart(ccoords[edge*dim+d]); segA[dim+d] = 
PetscRealPart(ccoords[((edge+1)%(dim+1))*dim+d]);}

- Adrian

-- 
Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email: a.croucher at auckland.ac.nz
tel: +64 (0)9 923 4611




More information about the petsc-dev mailing list