aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/generated
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated')
-rw-r--r--libgfortran/generated/reshape_c10.c21
-rw-r--r--libgfortran/generated/reshape_c16.c21
-rw-r--r--libgfortran/generated/reshape_c4.c21
-rw-r--r--libgfortran/generated/reshape_c8.c21
-rw-r--r--libgfortran/generated/reshape_i16.c21
-rw-r--r--libgfortran/generated/reshape_i4.c21
-rw-r--r--libgfortran/generated/reshape_i8.c21
-rw-r--r--libgfortran/generated/reshape_r10.c21
-rw-r--r--libgfortran/generated/reshape_r16.c21
-rw-r--r--libgfortran/generated/reshape_r4.c21
-rw-r--r--libgfortran/generated/reshape_r8.c21
-rw-r--r--libgfortran/generated/spread_r4.c3
12 files changed, 233 insertions, 1 deletions
diff --git a/libgfortran/generated/reshape_c10.c b/libgfortran/generated/reshape_c10.c
index ed54f1b..567d5b4 100644
--- a/libgfortran/generated/reshape_c10.c
+++ b/libgfortran/generated/reshape_c10.c
@@ -121,6 +121,27 @@ reshape_c10 (gfc_array_c10 * const restrict ret,
if (unlikely (compile_options.bounds_check))
{
+ index_type ret_extent, source_extent;
+
+ rs = 1;
+ for (n = 0; n < rdim; n++)
+ {
+ rs *= shape_data[n];
+ ret_extent = ret->dim[n].ubound + 1 - ret->dim[n].lbound;
+ if (ret_extent != shape_data[n])
+ runtime_error("Incorrect extent in return value of RESHAPE"
+ " intrinsic in dimension %ld: is %ld,"
+ " should be %ld", (long int) n+1,
+ (long int) ret_extent, (long int) shape_data[n]);
+ }
+
+ source_extent = source->dim[0].ubound + 1 - source->dim[0].lbound;
+
+ if (rs != source_extent)
+ runtime_error("Incorrect size in SOURCE argument to RESHAPE"
+ " intrinsic: is %ld, should be %ld",
+ (long int) source_extent, (long int) rs);
+
if (order)
{
int seen[GFC_MAX_DIMENSIONS];
diff --git a/libgfortran/generated/reshape_c16.c b/libgfortran/generated/reshape_c16.c
index 6361509..79745f2 100644
--- a/libgfortran/generated/reshape_c16.c
+++ b/libgfortran/generated/reshape_c16.c
@@ -121,6 +121,27 @@ reshape_c16 (gfc_array_c16 * const restrict ret,
if (unlikely (compile_options.bounds_check))
{
+ index_type ret_extent, source_extent;
+
+ rs = 1;
+ for (n = 0; n < rdim; n++)
+ {
+ rs *= shape_data[n];
+ ret_extent = ret->dim[n].ubound + 1 - ret->dim[n].lbound;
+ if (ret_extent != shape_data[n])
+ runtime_error("Incorrect extent in return value of RESHAPE"
+ " intrinsic in dimension %ld: is %ld,"
+ " should be %ld", (long int) n+1,
+ (long int) ret_extent, (long int) shape_data[n]);
+ }
+
+ source_extent = source->dim[0].ubound + 1 - source->dim[0].lbound;
+
+ if (rs != source_extent)
+ runtime_error("Incorrect size in SOURCE argument to RESHAPE"
+ " intrinsic: is %ld, should be %ld",
+ (long int) source_extent, (long int) rs);
+
if (order)
{
int seen[GFC_MAX_DIMENSIONS];
diff --git a/libgfortran/generated/reshape_c4.c b/libgfortran/generated/reshape_c4.c
index 869d623..90383ad 100644
--- a/libgfortran/generated/reshape_c4.c
+++ b/libgfortran/generated/reshape_c4.c
@@ -121,6 +121,27 @@ reshape_c4 (gfc_array_c4 * const restrict ret,
if (unlikely (compile_options.bounds_check))
{
+ index_type ret_extent, source_extent;
+
+ rs = 1;
+ for (n = 0; n < rdim; n++)
+ {
+ rs *= shape_data[n];
+ ret_extent = ret->dim[n].ubound + 1 - ret->dim[n].lbound;
+ if (ret_extent != shape_data[n])
+ runtime_error("Incorrect extent in return value of RESHAPE"
+ " intrinsic in dimension %ld: is %ld,"
+ " should be %ld", (long int) n+1,
+ (long int) ret_extent, (long int) shape_data[n]);
+ }
+
+ source_extent = source->dim[0].ubound + 1 - source->dim[0].lbound;
+
+ if (rs != source_extent)
+ runtime_error("Incorrect size in SOURCE argument to RESHAPE"
+ " intrinsic: is %ld, should be %ld",
+ (long int) source_extent, (long int) rs);
+
if (order)
{
int seen[GFC_MAX_DIMENSIONS];
diff --git a/libgfortran/generated/reshape_c8.c b/libgfortran/generated/reshape_c8.c
index 24ec469..49178e5 100644
--- a/libgfortran/generated/reshape_c8.c
+++ b/libgfortran/generated/reshape_c8.c
@@ -121,6 +121,27 @@ reshape_c8 (gfc_array_c8 * const restrict ret,
if (unlikely (compile_options.bounds_check))
{
+ index_type ret_extent, source_extent;
+
+ rs = 1;
+ for (n = 0; n < rdim; n++)
+ {
+ rs *= shape_data[n];
+ ret_extent = ret->dim[n].ubound + 1 - ret->dim[n].lbound;
+ if (ret_extent != shape_data[n])
+ runtime_error("Incorrect extent in return value of RESHAPE"
+ " intrinsic in dimension %ld: is %ld,"
+ " should be %ld", (long int) n+1,
+ (long int) ret_extent, (long int) shape_data[n]);
+ }
+
+ source_extent = source->dim[0].ubound + 1 - source->dim[0].lbound;
+
+ if (rs != source_extent)
+ runtime_error("Incorrect size in SOURCE argument to RESHAPE"
+ " intrinsic: is %ld, should be %ld",
+ (long int) source_extent, (long int) rs);
+
if (order)
{
int seen[GFC_MAX_DIMENSIONS];
diff --git a/libgfortran/generated/reshape_i16.c b/libgfortran/generated/reshape_i16.c
index e857b6b..a626465 100644
--- a/libgfortran/generated/reshape_i16.c
+++ b/libgfortran/generated/reshape_i16.c
@@ -121,6 +121,27 @@ reshape_16 (gfc_array_i16 * const restrict ret,
if (unlikely (compile_options.bounds_check))
{
+ index_type ret_extent, source_extent;
+
+ rs = 1;
+ for (n = 0; n < rdim; n++)
+ {
+ rs *= shape_data[n];
+ ret_extent = ret->dim[n].ubound + 1 - ret->dim[n].lbound;
+ if (ret_extent != shape_data[n])
+ runtime_error("Incorrect extent in return value of RESHAPE"
+ " intrinsic in dimension %ld: is %ld,"
+ " should be %ld", (long int) n+1,
+ (long int) ret_extent, (long int) shape_data[n]);
+ }
+
+ source_extent = source->dim[0].ubound + 1 - source->dim[0].lbound;
+
+ if (rs != source_extent)
+ runtime_error("Incorrect size in SOURCE argument to RESHAPE"
+ " intrinsic: is %ld, should be %ld",
+ (long int) source_extent, (long int) rs);
+
if (order)
{
int seen[GFC_MAX_DIMENSIONS];
diff --git a/libgfortran/generated/reshape_i4.c b/libgfortran/generated/reshape_i4.c
index 517d25d..1d3aa49 100644
--- a/libgfortran/generated/reshape_i4.c
+++ b/libgfortran/generated/reshape_i4.c
@@ -121,6 +121,27 @@ reshape_4 (gfc_array_i4 * const restrict ret,
if (unlikely (compile_options.bounds_check))
{
+ index_type ret_extent, source_extent;
+
+ rs = 1;
+ for (n = 0; n < rdim; n++)
+ {
+ rs *= shape_data[n];
+ ret_extent = ret->dim[n].ubound + 1 - ret->dim[n].lbound;
+ if (ret_extent != shape_data[n])
+ runtime_error("Incorrect extent in return value of RESHAPE"
+ " intrinsic in dimension %ld: is %ld,"
+ " should be %ld", (long int) n+1,
+ (long int) ret_extent, (long int) shape_data[n]);
+ }
+
+ source_extent = source->dim[0].ubound + 1 - source->dim[0].lbound;
+
+ if (rs != source_extent)
+ runtime_error("Incorrect size in SOURCE argument to RESHAPE"
+ " intrinsic: is %ld, should be %ld",
+ (long int) source_extent, (long int) rs);
+
if (order)
{
int seen[GFC_MAX_DIMENSIONS];
diff --git a/libgfortran/generated/reshape_i8.c b/libgfortran/generated/reshape_i8.c
index 75ba319..8c51795 100644
--- a/libgfortran/generated/reshape_i8.c
+++ b/libgfortran/generated/reshape_i8.c
@@ -121,6 +121,27 @@ reshape_8 (gfc_array_i8 * const restrict ret,
if (unlikely (compile_options.bounds_check))
{
+ index_type ret_extent, source_extent;
+
+ rs = 1;
+ for (n = 0; n < rdim; n++)
+ {
+ rs *= shape_data[n];
+ ret_extent = ret->dim[n].ubound + 1 - ret->dim[n].lbound;
+ if (ret_extent != shape_data[n])
+ runtime_error("Incorrect extent in return value of RESHAPE"
+ " intrinsic in dimension %ld: is %ld,"
+ " should be %ld", (long int) n+1,
+ (long int) ret_extent, (long int) shape_data[n]);
+ }
+
+ source_extent = source->dim[0].ubound + 1 - source->dim[0].lbound;
+
+ if (rs != source_extent)
+ runtime_error("Incorrect size in SOURCE argument to RESHAPE"
+ " intrinsic: is %ld, should be %ld",
+ (long int) source_extent, (long int) rs);
+
if (order)
{
int seen[GFC_MAX_DIMENSIONS];
diff --git a/libgfortran/generated/reshape_r10.c b/libgfortran/generated/reshape_r10.c
index 2987ef7..846d12f 100644
--- a/libgfortran/generated/reshape_r10.c
+++ b/libgfortran/generated/reshape_r10.c
@@ -121,6 +121,27 @@ reshape_r10 (gfc_array_r10 * const restrict ret,
if (unlikely (compile_options.bounds_check))
{
+ index_type ret_extent, source_extent;
+
+ rs = 1;
+ for (n = 0; n < rdim; n++)
+ {
+ rs *= shape_data[n];
+ ret_extent = ret->dim[n].ubound + 1 - ret->dim[n].lbound;
+ if (ret_extent != shape_data[n])
+ runtime_error("Incorrect extent in return value of RESHAPE"
+ " intrinsic in dimension %ld: is %ld,"
+ " should be %ld", (long int) n+1,
+ (long int) ret_extent, (long int) shape_data[n]);
+ }
+
+ source_extent = source->dim[0].ubound + 1 - source->dim[0].lbound;
+
+ if (rs != source_extent)
+ runtime_error("Incorrect size in SOURCE argument to RESHAPE"
+ " intrinsic: is %ld, should be %ld",
+ (long int) source_extent, (long int) rs);
+
if (order)
{
int seen[GFC_MAX_DIMENSIONS];
diff --git a/libgfortran/generated/reshape_r16.c b/libgfortran/generated/reshape_r16.c
index 2d84b2b..286e374 100644
--- a/libgfortran/generated/reshape_r16.c
+++ b/libgfortran/generated/reshape_r16.c
@@ -121,6 +121,27 @@ reshape_r16 (gfc_array_r16 * const restrict ret,
if (unlikely (compile_options.bounds_check))
{
+ index_type ret_extent, source_extent;
+
+ rs = 1;
+ for (n = 0; n < rdim; n++)
+ {
+ rs *= shape_data[n];
+ ret_extent = ret->dim[n].ubound + 1 - ret->dim[n].lbound;
+ if (ret_extent != shape_data[n])
+ runtime_error("Incorrect extent in return value of RESHAPE"
+ " intrinsic in dimension %ld: is %ld,"
+ " should be %ld", (long int) n+1,
+ (long int) ret_extent, (long int) shape_data[n]);
+ }
+
+ source_extent = source->dim[0].ubound + 1 - source->dim[0].lbound;
+
+ if (rs != source_extent)
+ runtime_error("Incorrect size in SOURCE argument to RESHAPE"
+ " intrinsic: is %ld, should be %ld",
+ (long int) source_extent, (long int) rs);
+
if (order)
{
int seen[GFC_MAX_DIMENSIONS];
diff --git a/libgfortran/generated/reshape_r4.c b/libgfortran/generated/reshape_r4.c
index fa68f82..cd16b24 100644
--- a/libgfortran/generated/reshape_r4.c
+++ b/libgfortran/generated/reshape_r4.c
@@ -121,6 +121,27 @@ reshape_r4 (gfc_array_r4 * const restrict ret,
if (unlikely (compile_options.bounds_check))
{
+ index_type ret_extent, source_extent;
+
+ rs = 1;
+ for (n = 0; n < rdim; n++)
+ {
+ rs *= shape_data[n];
+ ret_extent = ret->dim[n].ubound + 1 - ret->dim[n].lbound;
+ if (ret_extent != shape_data[n])
+ runtime_error("Incorrect extent in return value of RESHAPE"
+ " intrinsic in dimension %ld: is %ld,"
+ " should be %ld", (long int) n+1,
+ (long int) ret_extent, (long int) shape_data[n]);
+ }
+
+ source_extent = source->dim[0].ubound + 1 - source->dim[0].lbound;
+
+ if (rs != source_extent)
+ runtime_error("Incorrect size in SOURCE argument to RESHAPE"
+ " intrinsic: is %ld, should be %ld",
+ (long int) source_extent, (long int) rs);
+
if (order)
{
int seen[GFC_MAX_DIMENSIONS];
diff --git a/libgfortran/generated/reshape_r8.c b/libgfortran/generated/reshape_r8.c
index 8af5739..9da26d4 100644
--- a/libgfortran/generated/reshape_r8.c
+++ b/libgfortran/generated/reshape_r8.c
@@ -121,6 +121,27 @@ reshape_r8 (gfc_array_r8 * const restrict ret,
if (unlikely (compile_options.bounds_check))
{
+ index_type ret_extent, source_extent;
+
+ rs = 1;
+ for (n = 0; n < rdim; n++)
+ {
+ rs *= shape_data[n];
+ ret_extent = ret->dim[n].ubound + 1 - ret->dim[n].lbound;
+ if (ret_extent != shape_data[n])
+ runtime_error("Incorrect extent in return value of RESHAPE"
+ " intrinsic in dimension %ld: is %ld,"
+ " should be %ld", (long int) n+1,
+ (long int) ret_extent, (long int) shape_data[n]);
+ }
+
+ source_extent = source->dim[0].ubound + 1 - source->dim[0].lbound;
+
+ if (rs != source_extent)
+ runtime_error("Incorrect size in SOURCE argument to RESHAPE"
+ " intrinsic: is %ld, should be %ld",
+ (long int) source_extent, (long int) rs);
+
if (order)
{
int seen[GFC_MAX_DIMENSIONS];
diff --git a/libgfortran/generated/spread_r4.c b/libgfortran/generated/spread_r4.c
index c151df3..a9357af 100644
--- a/libgfortran/generated/spread_r4.c
+++ b/libgfortran/generated/spread_r4.c
@@ -131,7 +131,8 @@ spread_r4 (gfc_array_r4 *ret, const gfc_array_r4 *source,
if (n == along - 1)
{
rdelta = ret->dim[n].stride;
-
+ printf("ret_extent = %ld, ncopies = %ld\n",
+ (long int) ret_extent, (long int) ncopies);
if (ret_extent != ncopies)
runtime_error("Incorrect extent in return value of SPREAD"
" intrinsic in dimension %ld: is %ld,"