Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: gcc/libgfortran/m4/unpack.m4

Issue 3050029: [gcc] GCC 4.5.0=>4.5.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcc/libgfortran/m4/spread.m4 ('k') | gcc/libgfortran/runtime/error.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/libgfortran/m4/unpack.m4
diff --git a/gcc/libgfortran/m4/unpack.m4 b/gcc/libgfortran/m4/unpack.m4
index a26128c7835eb0ad7738d4ddc211299a87887076..bf348aebe1fa22b65743a2fccb65c03e5274c810 100644
--- a/gcc/libgfortran/m4/unpack.m4
+++ b/gcc/libgfortran/m4/unpack.m4
@@ -91,13 +91,12 @@ unpack0_'rtype_code` ('rtype` *ret, const 'rtype` *vector,
for (n = 0; n < dim; n++)
{
count[n] = 0;
- ret->dim[n].stride = rs;
- ret->dim[n].lbound = 0;
- ret->dim[n].ubound = mask->dim[n].ubound - mask->dim[n].lbound;
- extent[n] = ret->dim[n].ubound + 1;
+ GFC_DIMENSION_SET(ret->dim[n], 0,
+ GFC_DESCRIPTOR_EXTENT(mask,n) - 1, rs);
+ extent[n] = GFC_DESCRIPTOR_EXTENT(ret,n);
empty = empty || extent[n] <= 0;
- rstride[n] = ret->dim[n].stride;
- mstride[n] = mask->dim[n].stride * mask_kind;
+ rstride[n] = GFC_DESCRIPTOR_STRIDE(ret,n);
+ mstride[n] = GFC_DESCRIPTOR_STRIDE_BYTES(mask,n);
rs *= extent[n];
}
ret->offset = 0;
@@ -109,10 +108,10 @@ unpack0_'rtype_code` ('rtype` *ret, const 'rtype` *vector,
for (n = 0; n < dim; n++)
{
count[n] = 0;
- extent[n] = ret->dim[n].ubound + 1 - ret->dim[n].lbound;
+ extent[n] = GFC_DESCRIPTOR_EXTENT(ret,n);
empty = empty || extent[n] <= 0;
- rstride[n] = ret->dim[n].stride;
- mstride[n] = mask->dim[n].stride * mask_kind;
+ rstride[n] = GFC_DESCRIPTOR_STRIDE(ret,n);
+ mstride[n] = GFC_DESCRIPTOR_STRIDE_BYTES(mask,n);
}
if (rstride[0] == 0)
rstride[0] = 1;
@@ -124,7 +123,7 @@ unpack0_'rtype_code` ('rtype` *ret, const 'rtype` *vector,
if (mstride[0] == 0)
mstride[0] = 1;
- vstride0 = vector->dim[0].stride;
+ vstride0 = GFC_DESCRIPTOR_STRIDE(vector,0);
if (vstride0 == 0)
vstride0 = 1;
rstride0 = rstride[0];
@@ -236,14 +235,13 @@ unpack1_'rtype_code` ('rtype` *ret, const 'rtype` *vector,
for (n = 0; n < dim; n++)
{
count[n] = 0;
- ret->dim[n].stride = rs;
- ret->dim[n].lbound = 0;
- ret->dim[n].ubound = mask->dim[n].ubound - mask->dim[n].lbound;
- extent[n] = ret->dim[n].ubound + 1;
+ GFC_DIMENSION_SET(ret->dim[n], 0,
+ GFC_DESCRIPTOR_EXTENT(mask,n) - 1, rs);
+ extent[n] = GFC_DESCRIPTOR_EXTENT(ret,n);
empty = empty || extent[n] <= 0;
- rstride[n] = ret->dim[n].stride;
- fstride[n] = field->dim[n].stride;
- mstride[n] = mask->dim[n].stride * mask_kind;
+ rstride[n] = GFC_DESCRIPTOR_STRIDE(ret,n);
+ fstride[n] = GFC_DESCRIPTOR_STRIDE(field,n);
+ mstride[n] = GFC_DESCRIPTOR_STRIDE_BYTES(mask,n);
rs *= extent[n];
}
ret->offset = 0;
@@ -255,11 +253,11 @@ unpack1_'rtype_code` ('rtype` *ret, const 'rtype` *vector,
for (n = 0; n < dim; n++)
{
count[n] = 0;
- extent[n] = ret->dim[n].ubound + 1 - ret->dim[n].lbound;
+ extent[n] = GFC_DESCRIPTOR_EXTENT(ret,n);
empty = empty || extent[n] <= 0;
- rstride[n] = ret->dim[n].stride;
- fstride[n] = field->dim[n].stride;
- mstride[n] = mask->dim[n].stride * mask_kind;
+ rstride[n] = GFC_DESCRIPTOR_STRIDE(ret,n);
+ fstride[n] = GFC_DESCRIPTOR_STRIDE(field,n);
+ mstride[n] = GFC_DESCRIPTOR_STRIDE_BYTES(mask,n);
}
if (rstride[0] == 0)
rstride[0] = 1;
@@ -273,7 +271,7 @@ unpack1_'rtype_code` ('rtype` *ret, const 'rtype` *vector,
if (mstride[0] == 0)
mstride[0] = 1;
- vstride0 = vector->dim[0].stride;
+ vstride0 = GFC_DESCRIPTOR_STRIDE(vector,0);
if (vstride0 == 0)
vstride0 = 1;
rstride0 = rstride[0];
« no previous file with comments | « gcc/libgfortran/m4/spread.m4 ('k') | gcc/libgfortran/runtime/error.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698