Fix accsessing "PresentModifierLocs" array beyond its end. (#73579)
Currently PresentModifierLocs defined with size DefaultmapKindNum; where DefaultmapKindNum = OMPC_DEFAULTMAP_pointer + 1 Before 5.0 variable-category can not be omitted. For the test like \#pragma omp target map(tofrom: errors) defaultmap(present) error would be mitted. After 5.0 that is allowd. When try to: PresentModifierLocs[DMC->getDefaultmapKind()] = DMC->getDefaultmapModifierLoc(); It is accessed beyond array end. To fix this using OMPC_DEFAULTMAP_unknow instead OMPC_DEFAULTMAP_poiner.
Loading
Please sign in to comment