#55 subscript out of range in referenceelements.hh
Metadata
| Property | Value | 
|---|---|
| Reported by | Christian Engwer (christi@conan.iwr.uni-heidelberg.de) | 
| Reported at | Nov 24, 2005 18:28 | 
| Type | Bug Report | 
| Version | Git (pre2.4) [autotools] | 
| Operating System | Unspecified / All | 
| Last edited by | Christian Engwer (christi@conan.iwr.uni-heidelberg.de) | 
| Last edited at | Nov 24, 2005 18:29 | 
| Closed by | Peter Bastian (peter.bastian@iwr.uni-heidelberg.de) | 
| Closed at | Feb 23, 2006 13:23 | 
| Closed in version | 1.0 | 
| Resolution | Not a bug | 
| Comment | Problem was: array is allocated with certain size depending on dim but the code is for all dims=1,2,3 and uses if (dim=bla) to switch to the relevant part. So 3d code does out of range access if dim==2 but is actually never executed. I just set the size large enough for all dims=1,2,3 (it is not implementedn in general anyway). | 
Description
When compiling with icc 7.0 there are several "subscript out of range" warnings. These are a serious problem as they might lead to later segfaults.
Here is the condensed compiler output:
../common/referenceelements.hh(631): warning #175 (closed): subscript out of range
        for(int i=0;i<subsizes[0][0][3];++i)../common/referenceelements.hh(632): warning #175 (closed): subscript out of range
          subentityindex[0][0][i][3]=i;../common/referenceelements.hh(683): warning #175 (closed): subscript out of range
        subsizes[0][0][3]=4; ../common/referenceelements.hh(688): warning #175 (closed): subscript out of range
          subsizes[i][1][3]=3;../common/referenceelements.hh(697): warning #175 (closed): subscript out of range
          subsizes[k][2][3]=2;../common/referenceelements.hh(703): warning #175 (closed): subscript out of range
        for(int i=0;i<subsizes[0][0][3];++i)../common/referenceelements.hh(704): warning #175 (closed): subscript out of range
          subentityindex[0][0][i][3]=i;../common/referenceelements.hh(717): warning #175 (closed): subscript out of range
        subentityindex[0][1][0][3]=1;../common/referenceelements.hh(718): warning #175 (closed): subscript out of range
        subentityindex[0][1][1][3]=2;../common/referenceelements.hh(719): warning #175 (closed): subscript out of range
        subentityindex[0][1][2][3]=3;../common/referenceelements.hh(721): warning #175 (closed): subscript out of range
        subentityindex[1][1][0][3]=0;../common/referenceelements.hh(722): warning #175 (closed): subscript out of range
        subentityindex[1][1][1][3]=3;../common/referenceelements.hh(723): warning #175 (closed): subscript out of range
        subentityindex[1][1][2][3]=2;../common/referenceelements.hh(725): warning #175 (closed): subscript out of range
        subentityindex[2][1][0][3]=0;../common/referenceelements.hh(726): warning #175 (closed): subscript out of range
        subentityindex[2][1][1][3]=1;../common/referenceelements.hh(727): warning #175 (closed): subscript out of range
        subentityindex[2][1][2][3]=3;../common/referenceelements.hh(729): warning #175 (closed): subscript out of range
        subentityindex[3][1][0][3]=0;../common/referenceelements.hh(730): warning #175 (closed): subscript out of range
        subentityindex[3][1][1][3]=2;../common/referenceelements.hh(731): warning #175 (closed): subscript out of range
        subentityindex[3][1][2][3]=1;../common/referenceelements.hh(751): warning #175 (closed): subscript out of range
        subentityindex[0][2][0][3]=0;../common/referenceelements.hh(752): warning #175 (closed): subscript out of range
        subentityindex[0][2][1][3]=1;../common/referenceelements.hh(754): warning #175 (closed): subscript out of range
        subentityindex[1][2][0][3]=1;../common/referenceelements.hh(755): warning #175 (closed): subscript out of range
        subentityindex[1][2][1][3]=2;../common/referenceelements.hh(757): warning #175 (closed): subscript out of range
        subentityindex[2][2][0][3]=0;../common/referenceelements.hh(758): warning #175 (closed): subscript out of range
        subentityindex[2][2][1][3]=2;../common/referenceelements.hh(760): warning #175 (closed): subscript out of range
        subentityindex[3][2][0][3]=0;../common/referenceelements.hh(761): warning #175 (closed): subscript out of range
        subentityindex[3][2][1][3]=3;../common/referenceelements.hh(763): warning #175 (closed): subscript out of range
        subentityindex[4][2][0][3]=1;../common/referenceelements.hh(764): warning #175 (closed): subscript out of range
        subentityindex[4][2][1][3]=3;../common/referenceelements.hh(766): warning #175 (closed): subscript out of range
        subentityindex[5][2][0][3]=2;../common/referenceelements.hh(767): warning #175 (closed): subscript out of range
        subentityindex[5][2][1][3]=3;../common/referenceelements.hh(790): warning #175 (closed): subscript out of range
            pos[4][2][j]=(pos[1][3][j]+pos[3][3][j])/2.0;../common/referenceelements.hh(792): warning #175 (closed): subscript out of range
            pos[5][2][j]=(pos[2][3][j]+pos[3][3][j])/2.0;