View | Details | Return to bug 54613 | Differences between
and this patch

Collapse All | Expand All

(-)gcc/fortran/check.c (+91 lines)
Lines 148-153 int_or_real_or_char_check_f2003 (gfc_expr *e, int Link Here
148
  return true;
148
  return true;
149
}
149
}
150
150
151
/* Check that en expression is an intrinsic type.  */
152
static bool
153
intrinsic_type_check (gfc_expr *e, int n)
154
{
155
  if (e->ts.type != BT_INTEGER && e->ts.type != BT_REAL
156
      && e->ts.type != BT_COMPLEX && e->ts.type != BT_CHARACTER
157
      && e->ts.type != BT_LOGICAL)
158
    {
159
      gfc_error ("%qs argument of %qs intrinsic at %L must be of intrinsic type",
160
		 gfc_current_intrinsic_arg[n]->name,
161
		 gfc_current_intrinsic, &e->where);
162
      return false;
163
    }
164
  return true;
165
}
151
166
152
/* Check that an expression is real or complex.  */
167
/* Check that an expression is real or complex.  */
153
168
Lines 3345-3351 gfc_check_minloc_maxloc (gfc_actual_arglist *ap) Link Here
3345
  return true;
3360
  return true;
3346
}
3361
}
3347
3362
3363
/* Check function for findloc. Mostly like gfc_check_minloc_maxloc
3364
   above, with the additional "value" argument.  */
3348
3365
3366
bool
3367
gfc_check_findloc (gfc_actual_arglist *ap)
3368
{
3369
  gfc_expr *a, *v, *m, *d, *k, *b;
3370
3371
  a = ap->expr;
3372
  if (!intrinsic_type_check (a, 0) || !array_check (a, 0))
3373
    return false;
3374
3375
  v = ap->next->expr;
3376
  if (!scalar_check (v,1))
3377
    return false;
3378
3379
  /* Check if the type is compatible.  */
3380
3381
  if ((a->ts.type == BT_LOGICAL && v->ts.type != BT_LOGICAL)
3382
      || (a->ts.type != BT_LOGICAL && v->ts.type == BT_LOGICAL))
3383
    {
3384
      gfc_error ("Argument %qs of %qs intrinsic at %L must be in type "
3385
		 "conformance to argument %qs at %L",
3386
		 gfc_current_intrinsic_arg[0]->name,
3387
		 gfc_current_intrinsic, &a->where,
3388
		 gfc_current_intrinsic_arg[1]->name, &v->where);
3389
    }
3390
		 
3391
  d = ap->next->next->expr;
3392
  m = ap->next->next->next->expr;
3393
  k = ap->next->next->next->next->expr;
3394
  b = ap->next->next->next->next->next->expr;
3395
3396
  if (b)
3397
    {
3398
      if (!type_check (b, 5, BT_LOGICAL) || !scalar_check (b,4))
3399
	return false;
3400
    }
3401
  else
3402
    {
3403
      b = gfc_get_logical_expr (gfc_logical_4_kind, NULL, 0);
3404
      ap->next->next->next->next->next->expr = b;
3405
    }
3406
3407
  if (m == NULL && d != NULL && d->ts.type == BT_LOGICAL
3408
      && ap->next->name == NULL)
3409
    {
3410
      m = d;
3411
      d = NULL;
3412
      ap->next->next->expr = NULL;
3413
      ap->next->next->next->expr = m;
3414
    }
3415
3416
  if (!dim_check (d, 2, false))
3417
    return false;
3418
3419
  if (!dim_rank_check (d, a, 0))
3420
    return false;
3421
3422
  if (m != NULL && !type_check (m, 3, BT_LOGICAL))
3423
    return false;
3424
3425
  if (m != NULL
3426
      && !gfc_check_conformance (a, m,
3427
				 "arguments '%s' and '%s' for intrinsic %s",
3428
				 gfc_current_intrinsic_arg[0]->name,
3429
				 gfc_current_intrinsic_arg[3]->name,
3430
				 gfc_current_intrinsic))
3431
    return false;
3432
3433
  if (!kind_check (k, 1, BT_INTEGER))
3434
    return false;
3435
3436
  return true;
3437
}
3438
3439
3349
/* Similar to minloc/maxloc, the argument list might need to be
3440
/* Similar to minloc/maxloc, the argument list might need to be
3350
   reordered for the MINVAL, MAXVAL, PRODUCT, and SUM intrinsics.  The
3441
   reordered for the MINVAL, MAXVAL, PRODUCT, and SUM intrinsics.  The
3351
   difference is that MINLOC/MAXLOC take an additional KIND argument.
3442
   difference is that MINLOC/MAXLOC take an additional KIND argument.
(-)gcc/fortran/gfortran.h (-1 / +9 lines)
Lines 437-442 enum gfc_isym_id Link Here
437
  GFC_ISYM_FE_RUNTIME_ERROR,
437
  GFC_ISYM_FE_RUNTIME_ERROR,
438
  GFC_ISYM_FGET,
438
  GFC_ISYM_FGET,
439
  GFC_ISYM_FGETC,
439
  GFC_ISYM_FGETC,
440
  GFC_ISYM_FINDLOC,
440
  GFC_ISYM_FLOOR,
441
  GFC_ISYM_FLOOR,
441
  GFC_ISYM_FLUSH,
442
  GFC_ISYM_FLUSH,
442
  GFC_ISYM_FNUM,
443
  GFC_ISYM_FNUM,
Lines 2001-2006 typedef union Link Here
2001
  bool (*f2)(struct gfc_expr *, struct gfc_expr *);
2002
  bool (*f2)(struct gfc_expr *, struct gfc_expr *);
2002
  bool (*f3)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *);
2003
  bool (*f3)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *);
2003
  bool (*f5ml)(gfc_actual_arglist *);
2004
  bool (*f5ml)(gfc_actual_arglist *);
2005
  bool (*f6fl)(gfc_actual_arglist *);
2004
  bool (*f3red)(gfc_actual_arglist *);
2006
  bool (*f3red)(gfc_actual_arglist *);
2005
  bool (*f4)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
2007
  bool (*f4)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
2006
	    struct gfc_expr *);
2008
	    struct gfc_expr *);
Lines 2025-2030 typedef union Link Here
2025
  struct gfc_expr *(*f5)(struct gfc_expr *, struct gfc_expr *,
2027
  struct gfc_expr *(*f5)(struct gfc_expr *, struct gfc_expr *,
2026
			 struct gfc_expr *, struct gfc_expr *,
2028
			 struct gfc_expr *, struct gfc_expr *,
2027
			 struct gfc_expr *);
2029
			 struct gfc_expr *);
2030
  struct gfc_expr *(*f6)(struct gfc_expr *, struct gfc_expr *,
2031
			 struct gfc_expr *, struct gfc_expr *,
2032
			 struct gfc_expr *, struct gfc_expr *);
2028
  struct gfc_expr *(*cc)(struct gfc_expr *, bt, int);
2033
  struct gfc_expr *(*cc)(struct gfc_expr *, bt, int);
2029
}
2034
}
2030
gfc_simplify_f;
2035
gfc_simplify_f;
Lines 2045-2050 typedef union Link Here
2045
	     struct gfc_expr *, struct gfc_expr *);
2050
	     struct gfc_expr *, struct gfc_expr *);
2046
  void (*f5)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
2051
  void (*f5)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
2047
	     struct gfc_expr *, struct gfc_expr *, struct gfc_expr *);
2052
	     struct gfc_expr *, struct gfc_expr *, struct gfc_expr *);
2053
  void (*f6)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
2054
	     struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
2055
	     struct gfc_expr *);
2048
  void (*s1)(struct gfc_code *);
2056
  void (*s1)(struct gfc_code *);
2049
}
2057
}
2050
gfc_resolve_f;
2058
gfc_resolve_f;
Lines 3094-3100 extern bool gfc_init_expr_flag; Link Here
3094
void gfc_intrinsic_init_1 (void);
3102
void gfc_intrinsic_init_1 (void);
3095
void gfc_intrinsic_done_1 (void);
3103
void gfc_intrinsic_done_1 (void);
3096
3104
3097
char gfc_type_letter (bt);
3105
char gfc_type_letter (bt, bool logical_equals_int = false);
3098
gfc_symbol * gfc_get_intrinsic_sub_symbol (const char *);
3106
gfc_symbol * gfc_get_intrinsic_sub_symbol (const char *);
3099
bool gfc_convert_type (gfc_expr *, gfc_typespec *, int);
3107
bool gfc_convert_type (gfc_expr *, gfc_typespec *, int);
3100
bool gfc_convert_type_warn (gfc_expr *, gfc_typespec *, int, int);
3108
bool gfc_convert_type_warn (gfc_expr *, gfc_typespec *, int, int);
(-)gcc/fortran/intrinsic.c (-10 / +81 lines)
Lines 60-69 enum klass Link Here
60
60
61
61
62
/* Return a letter based on the passed type.  Used to construct the
62
/* Return a letter based on the passed type.  Used to construct the
63
   name of a type-dependent subroutine.  */
63
   name of a type-dependent subroutine.  If logical_equals_int is
64
   true, we can treat a logical like an int.  */
64
65
65
char
66
char
66
gfc_type_letter (bt type)
67
gfc_type_letter (bt type, bool logical_equals_int)
67
{
68
{
68
  char c;
69
  char c;
69
70
Lines 70-76 char Link Here
70
  switch (type)
71
  switch (type)
71
    {
72
    {
72
    case BT_LOGICAL:
73
    case BT_LOGICAL:
73
      c = 'l';
74
      if (logical_equals_int)
75
	c = 'i';
76
      else
77
	c = 'l';
78
74
      break;
79
      break;
75
    case BT_CHARACTER:
80
    case BT_CHARACTER:
76
      c = 's';
81
      c = 's';
Lines 683-690 add_sym_3 (const char *name, gfc_isym_id id, enum Link Here
683
}
688
}
684
689
685
690
686
/* MINLOC and MAXLOC get special treatment because their argument
691
/* MINLOC and MAXLOC get special treatment because their
687
   might have to be reordered.  */
692
   argument might have to be reordered.  */
688
693
689
static void
694
static void
690
add_sym_5ml (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
695
add_sym_5ml (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
Lines 717-723 add_sym_5ml (const char *name, gfc_isym_id id, enu Link Here
717
	   (void *) 0);
722
	   (void *) 0);
718
}
723
}
719
724
725
/* Similar for FINDLOC.  */
720
726
727
static void
728
add_sym_6fl (const char *name, gfc_isym_id id, enum klass cl, int actual_ok, bt type,
729
	     int kind, int standard,
730
	     bool (*check) (gfc_actual_arglist *),
731
	     gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *,
732
				    gfc_expr *, gfc_expr *, gfc_expr *),
733
	     void (*resolve) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *,
734
			      gfc_expr *, gfc_expr *, gfc_expr *),
735
	     const char *a1, bt type1, int kind1, int optional1,
736
	     const char *a2, bt type2, int kind2, int optional2,
737
	     const char *a3, bt type3, int kind3, int optional3,
738
	     const char *a4, bt type4, int kind4, int optional4,
739
	     const char *a5, bt type5, int kind5, int optional5,
740
	     const char *a6, bt type6, int kind6, int optional6)
741
742
{
743
  gfc_check_f cf;
744
  gfc_simplify_f sf;
745
  gfc_resolve_f rf;
746
747
  cf.f6fl = check;
748
  sf.f6 = simplify;
749
  rf.f6 = resolve;
750
751
  add_sym (name, id, cl, actual_ok, type, kind, standard, cf, sf, rf,
752
	   a1, type1, kind1, optional1, INTENT_IN,
753
	   a2, type2, kind2, optional2, INTENT_IN,
754
	   a3, type3, kind3, optional3, INTENT_IN,
755
	   a4, type4, kind4, optional4, INTENT_IN,
756
	   a5, type5, kind5, optional5, INTENT_IN,
757
	   a6, type6, kind6, optional6, INTENT_IN,
758
	   (void *) 0);
759
}
760
761
721
/* MINVAL, MAXVAL, PRODUCT, and SUM also get special treatment because
762
/* MINVAL, MAXVAL, PRODUCT, and SUM also get special treatment because
722
   their argument also might have to be reordered.  */
763
   their argument also might have to be reordered.  */
723
764
Lines 1248-1254 add_functions (void) Link Here
1248
    *sta = "string_a", *stb = "string_b", *stg = "string",
1289
    *sta = "string_a", *stb = "string_b", *stg = "string",
1249
    *sub = "sub", *sz = "size", *tg = "target", *team = "team", *tm = "time",
1290
    *sub = "sub", *sz = "size", *tg = "target", *team = "team", *tm = "time",
1250
    *ts = "tsource", *ut = "unit", *v = "vector", *va = "vector_a",
1291
    *ts = "tsource", *ut = "unit", *v = "vector", *va = "vector_a",
1251
    *vb = "vector_b", *vl = "values", *x = "x", *y = "y", *z = "z";
1292
    *vb = "vector_b", *vl = "values", *val = "value", *x = "x", *y = "y",
1293
    *z = "z";
1252
1294
1253
  int di, dr, dd, dl, dc, dz, ii;
1295
  int di, dr, dd, dl, dc, dz, ii;
1254
1296
Lines 2476-2481 add_functions (void) Link Here
2476
2518
2477
  make_generic ("maxloc", GFC_ISYM_MAXLOC, GFC_STD_F95);
2519
  make_generic ("maxloc", GFC_ISYM_MAXLOC, GFC_STD_F95);
2478
2520
2521
  add_sym_6fl ("findloc", GFC_ISYM_FINDLOC, CLASS_TRANSFORMATIONAL, ACTUAL_NO,
2522
	       BT_INTEGER, di, GFC_STD_F2008,
2523
	       gfc_check_findloc, gfc_simplify_findloc, gfc_resolve_findloc,
2524
	       ar, BT_REAL, dr, REQUIRED, val, BT_REAL, dr, REQUIRED,
2525
	       dm, BT_INTEGER, ii, OPTIONAL, msk, BT_LOGICAL, dl, OPTIONAL,
2526
	       kind, BT_INTEGER, di, OPTIONAL, bck, BT_LOGICAL, dl, OPTIONAL);
2527
2528
  make_generic ("findloc", GFC_ISYM_FINDLOC, GFC_STD_F2008);
2529
2479
  add_sym_3red ("maxval", GFC_ISYM_MAXVAL, CLASS_TRANSFORMATIONAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_F95,
2530
  add_sym_3red ("maxval", GFC_ISYM_MAXVAL, CLASS_TRANSFORMATIONAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_F95,
2480
		gfc_check_minval_maxval, gfc_simplify_maxval, gfc_resolve_maxval,
2531
		gfc_check_minval_maxval, gfc_simplify_maxval, gfc_resolve_maxval,
2481
		ar, BT_REAL, dr, REQUIRED, dm, BT_INTEGER, ii, OPTIONAL,
2532
		ar, BT_REAL, dr, REQUIRED, dm, BT_INTEGER, ii, OPTIONAL,
Lines 4279-4285 check_arglist (gfc_actual_arglist **ap, gfc_intrin Link Here
4279
static void
4330
static void
4280
resolve_intrinsic (gfc_intrinsic_sym *specific, gfc_expr *e)
4331
resolve_intrinsic (gfc_intrinsic_sym *specific, gfc_expr *e)
4281
{
4332
{
4282
  gfc_expr *a1, *a2, *a3, *a4, *a5;
4333
  gfc_expr *a1, *a2, *a3, *a4, *a5, *a6;
4283
  gfc_actual_arglist *arg;
4334
  gfc_actual_arglist *arg;
4284
4335
4285
  if (specific->resolve.f1 == NULL)
4336
  if (specific->resolve.f1 == NULL)
Lines 4353-4358 resolve_intrinsic (gfc_intrinsic_sym *specific, gf Link Here
4353
      return;
4404
      return;
4354
    }
4405
    }
4355
4406
4407
  a6 = arg->expr;
4408
  arg = arg->next;
4409
4410
  if (arg == NULL)
4411
    {
4412
      (*specific->resolve.f6) (e, a1, a2, a3, a4, a5, a6);
4413
      return;
4414
    }
4415
4356
  gfc_internal_error ("resolve_intrinsic(): Too many args for intrinsic");
4416
  gfc_internal_error ("resolve_intrinsic(): Too many args for intrinsic");
4357
}
4417
}
4358
4418
Lines 4366-4372 resolve_intrinsic (gfc_intrinsic_sym *specific, gf Link Here
4366
static bool
4426
static bool
4367
do_simplify (gfc_intrinsic_sym *specific, gfc_expr *e)
4427
do_simplify (gfc_intrinsic_sym *specific, gfc_expr *e)
4368
{
4428
{
4369
  gfc_expr *result, *a1, *a2, *a3, *a4, *a5;
4429
  gfc_expr *result, *a1, *a2, *a3, *a4, *a5, *a6;
4370
  gfc_actual_arglist *arg;
4430
  gfc_actual_arglist *arg;
4371
4431
4372
  /* Max and min require special handling due to the variable number
4432
  /* Max and min require special handling due to the variable number
Lines 4447-4454 do_simplify (gfc_intrinsic_sym *specific, gfc_expr Link Here
4447
		  if (arg == NULL)
4507
		  if (arg == NULL)
4448
		    result = (*specific->simplify.f5) (a1, a2, a3, a4, a5);
4508
		    result = (*specific->simplify.f5) (a1, a2, a3, a4, a5);
4449
		  else
4509
		  else
4450
		    gfc_internal_error
4510
		    {
4451
		      ("do_simplify(): Too many args for intrinsic");
4511
		      a6 = arg->expr;
4512
		      arg = arg->next;
4513
4514
		      if (arg == NULL)
4515
			result = (*specific->simplify.f6)
4516
		       			(a1, a2, a3, a4, a5, a6);
4517
		      else
4518
			gfc_internal_error
4519
			  ("do_simplify(): Too many args for intrinsic");
4520
		    }
4452
		}
4521
		}
4453
	    }
4522
	    }
4454
	}
4523
	}
Lines 4528-4533 check_specific (gfc_intrinsic_sym *specific, gfc_e Link Here
4528
  if (specific->check.f5ml == gfc_check_minloc_maxloc)
4597
  if (specific->check.f5ml == gfc_check_minloc_maxloc)
4529
    /* This is special because we might have to reorder the argument list.  */
4598
    /* This is special because we might have to reorder the argument list.  */
4530
    t = gfc_check_minloc_maxloc (*ap);
4599
    t = gfc_check_minloc_maxloc (*ap);
4600
  else if (specific->check.f6fl == gfc_check_findloc)
4601
    t = gfc_check_findloc (*ap);
4531
  else if (specific->check.f3red == gfc_check_minval_maxval)
4602
  else if (specific->check.f3red == gfc_check_minval_maxval)
4532
    /* This is also special because we also might have to reorder the
4603
    /* This is also special because we also might have to reorder the
4533
       argument list.  */
4604
       argument list.  */
(-)gcc/fortran/intrinsic.h (-2 / +7 lines)
Lines 74-79 bool gfc_check_event_query (gfc_expr *, gfc_expr * Link Here
74
bool gfc_check_failed_or_stopped_images (gfc_expr *, gfc_expr *);
74
bool gfc_check_failed_or_stopped_images (gfc_expr *, gfc_expr *);
75
bool gfc_check_fgetputc (gfc_expr *, gfc_expr *);
75
bool gfc_check_fgetputc (gfc_expr *, gfc_expr *);
76
bool gfc_check_fgetput (gfc_expr *);
76
bool gfc_check_fgetput (gfc_expr *);
77
bool gfc_check_findloc (gfc_actual_arglist *);
77
bool gfc_check_float (gfc_expr *);
78
bool gfc_check_float (gfc_expr *);
78
bool gfc_check_fstat (gfc_expr *, gfc_expr *);
79
bool gfc_check_fstat (gfc_expr *, gfc_expr *);
79
bool gfc_check_ftell (gfc_expr *);
80
bool gfc_check_ftell (gfc_expr *);
Lines 299-304 gfc_expr *gfc_simplify_exp (gfc_expr *); Link Here
299
gfc_expr *gfc_simplify_exponent (gfc_expr *);
300
gfc_expr *gfc_simplify_exponent (gfc_expr *);
300
gfc_expr *gfc_simplify_extends_type_of (gfc_expr *, gfc_expr *);
301
gfc_expr *gfc_simplify_extends_type_of (gfc_expr *, gfc_expr *);
301
gfc_expr *gfc_simplify_failed_or_stopped_images (gfc_expr *, gfc_expr *);
302
gfc_expr *gfc_simplify_failed_or_stopped_images (gfc_expr *, gfc_expr *);
303
gfc_expr *gfc_simplify_findloc (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *,
304
				gfc_expr *, gfc_expr *);
302
gfc_expr *gfc_simplify_float (gfc_expr *);
305
gfc_expr *gfc_simplify_float (gfc_expr *);
303
gfc_expr *gfc_simplify_floor (gfc_expr *, gfc_expr *);
306
gfc_expr *gfc_simplify_floor (gfc_expr *, gfc_expr *);
304
gfc_expr *gfc_simplify_fraction (gfc_expr *);
307
gfc_expr *gfc_simplify_fraction (gfc_expr *);
Lines 488-493 void gfc_resolve_exponent (gfc_expr *, gfc_expr *) Link Here
488
void gfc_resolve_extends_type_of (gfc_expr *, gfc_expr *, gfc_expr *);
491
void gfc_resolve_extends_type_of (gfc_expr *, gfc_expr *, gfc_expr *);
489
void gfc_resolve_failed_images (gfc_expr *, gfc_expr *, gfc_expr *);
492
void gfc_resolve_failed_images (gfc_expr *, gfc_expr *, gfc_expr *);
490
void gfc_resolve_fdate (gfc_expr *);
493
void gfc_resolve_fdate (gfc_expr *);
494
void gfc_resolve_findloc (gfc_expr *,gfc_expr *, gfc_expr *, gfc_expr *,
495
			  gfc_expr *, gfc_expr *, gfc_expr *);
491
void gfc_resolve_floor (gfc_expr *, gfc_expr *, gfc_expr *);
496
void gfc_resolve_floor (gfc_expr *, gfc_expr *, gfc_expr *);
492
void gfc_resolve_fnum (gfc_expr *, gfc_expr *);
497
void gfc_resolve_fnum (gfc_expr *, gfc_expr *);
493
void gfc_resolve_fraction (gfc_expr *, gfc_expr *);
498
void gfc_resolve_fraction (gfc_expr *, gfc_expr *);
Lines 670-678 void gfc_resolve_umask_sub (gfc_code *); Link Here
670
void gfc_resolve_unlink_sub (gfc_code *);
675
void gfc_resolve_unlink_sub (gfc_code *);
671
676
672
677
673
/* The mvbits() subroutine requires the most arguments: five.  */
678
/* The findloc() subroutine requires the most arguments: six.  */
674
679
675
#define MAX_INTRINSIC_ARGS 5
680
#define MAX_INTRINSIC_ARGS 6
676
681
677
extern const char *gfc_current_intrinsic;
682
extern const char *gfc_current_intrinsic;
678
extern gfc_intrinsic_arg *gfc_current_intrinsic_arg[MAX_INTRINSIC_ARGS];
683
extern gfc_intrinsic_arg *gfc_current_intrinsic_arg[MAX_INTRINSIC_ARGS];
(-)gcc/fortran/iresolve.c (+97 lines)
Lines 1784-1789 gfc_resolve_maxloc (gfc_expr *f, gfc_expr *array, Link Here
1784
1784
1785
1785
1786
void
1786
void
1787
gfc_resolve_findloc (gfc_expr *f, gfc_expr *array, gfc_expr *value,
1788
		     gfc_expr *dim, gfc_expr *mask, gfc_expr *kind,
1789
		     gfc_expr *back)
1790
{
1791
  const char *name;
1792
  int i, j, idim;
1793
  int fkind;
1794
  int d_num;
1795
1796
  f->ts.type = BT_INTEGER;
1797
1798
  /* We have a single library version, which uses index_type.  */
1799
1800
  if (kind)
1801
    fkind = mpz_get_si (kind->value.integer);
1802
  else
1803
    fkind = gfc_default_integer_kind;
1804
1805
  f->ts.kind = gfc_index_integer_kind;
1806
1807
  /* Convert value.  If array is not LOGICAL and value is, we already
1808
     issued an error earlier.  */
1809
1810
  if ((array->ts.type != value->ts.type && value->ts.type != BT_LOGICAL)
1811
      || array->ts.kind != value->ts.kind)
1812
    gfc_convert_type_warn (value, &array->ts, 2, 0);
1813
1814
  if (dim == NULL)
1815
    {
1816
      f->rank = 1;
1817
      f->shape = gfc_get_shape (1);
1818
      mpz_init_set_si (f->shape[0], array->rank);
1819
    }
1820
  else
1821
    {
1822
      f->rank = array->rank - 1;
1823
      gfc_resolve_dim_arg (dim);
1824
      if (array->shape && dim->expr_type == EXPR_CONSTANT)
1825
	{
1826
	  idim = (int) mpz_get_si (dim->value.integer);
1827
	  f->shape = gfc_get_shape (f->rank);
1828
	  for (i = 0, j = 0; i < f->rank; i++, j++)
1829
	    {
1830
	      if (i == (idim - 1))
1831
		j++;
1832
	      mpz_init_set (f->shape[i], array->shape[j]);
1833
	    }
1834
	}
1835
    }
1836
1837
  if (mask)
1838
    {
1839
      if (mask->rank == 0)
1840
	name = "sfindloc";
1841
      else
1842
	name = "mfindloc";
1843
1844
      resolve_mask_arg (mask);
1845
    }
1846
  else
1847
    name = "findloc";
1848
1849
  if (dim)
1850
    {
1851
      if (array->ts.type != BT_CHARACTER || f->rank != 0)
1852
	d_num = 1;
1853
      else
1854
	d_num = 2;
1855
    }
1856
  else
1857
    d_num = 0;
1858
1859
  if (back->ts.kind != gfc_logical_4_kind)
1860
    {
1861
      gfc_typespec ts;
1862
      gfc_clear_ts (&ts);
1863
      ts.type = BT_LOGICAL;
1864
      ts.kind = gfc_logical_4_kind;
1865
      gfc_convert_type_warn (back, &ts, 2, 0);
1866
    }
1867
1868
  f->value.function.name =
1869
    gfc_get_string (PREFIX ("%s%d_%c%d"), name, d_num,
1870
		    gfc_type_letter (array->ts.type, true), array->ts.kind);
1871
1872
  if (f->ts.kind != fkind)
1873
    {
1874
      gfc_typespec ts;
1875
      gfc_clear_ts (&ts);
1876
1877
      ts.type = BT_INTEGER;
1878
      ts.kind = fkind;
1879
      gfc_convert_type_warn (f, &ts, 2, 0);
1880
    }
1881
}
1882
1883
void
1787
gfc_resolve_maxval (gfc_expr *f, gfc_expr *array, gfc_expr *dim,
1884
gfc_resolve_maxval (gfc_expr *f, gfc_expr *array, gfc_expr *dim,
1788
		    gfc_expr *mask)
1885
		    gfc_expr *mask)
1789
{
1886
{
(-)gcc/fortran/simplify.c (+7 lines)
Lines 5453-5458 gfc_simplify_maxloc (gfc_expr *array, gfc_expr *di Link Here
5453
}
5453
}
5454
5454
5455
gfc_expr *
5455
gfc_expr *
5456
gfc_simplify_findloc (gfc_expr *array ATTRIBUTE_UNUSED, gfc_expr *value ATTRIBUTE_UNUSED, gfc_expr *dim  ATTRIBUTE_UNUSED,
5457
		      gfc_expr *mask ATTRIBUTE_UNUSED, gfc_expr *kind ATTRIBUTE_UNUSED, gfc_expr *back ATTRIBUTE_UNUSED)
5458
{
5459
  return NULL;
5460
}
5461
5462
gfc_expr *
5456
gfc_simplify_maxexponent (gfc_expr *x)
5463
gfc_simplify_maxexponent (gfc_expr *x)
5457
{
5464
{
5458
  int i = gfc_validate_kind (BT_REAL, x->ts.kind, false);
5465
  int i = gfc_validate_kind (BT_REAL, x->ts.kind, false);
(-)gcc/fortran/trans-intrinsic.c (+48 lines)
Lines 5177-5182 gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_exp Link Here
5177
  se->expr = convert (type, pos);
5177
  se->expr = convert (type, pos);
5178
}
5178
}
5179
5179
5180
/* Emit code for findloc.  For now, only library calls.  */
5181
5182
static void
5183
gfc_conv_intrinsic_findloc (gfc_se *se, gfc_expr *expr)
5184
{
5185
  gfc_actual_arglist *array_arg, *value_arg, *dim_arg, *mask_arg,
5186
    *kind_arg, *back_arg;
5187
5188
  gfc_expr *value_expr;
5189
5190
  array_arg = expr->value.function.actual;
5191
  value_arg = array_arg->next;
5192
  dim_arg   = value_arg->next;
5193
  mask_arg  = dim_arg->next;
5194
  kind_arg  = mask_arg->next;
5195
  back_arg  = kind_arg->next;
5196
5197
  /* Remove kind.  */
5198
  if (kind_arg->expr)
5199
    {
5200
      gfc_free_expr (kind_arg->expr);
5201
      kind_arg->expr = NULL;
5202
    }
5203
5204
  value_expr = value_arg->expr;
5205
5206
  /* Unless it's a string, pass VALUE by value.  */
5207
  if (value_expr->ts.type != BT_CHARACTER)
5208
    value_arg->name = "%VAL";
5209
5210
  /* Pass BACK argument by value.  */
5211
  back_arg->name = "%VAL";
5212
5213
  if (se->ss)
5214
    {
5215
      gfc_conv_intrinsic_funcall (se, expr);
5216
      return;
5217
    }
5218
5219
  /* Later... */
5220
  gcc_unreachable ();
5221
}
5222
5180
/* Emit code for minval or maxval intrinsic.  There are many different cases
5223
/* Emit code for minval or maxval intrinsic.  There are many different cases
5181
   we need to handle.  For performance reasons we sometimes create two
5224
   we need to handle.  For performance reasons we sometimes create two
5182
   loops instead of one, where the second one is much simpler.
5225
   loops instead of one, where the second one is much simpler.
Lines 9016-9021 gfc_conv_intrinsic_function (gfc_se * se, gfc_expr Link Here
9016
	      conv_generic_with_optional_char_arg (se, expr, 1, 3);
9059
	      conv_generic_with_optional_char_arg (se, expr, 1, 3);
9017
	      break;
9060
	      break;
9018
9061
9062
	    case GFC_ISYM_FINDLOC:
9063
	      gfc_conv_intrinsic_findloc (se, expr);
9064
	      break;
9065
9019
	    case GFC_ISYM_MINLOC:
9066
	    case GFC_ISYM_MINLOC:
9020
	      gfc_conv_intrinsic_minmaxloc (se, expr, LT_EXPR);
9067
	      gfc_conv_intrinsic_minmaxloc (se, expr, LT_EXPR);
9021
	      break;
9068
	      break;
Lines 9934-9939 gfc_is_intrinsic_libcall (gfc_expr * expr) Link Here
9934
    case GFC_ISYM_ALL:
9981
    case GFC_ISYM_ALL:
9935
    case GFC_ISYM_ANY:
9982
    case GFC_ISYM_ANY:
9936
    case GFC_ISYM_COUNT:
9983
    case GFC_ISYM_COUNT:
9984
    case GFC_ISYM_FINDLOC:
9937
    case GFC_ISYM_JN2:
9985
    case GFC_ISYM_JN2:
9938
    case GFC_ISYM_IANY:
9986
    case GFC_ISYM_IANY:
9939
    case GFC_ISYM_IALL:
9987
    case GFC_ISYM_IALL:
(-)libgfortran/Makefile.am (-2 / +28 lines)
Lines 266-271 $(srcdir)/generated/iparity_i4.c \ Link Here
266
$(srcdir)/generated/iparity_i8.c \
266
$(srcdir)/generated/iparity_i8.c \
267
$(srcdir)/generated/iparity_i16.c
267
$(srcdir)/generated/iparity_i16.c
268
268
269
i_findloc0_c= \
270
$(srcdir)/generated/findloc0_i1.c \
271
$(srcdir)/generated/findloc0_i2.c \
272
$(srcdir)/generated/findloc0_i4.c \
273
$(srcdir)/generated/findloc0_i8.c \
274
$(srcdir)/generated/findloc0_i16.c \
275
$(srcdir)/generated/findloc0_r4.c \
276
$(srcdir)/generated/findloc0_r8.c \
277
$(srcdir)/generated/findloc0_r16.c \
278
$(srcdir)/generated/findloc0_c4.c \
279
$(srcdir)/generated/findloc0_c8.c \
280
$(srcdir)/generated/findloc0_c16.c
281
282
i_findloc0s_c = \
283
$(srcdir)/generated/findloc0_s1.c \
284
$(srcdir)/generated/findloc0_s4.c
285
269
i_maxloc0_c= \
286
i_maxloc0_c= \
270
$(srcdir)/generated/maxloc0_4_i1.c \
287
$(srcdir)/generated/maxloc0_4_i1.c \
271
$(srcdir)/generated/maxloc0_8_i1.c \
288
$(srcdir)/generated/maxloc0_8_i1.c \
Lines 754-760 m4_files= m4/iparm.m4 m4/ifunction.m4 m4/iforeach. Link Here
754
    m4/pow.m4 \
771
    m4/pow.m4 \
755
    m4/misc_specifics.m4 m4/pack.m4 \
772
    m4/misc_specifics.m4 m4/pack.m4 \
756
    m4/unpack.m4 m4/spread.m4 m4/bessel.m4 m4/norm2.m4 m4/parity.m4 \
773
    m4/unpack.m4 m4/spread.m4 m4/bessel.m4 m4/norm2.m4 m4/parity.m4 \
757
    m4/iall.m4 m4/iany.m4 m4/iparity.m4 m4/iforeach-s.m4
774
    m4/iall.m4 m4/iany.m4 m4/iparity.m4 m4/iforeach-s.m4 m4/findloc0.m4 \
775
    m4/findloc0s.m4
758
776
759
gfor_built_src= $(i_all_c) $(i_any_c) $(i_count_c) $(i_maxloc0_c) \
777
gfor_built_src= $(i_all_c) $(i_any_c) $(i_count_c) $(i_maxloc0_c) \
760
    $(i_maxloc1_c) $(i_maxval_c) $(i_minloc0_c) $(i_minloc1_c) $(i_minval_c) \
778
    $(i_maxloc1_c) $(i_maxval_c) $(i_minloc0_c) $(i_minloc1_c) $(i_minval_c) \
Lines 767-773 gfor_built_src= $(i_all_c) $(i_any_c) $(i_count_c) Link Here
767
    $(i_cshift0_c) kinds.inc c99_protos.inc fpu-target.h fpu-target.inc \
785
    $(i_cshift0_c) kinds.inc c99_protos.inc fpu-target.h fpu-target.inc \
768
    $(i_cshift1a_c) $(i_maxloc0s_c) $(i_minloc0s_c) $(i_maxloc1s_c) \
786
    $(i_cshift1a_c) $(i_maxloc0s_c) $(i_minloc0s_c) $(i_maxloc1s_c) \
769
    $(i_minloc1s_c) $(i_maxloc2s_c) $(i_minloc2s_c) $(i_maxvals_c) \
787
    $(i_minloc1s_c) $(i_maxloc2s_c) $(i_minloc2s_c) $(i_maxvals_c) \
770
    $(i_maxval0s_c) $(i_minval0s_c) $(i_maxval1s_c) $(i_minval1s_c)
788
    $(i_maxval0s_c) $(i_minval0s_c) $(i_maxval1s_c) $(i_minval1s_c) \
789
    $(i_findloc0_c) $(i_findloc0s_c)
771
790
772
# Machine generated specifics
791
# Machine generated specifics
773
gfor_built_specific_src= \
792
gfor_built_specific_src= \
Lines 995-1000 I_M4_DEPS3=$(I_M4_DEPS) m4/iforeach-s.m4 Link Here
995
I_M4_DEPS4=$(I_M4_DEPS) m4/ifunction-s.m4
1014
I_M4_DEPS4=$(I_M4_DEPS) m4/ifunction-s.m4
996
I_M4_DEPS5=$(I_M4_DEPS) m4/iforeach-s2.m4
1015
I_M4_DEPS5=$(I_M4_DEPS) m4/iforeach-s2.m4
997
I_M4_DEPS6=$(I_M4_DEPS) m4/ifunction-s2.m4
1016
I_M4_DEPS6=$(I_M4_DEPS) m4/ifunction-s2.m4
1017
I_M4_DEPS7=$(I_M4_DEPS) m4/ifindloc0.m4
998
1018
999
kinds.h: $(srcdir)/mk-kinds-h.sh
1019
kinds.h: $(srcdir)/mk-kinds-h.sh
1000
	$(SHELL) $(srcdir)/mk-kinds-h.sh '$(FCCOMPILE)' > $@ || rm $@
1020
	$(SHELL) $(srcdir)/mk-kinds-h.sh '$(FCCOMPILE)' > $@ || rm $@
Lines 1034-1039 $(i_any_c): m4/any.m4 $(I_M4_DEPS2) Link Here
1034
$(i_count_c): m4/count.m4 $(I_M4_DEPS2)
1054
$(i_count_c): m4/count.m4 $(I_M4_DEPS2)
1035
	$(M4) -Dfile=$@ -I$(srcdir)/m4 count.m4 > $@
1055
	$(M4) -Dfile=$@ -I$(srcdir)/m4 count.m4 > $@
1036
1056
1057
$(i_findloc0_c): m4/findloc0.m4 $(I_M4_DEPS7)
1058
	$(M4) -Dfile=$@ -I$(srcdir)/m4 findloc0.m4 > $@
1059
1060
$(i_findloc0s_c): m4/findloc0s.m4 $(I_M4_DEPS7)
1061
	$(M4) -Dfile=$@ -I$(srcdir)/m4 findloc0s.m4 > $@
1062
1037
$(i_iall_c): m4/iall.m4 $(I_M4_DEPS1)
1063
$(i_iall_c): m4/iall.m4 $(I_M4_DEPS1)
1038
	$(M4) -Dfile=$@ -I$(srcdir)/m4 iall.m4 > $@
1064
	$(M4) -Dfile=$@ -I$(srcdir)/m4 iall.m4 > $@
1039
1065
(-)libgfortran/Makefile.in (-20 / +154 lines)
Lines 334-340 am__objects_43 = maxval0_s1.lo maxval0_s4.lo Link Here
334
am__objects_44 = minval0_s1.lo minval0_s4.lo
334
am__objects_44 = minval0_s1.lo minval0_s4.lo
335
am__objects_45 = maxval1_s1.lo maxval1_s4.lo
335
am__objects_45 = maxval1_s1.lo maxval1_s4.lo
336
am__objects_46 = minval1_s1.lo minval1_s4.lo
336
am__objects_46 = minval1_s1.lo minval1_s4.lo
337
am__objects_47 = $(am__objects_4) $(am__objects_5) $(am__objects_6) \
337
am__objects_47 = findloc0_i1.lo findloc0_i2.lo findloc0_i4.lo \
338
	findloc0_i8.lo findloc0_i16.lo findloc0_r4.lo findloc0_r8.lo \
339
	findloc0_r16.lo findloc0_c4.lo findloc0_c8.lo findloc0_c16.lo
340
am__objects_48 = findloc0_s1.lo findloc0_s4.lo
341
am__objects_49 = $(am__objects_4) $(am__objects_5) $(am__objects_6) \
338
	$(am__objects_7) $(am__objects_8) $(am__objects_9) \
342
	$(am__objects_7) $(am__objects_8) $(am__objects_9) \
339
	$(am__objects_10) $(am__objects_11) $(am__objects_12) \
343
	$(am__objects_10) $(am__objects_11) $(am__objects_12) \
340
	$(am__objects_13) $(am__objects_14) $(am__objects_15) \
344
	$(am__objects_13) $(am__objects_14) $(am__objects_15) \
Lines 348-361 am__objects_46 = minval1_s1.lo minval1_s4.lo Link Here
348
	$(am__objects_37) $(am__objects_38) $(am__objects_39) \
352
	$(am__objects_37) $(am__objects_38) $(am__objects_39) \
349
	$(am__objects_40) $(am__objects_41) $(am__objects_42) \
353
	$(am__objects_40) $(am__objects_41) $(am__objects_42) \
350
	$(am__objects_43) $(am__objects_44) $(am__objects_45) \
354
	$(am__objects_43) $(am__objects_44) $(am__objects_45) \
351
	$(am__objects_46)
355
	$(am__objects_46) $(am__objects_47) $(am__objects_48)
352
@LIBGFOR_MINIMAL_FALSE@am__objects_48 = close.lo file_pos.lo format.lo \
356
@LIBGFOR_MINIMAL_FALSE@am__objects_50 = close.lo file_pos.lo format.lo \
353
@LIBGFOR_MINIMAL_FALSE@	inquire.lo intrinsics.lo list_read.lo \
357
@LIBGFOR_MINIMAL_FALSE@	inquire.lo intrinsics.lo list_read.lo \
354
@LIBGFOR_MINIMAL_FALSE@	lock.lo open.lo read.lo transfer.lo \
358
@LIBGFOR_MINIMAL_FALSE@	lock.lo open.lo read.lo transfer.lo \
355
@LIBGFOR_MINIMAL_FALSE@	transfer128.lo unit.lo unix.lo write.lo \
359
@LIBGFOR_MINIMAL_FALSE@	transfer128.lo unit.lo unix.lo write.lo \
356
@LIBGFOR_MINIMAL_FALSE@	fbuf.lo async.lo
360
@LIBGFOR_MINIMAL_FALSE@	fbuf.lo async.lo
357
am__objects_49 = size_from_kind.lo $(am__objects_48)
361
am__objects_51 = size_from_kind.lo $(am__objects_50)
358
@LIBGFOR_MINIMAL_FALSE@am__objects_50 = access.lo c99_functions.lo \
362
@LIBGFOR_MINIMAL_FALSE@am__objects_52 = access.lo c99_functions.lo \
359
@LIBGFOR_MINIMAL_FALSE@	chdir.lo chmod.lo clock.lo cpu_time.lo \
363
@LIBGFOR_MINIMAL_FALSE@	chdir.lo chmod.lo clock.lo cpu_time.lo \
360
@LIBGFOR_MINIMAL_FALSE@	ctime.lo date_and_time.lo dtime.lo \
364
@LIBGFOR_MINIMAL_FALSE@	ctime.lo date_and_time.lo dtime.lo \
361
@LIBGFOR_MINIMAL_FALSE@	env.lo etime.lo execute_command_line.lo \
365
@LIBGFOR_MINIMAL_FALSE@	env.lo etime.lo execute_command_line.lo \
Lines 365-372 am__objects_46 = minval1_s1.lo minval1_s4.lo Link Here
365
@LIBGFOR_MINIMAL_FALSE@	rename.lo stat.lo symlnk.lo \
369
@LIBGFOR_MINIMAL_FALSE@	rename.lo stat.lo symlnk.lo \
366
@LIBGFOR_MINIMAL_FALSE@	system_clock.lo time.lo umask.lo \
370
@LIBGFOR_MINIMAL_FALSE@	system_clock.lo time.lo umask.lo \
367
@LIBGFOR_MINIMAL_FALSE@	unlink.lo
371
@LIBGFOR_MINIMAL_FALSE@	unlink.lo
368
@IEEE_SUPPORT_TRUE@am__objects_51 = ieee_helper.lo
372
@IEEE_SUPPORT_TRUE@am__objects_53 = ieee_helper.lo
369
am__objects_52 = associated.lo abort.lo args.lo cshift0.lo eoshift0.lo \
373
am__objects_54 = associated.lo abort.lo args.lo cshift0.lo eoshift0.lo \
370
	eoshift2.lo erfc_scaled.lo extends_type_of.lo fnum.lo \
374
	eoshift2.lo erfc_scaled.lo extends_type_of.lo fnum.lo \
371
	ierrno.lo ishftc.lo mvbits.lo move_alloc.lo pack_generic.lo \
375
	ierrno.lo ishftc.lo mvbits.lo move_alloc.lo pack_generic.lo \
372
	selected_char_kind.lo size.lo spread_generic.lo \
376
	selected_char_kind.lo size.lo spread_generic.lo \
Lines 373-383 am__objects_46 = minval1_s1.lo minval1_s4.lo Link Here
373
	string_intrinsics.lo rand.lo random.lo reshape_generic.lo \
377
	string_intrinsics.lo rand.lo random.lo reshape_generic.lo \
374
	reshape_packed.lo selected_int_kind.lo selected_real_kind.lo \
378
	reshape_packed.lo selected_int_kind.lo selected_real_kind.lo \
375
	unpack_generic.lo in_pack_generic.lo in_unpack_generic.lo \
379
	unpack_generic.lo in_pack_generic.lo in_unpack_generic.lo \
376
	$(am__objects_50) $(am__objects_51)
380
	$(am__objects_52) $(am__objects_53)
377
@IEEE_SUPPORT_TRUE@am__objects_53 = ieee_arithmetic.lo \
381
@IEEE_SUPPORT_TRUE@am__objects_55 = ieee_arithmetic.lo \
378
@IEEE_SUPPORT_TRUE@	ieee_exceptions.lo ieee_features.lo
382
@IEEE_SUPPORT_TRUE@	ieee_exceptions.lo ieee_features.lo
379
am__objects_54 =
383
am__objects_56 =
380
am__objects_55 = _abs_c4.lo _abs_c8.lo _abs_c10.lo _abs_c16.lo \
384
am__objects_57 = _abs_c4.lo _abs_c8.lo _abs_c10.lo _abs_c16.lo \
381
	_abs_i4.lo _abs_i8.lo _abs_i16.lo _abs_r4.lo _abs_r8.lo \
385
	_abs_i4.lo _abs_i8.lo _abs_i16.lo _abs_r4.lo _abs_r8.lo \
382
	_abs_r10.lo _abs_r16.lo _aimag_c4.lo _aimag_c8.lo \
386
	_abs_r10.lo _abs_r16.lo _aimag_c4.lo _aimag_c8.lo \
383
	_aimag_c10.lo _aimag_c16.lo _exp_r4.lo _exp_r8.lo _exp_r10.lo \
387
	_aimag_c10.lo _aimag_c16.lo _exp_r4.lo _exp_r8.lo _exp_r10.lo \
Lines 401-419 am__objects_46 = minval1_s1.lo minval1_s4.lo Link Here
401
	_conjg_c4.lo _conjg_c8.lo _conjg_c10.lo _conjg_c16.lo \
405
	_conjg_c4.lo _conjg_c8.lo _conjg_c10.lo _conjg_c16.lo \
402
	_aint_r4.lo _aint_r8.lo _aint_r10.lo _aint_r16.lo _anint_r4.lo \
406
	_aint_r4.lo _aint_r8.lo _aint_r10.lo _aint_r16.lo _anint_r4.lo \
403
	_anint_r8.lo _anint_r10.lo _anint_r16.lo
407
	_anint_r8.lo _anint_r10.lo _anint_r16.lo
404
am__objects_56 = _sign_i4.lo _sign_i8.lo _sign_i16.lo _sign_r4.lo \
408
am__objects_58 = _sign_i4.lo _sign_i8.lo _sign_i16.lo _sign_r4.lo \
405
	_sign_r8.lo _sign_r10.lo _sign_r16.lo _dim_i4.lo _dim_i8.lo \
409
	_sign_r8.lo _sign_r10.lo _sign_r16.lo _dim_i4.lo _dim_i8.lo \
406
	_dim_i16.lo _dim_r4.lo _dim_r8.lo _dim_r10.lo _dim_r16.lo \
410
	_dim_i16.lo _dim_r4.lo _dim_r8.lo _dim_r10.lo _dim_r16.lo \
407
	_atan2_r4.lo _atan2_r8.lo _atan2_r10.lo _atan2_r16.lo \
411
	_atan2_r4.lo _atan2_r8.lo _atan2_r10.lo _atan2_r16.lo \
408
	_mod_i4.lo _mod_i8.lo _mod_i16.lo _mod_r4.lo _mod_r8.lo \
412
	_mod_i4.lo _mod_i8.lo _mod_i16.lo _mod_r4.lo _mod_r8.lo \
409
	_mod_r10.lo _mod_r16.lo
413
	_mod_r10.lo _mod_r16.lo
410
am__objects_57 = misc_specifics.lo
414
am__objects_59 = misc_specifics.lo
411
am__objects_58 = $(am__objects_55) $(am__objects_56) $(am__objects_57) \
415
am__objects_60 = $(am__objects_57) $(am__objects_58) $(am__objects_59) \
412
	dprod_r8.lo f2c_specifics.lo random_init.lo
416
	dprod_r8.lo f2c_specifics.lo random_init.lo
413
am__objects_59 = $(am__objects_3) $(am__objects_47) $(am__objects_49) \
417
am__objects_61 = $(am__objects_3) $(am__objects_49) $(am__objects_51) \
414
	$(am__objects_52) $(am__objects_53) $(am__objects_54) \
418
	$(am__objects_54) $(am__objects_55) $(am__objects_56) \
415
	$(am__objects_58)
419
	$(am__objects_60)
416
@onestep_FALSE@am_libgfortran_la_OBJECTS = $(am__objects_59)
420
@onestep_FALSE@am_libgfortran_la_OBJECTS = $(am__objects_61)
417
@onestep_TRUE@am_libgfortran_la_OBJECTS = libgfortran_c.lo
421
@onestep_TRUE@am_libgfortran_la_OBJECTS = libgfortran_c.lo
418
libgfortran_la_OBJECTS = $(am_libgfortran_la_OBJECTS)
422
libgfortran_la_OBJECTS = $(am_libgfortran_la_OBJECTS)
419
DEFAULT_INCLUDES = -I.@am__isrc@
423
DEFAULT_INCLUDES = -I.@am__isrc@
Lines 725-730 $(srcdir)/generated/iparity_i4.c \ Link Here
725
$(srcdir)/generated/iparity_i8.c \
729
$(srcdir)/generated/iparity_i8.c \
726
$(srcdir)/generated/iparity_i16.c
730
$(srcdir)/generated/iparity_i16.c
727
731
732
i_findloc0_c = \
733
$(srcdir)/generated/findloc0_i1.c \
734
$(srcdir)/generated/findloc0_i2.c \
735
$(srcdir)/generated/findloc0_i4.c \
736
$(srcdir)/generated/findloc0_i8.c \
737
$(srcdir)/generated/findloc0_i16.c \
738
$(srcdir)/generated/findloc0_r4.c \
739
$(srcdir)/generated/findloc0_r8.c \
740
$(srcdir)/generated/findloc0_r16.c \
741
$(srcdir)/generated/findloc0_c4.c \
742
$(srcdir)/generated/findloc0_c8.c \
743
$(srcdir)/generated/findloc0_c16.c
744
745
i_findloc0s_c = \
746
$(srcdir)/generated/findloc0_s1.c \
747
$(srcdir)/generated/findloc0_s4.c
748
728
i_maxloc0_c = \
749
i_maxloc0_c = \
729
$(srcdir)/generated/maxloc0_4_i1.c \
750
$(srcdir)/generated/maxloc0_4_i1.c \
730
$(srcdir)/generated/maxloc0_8_i1.c \
751
$(srcdir)/generated/maxloc0_8_i1.c \
Lines 1213-1219 m4_files = m4/iparm.m4 m4/ifunction.m4 m4/iforeach Link Here
1213
    m4/pow.m4 \
1234
    m4/pow.m4 \
1214
    m4/misc_specifics.m4 m4/pack.m4 \
1235
    m4/misc_specifics.m4 m4/pack.m4 \
1215
    m4/unpack.m4 m4/spread.m4 m4/bessel.m4 m4/norm2.m4 m4/parity.m4 \
1236
    m4/unpack.m4 m4/spread.m4 m4/bessel.m4 m4/norm2.m4 m4/parity.m4 \
1216
    m4/iall.m4 m4/iany.m4 m4/iparity.m4 m4/iforeach-s.m4
1237
    m4/iall.m4 m4/iany.m4 m4/iparity.m4 m4/iforeach-s.m4 m4/findloc0.m4 \
1238
    m4/findloc0s.m4
1217
1239
1218
gfor_built_src = $(i_all_c) $(i_any_c) $(i_count_c) $(i_maxloc0_c) \
1240
gfor_built_src = $(i_all_c) $(i_any_c) $(i_count_c) $(i_maxloc0_c) \
1219
    $(i_maxloc1_c) $(i_maxval_c) $(i_minloc0_c) $(i_minloc1_c) $(i_minval_c) \
1241
    $(i_maxloc1_c) $(i_maxval_c) $(i_minloc0_c) $(i_minloc1_c) $(i_minval_c) \
Lines 1226-1232 gfor_built_src = $(i_all_c) $(i_any_c) $(i_count_c Link Here
1226
    $(i_cshift0_c) kinds.inc c99_protos.inc fpu-target.h fpu-target.inc \
1248
    $(i_cshift0_c) kinds.inc c99_protos.inc fpu-target.h fpu-target.inc \
1227
    $(i_cshift1a_c) $(i_maxloc0s_c) $(i_minloc0s_c) $(i_maxloc1s_c) \
1249
    $(i_cshift1a_c) $(i_maxloc0s_c) $(i_minloc0s_c) $(i_maxloc1s_c) \
1228
    $(i_minloc1s_c) $(i_maxloc2s_c) $(i_minloc2s_c) $(i_maxvals_c) \
1250
    $(i_minloc1s_c) $(i_maxloc2s_c) $(i_minloc2s_c) $(i_maxvals_c) \
1229
    $(i_maxval0s_c) $(i_minval0s_c) $(i_maxval1s_c) $(i_minval1s_c)
1251
    $(i_maxval0s_c) $(i_minval0s_c) $(i_maxval1s_c) $(i_minval1s_c) \
1252
    $(i_findloc0_c) $(i_findloc0s_c)
1230
1253
1231
1254
1232
# Machine generated specifics
1255
# Machine generated specifics
Lines 1407-1412 I_M4_DEPS3 = $(I_M4_DEPS) m4/iforeach-s.m4 Link Here
1407
I_M4_DEPS4 = $(I_M4_DEPS) m4/ifunction-s.m4
1430
I_M4_DEPS4 = $(I_M4_DEPS) m4/ifunction-s.m4
1408
I_M4_DEPS5 = $(I_M4_DEPS) m4/iforeach-s2.m4
1431
I_M4_DEPS5 = $(I_M4_DEPS) m4/iforeach-s2.m4
1409
I_M4_DEPS6 = $(I_M4_DEPS) m4/ifunction-s2.m4
1432
I_M4_DEPS6 = $(I_M4_DEPS) m4/ifunction-s2.m4
1433
I_M4_DEPS7 = $(I_M4_DEPS) m4/ifindloc0.m4
1410
EXTRA_DIST = $(m4_files)
1434
EXTRA_DIST = $(m4_files)
1411
all: $(BUILT_SOURCES) config.h
1435
all: $(BUILT_SOURCES) config.h
1412
	$(MAKE) $(AM_MAKEFLAGS) all-am
1436
	$(MAKE) $(AM_MAKEFLAGS) all-am
Lines 1650-1655 distclean-compile: Link Here
1650
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extends_type_of.Plo@am__quote@
1674
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extends_type_of.Plo@am__quote@
1651
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbuf.Plo@am__quote@
1675
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbuf.Plo@am__quote@
1652
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_pos.Plo@am__quote@
1676
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_pos.Plo@am__quote@
1677
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_c16.Plo@am__quote@
1678
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_c4.Plo@am__quote@
1679
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_c8.Plo@am__quote@
1680
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_i1.Plo@am__quote@
1681
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_i16.Plo@am__quote@
1682
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_i2.Plo@am__quote@
1683
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_i4.Plo@am__quote@
1684
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_i8.Plo@am__quote@
1685
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_r16.Plo@am__quote@
1686
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_r4.Plo@am__quote@
1687
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_r8.Plo@am__quote@
1688
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_s1.Plo@am__quote@
1689
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findloc0_s4.Plo@am__quote@
1653
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnum.Plo@am__quote@
1690
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnum.Plo@am__quote@
1654
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/format.Plo@am__quote@
1691
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/format.Plo@am__quote@
1655
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpu.Plo@am__quote@
1692
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpu.Plo@am__quote@
Lines 5705-5710 minval1_s4.lo: $(srcdir)/generated/minval1_s4.c Link Here
5705
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
5742
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
5706
@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minval1_s4.lo `test -f '$(srcdir)/generated/minval1_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval1_s4.c
5743
@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o minval1_s4.lo `test -f '$(srcdir)/generated/minval1_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/minval1_s4.c
5707
5744
5745
findloc0_i1.lo: $(srcdir)/generated/findloc0_i1.c
5746
@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_i1.lo -MD -MP -MF $(DEPDIR)/findloc0_i1.Tpo -c -o findloc0_i1.lo `test -f '$(srcdir)/generated/findloc0_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i1.c
5747
@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/findloc0_i1.Tpo $(DEPDIR)/findloc0_i1.Plo
5748
@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(srcdir)/generated/findloc0_i1.c' object='findloc0_i1.lo' libtool=yes @AMDEPBACKSLASH@
5749
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
5750
@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_i1.lo `test -f '$(srcdir)/generated/findloc0_i1.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i1.c
5751
5752
findloc0_i2.lo: $(srcdir)/generated/findloc0_i2.c
5753
@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_i2.lo -MD -MP -MF $(DEPDIR)/findloc0_i2.Tpo -c -o findloc0_i2.lo `test -f '$(srcdir)/generated/findloc0_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i2.c
5754
@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/findloc0_i2.Tpo $(DEPDIR)/findloc0_i2.Plo
5755
@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(srcdir)/generated/findloc0_i2.c' object='findloc0_i2.lo' libtool=yes @AMDEPBACKSLASH@
5756
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
5757
@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_i2.lo `test -f '$(srcdir)/generated/findloc0_i2.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i2.c
5758
5759
findloc0_i4.lo: $(srcdir)/generated/findloc0_i4.c
5760
@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_i4.lo -MD -MP -MF $(DEPDIR)/findloc0_i4.Tpo -c -o findloc0_i4.lo `test -f '$(srcdir)/generated/findloc0_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i4.c
5761
@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/findloc0_i4.Tpo $(DEPDIR)/findloc0_i4.Plo
5762
@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(srcdir)/generated/findloc0_i4.c' object='findloc0_i4.lo' libtool=yes @AMDEPBACKSLASH@
5763
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
5764
@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_i4.lo `test -f '$(srcdir)/generated/findloc0_i4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i4.c
5765
5766
findloc0_i8.lo: $(srcdir)/generated/findloc0_i8.c
5767
@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_i8.lo -MD -MP -MF $(DEPDIR)/findloc0_i8.Tpo -c -o findloc0_i8.lo `test -f '$(srcdir)/generated/findloc0_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i8.c
5768
@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/findloc0_i8.Tpo $(DEPDIR)/findloc0_i8.Plo
5769
@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(srcdir)/generated/findloc0_i8.c' object='findloc0_i8.lo' libtool=yes @AMDEPBACKSLASH@
5770
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
5771
@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_i8.lo `test -f '$(srcdir)/generated/findloc0_i8.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i8.c
5772
5773
findloc0_i16.lo: $(srcdir)/generated/findloc0_i16.c
5774
@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_i16.lo -MD -MP -MF $(DEPDIR)/findloc0_i16.Tpo -c -o findloc0_i16.lo `test -f '$(srcdir)/generated/findloc0_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i16.c
5775
@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/findloc0_i16.Tpo $(DEPDIR)/findloc0_i16.Plo
5776
@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(srcdir)/generated/findloc0_i16.c' object='findloc0_i16.lo' libtool=yes @AMDEPBACKSLASH@
5777
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
5778
@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_i16.lo `test -f '$(srcdir)/generated/findloc0_i16.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_i16.c
5779
5780
findloc0_r4.lo: $(srcdir)/generated/findloc0_r4.c
5781
@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_r4.lo -MD -MP -MF $(DEPDIR)/findloc0_r4.Tpo -c -o findloc0_r4.lo `test -f '$(srcdir)/generated/findloc0_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_r4.c
5782
@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/findloc0_r4.Tpo $(DEPDIR)/findloc0_r4.Plo
5783
@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(srcdir)/generated/findloc0_r4.c' object='findloc0_r4.lo' libtool=yes @AMDEPBACKSLASH@
5784
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
5785
@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_r4.lo `test -f '$(srcdir)/generated/findloc0_r4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_r4.c
5786
5787
findloc0_r8.lo: $(srcdir)/generated/findloc0_r8.c
5788
@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_r8.lo -MD -MP -MF $(DEPDIR)/findloc0_r8.Tpo -c -o findloc0_r8.lo `test -f '$(srcdir)/generated/findloc0_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_r8.c
5789
@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/findloc0_r8.Tpo $(DEPDIR)/findloc0_r8.Plo
5790
@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(srcdir)/generated/findloc0_r8.c' object='findloc0_r8.lo' libtool=yes @AMDEPBACKSLASH@
5791
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
5792
@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_r8.lo `test -f '$(srcdir)/generated/findloc0_r8.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_r8.c
5793
5794
findloc0_r16.lo: $(srcdir)/generated/findloc0_r16.c
5795
@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_r16.lo -MD -MP -MF $(DEPDIR)/findloc0_r16.Tpo -c -o findloc0_r16.lo `test -f '$(srcdir)/generated/findloc0_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_r16.c
5796
@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/findloc0_r16.Tpo $(DEPDIR)/findloc0_r16.Plo
5797
@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(srcdir)/generated/findloc0_r16.c' object='findloc0_r16.lo' libtool=yes @AMDEPBACKSLASH@
5798
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
5799
@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_r16.lo `test -f '$(srcdir)/generated/findloc0_r16.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_r16.c
5800
5801
findloc0_c4.lo: $(srcdir)/generated/findloc0_c4.c
5802
@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_c4.lo -MD -MP -MF $(DEPDIR)/findloc0_c4.Tpo -c -o findloc0_c4.lo `test -f '$(srcdir)/generated/findloc0_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_c4.c
5803
@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/findloc0_c4.Tpo $(DEPDIR)/findloc0_c4.Plo
5804
@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(srcdir)/generated/findloc0_c4.c' object='findloc0_c4.lo' libtool=yes @AMDEPBACKSLASH@
5805
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
5806
@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_c4.lo `test -f '$(srcdir)/generated/findloc0_c4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_c4.c
5807
5808
findloc0_c8.lo: $(srcdir)/generated/findloc0_c8.c
5809
@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_c8.lo -MD -MP -MF $(DEPDIR)/findloc0_c8.Tpo -c -o findloc0_c8.lo `test -f '$(srcdir)/generated/findloc0_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_c8.c
5810
@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/findloc0_c8.Tpo $(DEPDIR)/findloc0_c8.Plo
5811
@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(srcdir)/generated/findloc0_c8.c' object='findloc0_c8.lo' libtool=yes @AMDEPBACKSLASH@
5812
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
5813
@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_c8.lo `test -f '$(srcdir)/generated/findloc0_c8.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_c8.c
5814
5815
findloc0_c16.lo: $(srcdir)/generated/findloc0_c16.c
5816
@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_c16.lo -MD -MP -MF $(DEPDIR)/findloc0_c16.Tpo -c -o findloc0_c16.lo `test -f '$(srcdir)/generated/findloc0_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_c16.c
5817
@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/findloc0_c16.Tpo $(DEPDIR)/findloc0_c16.Plo
5818
@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(srcdir)/generated/findloc0_c16.c' object='findloc0_c16.lo' libtool=yes @AMDEPBACKSLASH@
5819
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
5820
@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_c16.lo `test -f '$(srcdir)/generated/findloc0_c16.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_c16.c
5821
5822
findloc0_s1.lo: $(srcdir)/generated/findloc0_s1.c
5823
@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_s1.lo -MD -MP -MF $(DEPDIR)/findloc0_s1.Tpo -c -o findloc0_s1.lo `test -f '$(srcdir)/generated/findloc0_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_s1.c
5824
@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/findloc0_s1.Tpo $(DEPDIR)/findloc0_s1.Plo
5825
@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(srcdir)/generated/findloc0_s1.c' object='findloc0_s1.lo' libtool=yes @AMDEPBACKSLASH@
5826
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
5827
@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_s1.lo `test -f '$(srcdir)/generated/findloc0_s1.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_s1.c
5828
5829
findloc0_s4.lo: $(srcdir)/generated/findloc0_s4.c
5830
@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT findloc0_s4.lo -MD -MP -MF $(DEPDIR)/findloc0_s4.Tpo -c -o findloc0_s4.lo `test -f '$(srcdir)/generated/findloc0_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_s4.c
5831
@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/findloc0_s4.Tpo $(DEPDIR)/findloc0_s4.Plo
5832
@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(srcdir)/generated/findloc0_s4.c' object='findloc0_s4.lo' libtool=yes @AMDEPBACKSLASH@
5833
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
5834
@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o findloc0_s4.lo `test -f '$(srcdir)/generated/findloc0_s4.c' || echo '$(srcdir)/'`$(srcdir)/generated/findloc0_s4.c
5835
5708
size_from_kind.lo: io/size_from_kind.c
5836
size_from_kind.lo: io/size_from_kind.c
5709
@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT size_from_kind.lo -MD -MP -MF $(DEPDIR)/size_from_kind.Tpo -c -o size_from_kind.lo `test -f 'io/size_from_kind.c' || echo '$(srcdir)/'`io/size_from_kind.c
5837
@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT size_from_kind.lo -MD -MP -MF $(DEPDIR)/size_from_kind.Tpo -c -o size_from_kind.lo `test -f 'io/size_from_kind.c' || echo '$(srcdir)/'`io/size_from_kind.c
5710
@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/size_from_kind.Tpo $(DEPDIR)/size_from_kind.Plo
5838
@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/size_from_kind.Tpo $(DEPDIR)/size_from_kind.Plo
Lines 6583-6588 fpu-target.inc: fpu-target.h $(srcdir)/libgfortran Link Here
6583
@MAINTAINER_MODE_TRUE@$(i_count_c): m4/count.m4 $(I_M4_DEPS2)
6711
@MAINTAINER_MODE_TRUE@$(i_count_c): m4/count.m4 $(I_M4_DEPS2)
6584
@MAINTAINER_MODE_TRUE@	$(M4) -Dfile=$@ -I$(srcdir)/m4 count.m4 > $@
6712
@MAINTAINER_MODE_TRUE@	$(M4) -Dfile=$@ -I$(srcdir)/m4 count.m4 > $@
6585
6713
6714
@MAINTAINER_MODE_TRUE@$(i_findloc0_c): m4/findloc0.m4 $(I_M4_DEPS7)
6715
@MAINTAINER_MODE_TRUE@	$(M4) -Dfile=$@ -I$(srcdir)/m4 findloc0.m4 > $@
6716
6717
@MAINTAINER_MODE_TRUE@$(i_findloc0s_c): m4/findloc0s.m4 $(I_M4_DEPS7)
6718
@MAINTAINER_MODE_TRUE@	$(M4) -Dfile=$@ -I$(srcdir)/m4 findloc0s.m4 > $@
6719
6586
@MAINTAINER_MODE_TRUE@$(i_iall_c): m4/iall.m4 $(I_M4_DEPS1)
6720
@MAINTAINER_MODE_TRUE@$(i_iall_c): m4/iall.m4 $(I_M4_DEPS1)
6587
@MAINTAINER_MODE_TRUE@	$(M4) -Dfile=$@ -I$(srcdir)/m4 iall.m4 > $@
6721
@MAINTAINER_MODE_TRUE@	$(M4) -Dfile=$@ -I$(srcdir)/m4 iall.m4 > $@
6588
6722
(-)libgfortran/generated/maxloc0_16_s1.c (-7 / +7 lines)
Lines 30-43 see the files COPYING3 and COPYING.RUNTIME respect Link Here
30
#include <limits.h>
30
#include <limits.h>
31
31
32
32
33
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16)
33
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_16)
34
34
35
#define HAVE_BACK_ARG 1
35
#define HAVE_BACK_ARG 1
36
36
37
static inline int
37
static inline int
38
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
38
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
39
{
39
{
40
  if (sizeof (GFC_INTEGER_1) == 1)
40
  if (sizeof (GFC_UINTEGER_1) == 1)
41
    return memcmp (a, b, n);
41
    return memcmp (a, b, n);
42
  else
42
  else
43
    return memcmp_char4 (a, b, n);
43
    return memcmp_char4 (a, b, n);
Lines 56-62 maxloc0_16_s1 (gfc_array_i16 * const restrict reta Link Here
56
  index_type extent[GFC_MAX_DIMENSIONS];
56
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type dstride;
58
  index_type dstride;
59
  const GFC_INTEGER_1 *base;
59
  const GFC_UINTEGER_1 *base;
60
  GFC_INTEGER_16 * restrict dest;
60
  GFC_INTEGER_16 * restrict dest;
61
  index_type rank;
61
  index_type rank;
62
  index_type n;
62
  index_type n;
Lines 102-108 maxloc0_16_s1 (gfc_array_i16 * const restrict reta Link Here
102
    dest[n * dstride] = 1;
102
    dest[n * dstride] = 1;
103
  {
103
  {
104
104
105
  const GFC_INTEGER_1 *maxval;
105
  const GFC_UINTEGER_1 *maxval;
106
   maxval = NULL;
106
   maxval = NULL;
107
107
108
  while (base)
108
  while (base)
Lines 168-174 mmaxloc0_16_s1 (gfc_array_i16 * const restrict ret Link Here
168
  index_type mstride[GFC_MAX_DIMENSIONS];
168
  index_type mstride[GFC_MAX_DIMENSIONS];
169
  index_type dstride;
169
  index_type dstride;
170
  GFC_INTEGER_16 *dest;
170
  GFC_INTEGER_16 *dest;
171
  const GFC_INTEGER_1 *base;
171
  const GFC_UINTEGER_1 *base;
172
  GFC_LOGICAL_1 *mbase;
172
  GFC_LOGICAL_1 *mbase;
173
  int rank;
173
  int rank;
174
  index_type n;
174
  index_type n;
Lines 234-240 mmaxloc0_16_s1 (gfc_array_i16 * const restrict ret Link Here
234
    dest[n * dstride] = 0;
234
    dest[n * dstride] = 0;
235
  {
235
  {
236
236
237
  const GFC_INTEGER_1 *maxval;
237
  const GFC_UINTEGER_1 *maxval;
238
238
239
  maxval = NULL;
239
  maxval = NULL;
240
240
(-)libgfortran/generated/maxloc0_16_s4.c (-7 / +7 lines)
Lines 30-43 see the files COPYING3 and COPYING.RUNTIME respect Link Here
30
#include <limits.h>
30
#include <limits.h>
31
31
32
32
33
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16)
33
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_INTEGER_16)
34
34
35
#define HAVE_BACK_ARG 1
35
#define HAVE_BACK_ARG 1
36
36
37
static inline int
37
static inline int
38
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
38
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
39
{
39
{
40
  if (sizeof (GFC_INTEGER_4) == 1)
40
  if (sizeof (GFC_UINTEGER_4) == 1)
41
    return memcmp (a, b, n);
41
    return memcmp (a, b, n);
42
  else
42
  else
43
    return memcmp_char4 (a, b, n);
43
    return memcmp_char4 (a, b, n);
Lines 56-62 maxloc0_16_s4 (gfc_array_i16 * const restrict reta Link Here
56
  index_type extent[GFC_MAX_DIMENSIONS];
56
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type dstride;
58
  index_type dstride;
59
  const GFC_INTEGER_4 *base;
59
  const GFC_UINTEGER_4 *base;
60
  GFC_INTEGER_16 * restrict dest;
60
  GFC_INTEGER_16 * restrict dest;
61
  index_type rank;
61
  index_type rank;
62
  index_type n;
62
  index_type n;
Lines 102-108 maxloc0_16_s4 (gfc_array_i16 * const restrict reta Link Here
102
    dest[n * dstride] = 1;
102
    dest[n * dstride] = 1;
103
  {
103
  {
104
104
105
  const GFC_INTEGER_4 *maxval;
105
  const GFC_UINTEGER_4 *maxval;
106
   maxval = NULL;
106
   maxval = NULL;
107
107
108
  while (base)
108
  while (base)
Lines 168-174 mmaxloc0_16_s4 (gfc_array_i16 * const restrict ret Link Here
168
  index_type mstride[GFC_MAX_DIMENSIONS];
168
  index_type mstride[GFC_MAX_DIMENSIONS];
169
  index_type dstride;
169
  index_type dstride;
170
  GFC_INTEGER_16 *dest;
170
  GFC_INTEGER_16 *dest;
171
  const GFC_INTEGER_4 *base;
171
  const GFC_UINTEGER_4 *base;
172
  GFC_LOGICAL_1 *mbase;
172
  GFC_LOGICAL_1 *mbase;
173
  int rank;
173
  int rank;
174
  index_type n;
174
  index_type n;
Lines 234-240 mmaxloc0_16_s4 (gfc_array_i16 * const restrict ret Link Here
234
    dest[n * dstride] = 0;
234
    dest[n * dstride] = 0;
235
  {
235
  {
236
236
237
  const GFC_INTEGER_4 *maxval;
237
  const GFC_UINTEGER_4 *maxval;
238
238
239
  maxval = NULL;
239
  maxval = NULL;
240
240
(-)libgfortran/generated/maxloc0_4_s1.c (-7 / +7 lines)
Lines 30-43 see the files COPYING3 and COPYING.RUNTIME respect Link Here
30
#include <limits.h>
30
#include <limits.h>
31
31
32
32
33
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4)
33
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_4)
34
34
35
#define HAVE_BACK_ARG 1
35
#define HAVE_BACK_ARG 1
36
36
37
static inline int
37
static inline int
38
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
38
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
39
{
39
{
40
  if (sizeof (GFC_INTEGER_1) == 1)
40
  if (sizeof (GFC_UINTEGER_1) == 1)
41
    return memcmp (a, b, n);
41
    return memcmp (a, b, n);
42
  else
42
  else
43
    return memcmp_char4 (a, b, n);
43
    return memcmp_char4 (a, b, n);
Lines 56-62 maxloc0_4_s1 (gfc_array_i4 * const restrict retarr Link Here
56
  index_type extent[GFC_MAX_DIMENSIONS];
56
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type dstride;
58
  index_type dstride;
59
  const GFC_INTEGER_1 *base;
59
  const GFC_UINTEGER_1 *base;
60
  GFC_INTEGER_4 * restrict dest;
60
  GFC_INTEGER_4 * restrict dest;
61
  index_type rank;
61
  index_type rank;
62
  index_type n;
62
  index_type n;
Lines 102-108 maxloc0_4_s1 (gfc_array_i4 * const restrict retarr Link Here
102
    dest[n * dstride] = 1;
102
    dest[n * dstride] = 1;
103
  {
103
  {
104
104
105
  const GFC_INTEGER_1 *maxval;
105
  const GFC_UINTEGER_1 *maxval;
106
   maxval = NULL;
106
   maxval = NULL;
107
107
108
  while (base)
108
  while (base)
Lines 168-174 mmaxloc0_4_s1 (gfc_array_i4 * const restrict retar Link Here
168
  index_type mstride[GFC_MAX_DIMENSIONS];
168
  index_type mstride[GFC_MAX_DIMENSIONS];
169
  index_type dstride;
169
  index_type dstride;
170
  GFC_INTEGER_4 *dest;
170
  GFC_INTEGER_4 *dest;
171
  const GFC_INTEGER_1 *base;
171
  const GFC_UINTEGER_1 *base;
172
  GFC_LOGICAL_1 *mbase;
172
  GFC_LOGICAL_1 *mbase;
173
  int rank;
173
  int rank;
174
  index_type n;
174
  index_type n;
Lines 234-240 mmaxloc0_4_s1 (gfc_array_i4 * const restrict retar Link Here
234
    dest[n * dstride] = 0;
234
    dest[n * dstride] = 0;
235
  {
235
  {
236
236
237
  const GFC_INTEGER_1 *maxval;
237
  const GFC_UINTEGER_1 *maxval;
238
238
239
  maxval = NULL;
239
  maxval = NULL;
240
240
(-)libgfortran/generated/maxloc0_4_s4.c (-7 / +7 lines)
Lines 30-43 see the files COPYING3 and COPYING.RUNTIME respect Link Here
30
#include <limits.h>
30
#include <limits.h>
31
31
32
32
33
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4)
33
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_INTEGER_4)
34
34
35
#define HAVE_BACK_ARG 1
35
#define HAVE_BACK_ARG 1
36
36
37
static inline int
37
static inline int
38
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
38
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
39
{
39
{
40
  if (sizeof (GFC_INTEGER_4) == 1)
40
  if (sizeof (GFC_UINTEGER_4) == 1)
41
    return memcmp (a, b, n);
41
    return memcmp (a, b, n);
42
  else
42
  else
43
    return memcmp_char4 (a, b, n);
43
    return memcmp_char4 (a, b, n);
Lines 56-62 maxloc0_4_s4 (gfc_array_i4 * const restrict retarr Link Here
56
  index_type extent[GFC_MAX_DIMENSIONS];
56
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type dstride;
58
  index_type dstride;
59
  const GFC_INTEGER_4 *base;
59
  const GFC_UINTEGER_4 *base;
60
  GFC_INTEGER_4 * restrict dest;
60
  GFC_INTEGER_4 * restrict dest;
61
  index_type rank;
61
  index_type rank;
62
  index_type n;
62
  index_type n;
Lines 102-108 maxloc0_4_s4 (gfc_array_i4 * const restrict retarr Link Here
102
    dest[n * dstride] = 1;
102
    dest[n * dstride] = 1;
103
  {
103
  {
104
104
105
  const GFC_INTEGER_4 *maxval;
105
  const GFC_UINTEGER_4 *maxval;
106
   maxval = NULL;
106
   maxval = NULL;
107
107
108
  while (base)
108
  while (base)
Lines 168-174 mmaxloc0_4_s4 (gfc_array_i4 * const restrict retar Link Here
168
  index_type mstride[GFC_MAX_DIMENSIONS];
168
  index_type mstride[GFC_MAX_DIMENSIONS];
169
  index_type dstride;
169
  index_type dstride;
170
  GFC_INTEGER_4 *dest;
170
  GFC_INTEGER_4 *dest;
171
  const GFC_INTEGER_4 *base;
171
  const GFC_UINTEGER_4 *base;
172
  GFC_LOGICAL_1 *mbase;
172
  GFC_LOGICAL_1 *mbase;
173
  int rank;
173
  int rank;
174
  index_type n;
174
  index_type n;
Lines 234-240 mmaxloc0_4_s4 (gfc_array_i4 * const restrict retar Link Here
234
    dest[n * dstride] = 0;
234
    dest[n * dstride] = 0;
235
  {
235
  {
236
236
237
  const GFC_INTEGER_4 *maxval;
237
  const GFC_UINTEGER_4 *maxval;
238
238
239
  maxval = NULL;
239
  maxval = NULL;
240
240
(-)libgfortran/generated/maxloc0_8_s1.c (-7 / +7 lines)
Lines 30-43 see the files COPYING3 and COPYING.RUNTIME respect Link Here
30
#include <limits.h>
30
#include <limits.h>
31
31
32
32
33
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_8)
33
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_8)
34
34
35
#define HAVE_BACK_ARG 1
35
#define HAVE_BACK_ARG 1
36
36
37
static inline int
37
static inline int
38
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
38
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
39
{
39
{
40
  if (sizeof (GFC_INTEGER_1) == 1)
40
  if (sizeof (GFC_UINTEGER_1) == 1)
41
    return memcmp (a, b, n);
41
    return memcmp (a, b, n);
42
  else
42
  else
43
    return memcmp_char4 (a, b, n);
43
    return memcmp_char4 (a, b, n);
Lines 56-62 maxloc0_8_s1 (gfc_array_i8 * const restrict retarr Link Here
56
  index_type extent[GFC_MAX_DIMENSIONS];
56
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type dstride;
58
  index_type dstride;
59
  const GFC_INTEGER_1 *base;
59
  const GFC_UINTEGER_1 *base;
60
  GFC_INTEGER_8 * restrict dest;
60
  GFC_INTEGER_8 * restrict dest;
61
  index_type rank;
61
  index_type rank;
62
  index_type n;
62
  index_type n;
Lines 102-108 maxloc0_8_s1 (gfc_array_i8 * const restrict retarr Link Here
102
    dest[n * dstride] = 1;
102
    dest[n * dstride] = 1;
103
  {
103
  {
104
104
105
  const GFC_INTEGER_1 *maxval;
105
  const GFC_UINTEGER_1 *maxval;
106
   maxval = NULL;
106
   maxval = NULL;
107
107
108
  while (base)
108
  while (base)
Lines 168-174 mmaxloc0_8_s1 (gfc_array_i8 * const restrict retar Link Here
168
  index_type mstride[GFC_MAX_DIMENSIONS];
168
  index_type mstride[GFC_MAX_DIMENSIONS];
169
  index_type dstride;
169
  index_type dstride;
170
  GFC_INTEGER_8 *dest;
170
  GFC_INTEGER_8 *dest;
171
  const GFC_INTEGER_1 *base;
171
  const GFC_UINTEGER_1 *base;
172
  GFC_LOGICAL_1 *mbase;
172
  GFC_LOGICAL_1 *mbase;
173
  int rank;
173
  int rank;
174
  index_type n;
174
  index_type n;
Lines 234-240 mmaxloc0_8_s1 (gfc_array_i8 * const restrict retar Link Here
234
    dest[n * dstride] = 0;
234
    dest[n * dstride] = 0;
235
  {
235
  {
236
236
237
  const GFC_INTEGER_1 *maxval;
237
  const GFC_UINTEGER_1 *maxval;
238
238
239
  maxval = NULL;
239
  maxval = NULL;
240
240
(-)libgfortran/generated/maxloc0_8_s4.c (-7 / +7 lines)
Lines 30-43 see the files COPYING3 and COPYING.RUNTIME respect Link Here
30
#include <limits.h>
30
#include <limits.h>
31
31
32
32
33
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8)
33
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_INTEGER_8)
34
34
35
#define HAVE_BACK_ARG 1
35
#define HAVE_BACK_ARG 1
36
36
37
static inline int
37
static inline int
38
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
38
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
39
{
39
{
40
  if (sizeof (GFC_INTEGER_4) == 1)
40
  if (sizeof (GFC_UINTEGER_4) == 1)
41
    return memcmp (a, b, n);
41
    return memcmp (a, b, n);
42
  else
42
  else
43
    return memcmp_char4 (a, b, n);
43
    return memcmp_char4 (a, b, n);
Lines 56-62 maxloc0_8_s4 (gfc_array_i8 * const restrict retarr Link Here
56
  index_type extent[GFC_MAX_DIMENSIONS];
56
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type dstride;
58
  index_type dstride;
59
  const GFC_INTEGER_4 *base;
59
  const GFC_UINTEGER_4 *base;
60
  GFC_INTEGER_8 * restrict dest;
60
  GFC_INTEGER_8 * restrict dest;
61
  index_type rank;
61
  index_type rank;
62
  index_type n;
62
  index_type n;
Lines 102-108 maxloc0_8_s4 (gfc_array_i8 * const restrict retarr Link Here
102
    dest[n * dstride] = 1;
102
    dest[n * dstride] = 1;
103
  {
103
  {
104
104
105
  const GFC_INTEGER_4 *maxval;
105
  const GFC_UINTEGER_4 *maxval;
106
   maxval = NULL;
106
   maxval = NULL;
107
107
108
  while (base)
108
  while (base)
Lines 168-174 mmaxloc0_8_s4 (gfc_array_i8 * const restrict retar Link Here
168
  index_type mstride[GFC_MAX_DIMENSIONS];
168
  index_type mstride[GFC_MAX_DIMENSIONS];
169
  index_type dstride;
169
  index_type dstride;
170
  GFC_INTEGER_8 *dest;
170
  GFC_INTEGER_8 *dest;
171
  const GFC_INTEGER_4 *base;
171
  const GFC_UINTEGER_4 *base;
172
  GFC_LOGICAL_1 *mbase;
172
  GFC_LOGICAL_1 *mbase;
173
  int rank;
173
  int rank;
174
  index_type n;
174
  index_type n;
Lines 234-240 mmaxloc0_8_s4 (gfc_array_i8 * const restrict retar Link Here
234
    dest[n * dstride] = 0;
234
    dest[n * dstride] = 0;
235
  {
235
  {
236
236
237
  const GFC_INTEGER_4 *maxval;
237
  const GFC_UINTEGER_4 *maxval;
238
238
239
  maxval = NULL;
239
  maxval = NULL;
240
240
(-)libgfortran/generated/maxloc1_16_s1.c (-9 / +9 lines)
Lines 26-32 see the files COPYING3 and COPYING.RUNTIME respect Link Here
26
#include "libgfortran.h"
26
#include "libgfortran.h"
27
27
28
28
29
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16)
29
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_16)
30
30
31
#define HAVE_BACK_ARG 1
31
#define HAVE_BACK_ARG 1
32
32
Lines 34-42 see the files COPYING3 and COPYING.RUNTIME respect Link Here
34
#include <assert.h>
34
#include <assert.h>
35
35
36
static inline int
36
static inline int
37
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
37
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
38
{
38
{
39
  if (sizeof (GFC_INTEGER_1) == 1)
39
  if (sizeof (GFC_UINTEGER_1) == 1)
40
    return memcmp (a, b, n);
40
    return memcmp (a, b, n);
41
  else
41
  else
42
    return memcmp_char4 (a, b, n);
42
    return memcmp_char4 (a, b, n);
Lines 57-63 maxloc1_16_s1 (gfc_array_i16 * const restrict reta Link Here
57
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type extent[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
60
  const GFC_INTEGER_1 * restrict base;
60
  const GFC_UINTEGER_1 * restrict base;
61
  GFC_INTEGER_16 * restrict dest;
61
  GFC_INTEGER_16 * restrict dest;
62
  index_type rank;
62
  index_type rank;
63
  index_type n;
63
  index_type n;
Lines 155-166 maxloc1_16_s1 (gfc_array_i16 * const restrict reta Link Here
155
  continue_loop = 1;
155
  continue_loop = 1;
156
  while (continue_loop)
156
  while (continue_loop)
157
    {
157
    {
158
      const GFC_INTEGER_1 * restrict src;
158
      const GFC_UINTEGER_1 * restrict src;
159
      GFC_INTEGER_16 result;
159
      GFC_INTEGER_16 result;
160
      src = base;
160
      src = base;
161
      {
161
      {
162
162
163
	const GFC_INTEGER_1 *maxval;
163
	const GFC_UINTEGER_1 *maxval;
164
	maxval = NULL;
164
	maxval = NULL;
165
	result = 0;
165
	result = 0;
166
	if (len <= 0)
166
	if (len <= 0)
Lines 231-237 mmaxloc1_16_s1 (gfc_array_i16 * const restrict ret Link Here
231
  index_type dstride[GFC_MAX_DIMENSIONS];
231
  index_type dstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
233
  GFC_INTEGER_16 * restrict dest;
233
  GFC_INTEGER_16 * restrict dest;
234
  const GFC_INTEGER_1 * restrict base;
234
  const GFC_UINTEGER_1 * restrict base;
235
  const GFC_LOGICAL_1 * restrict mbase;
235
  const GFC_LOGICAL_1 * restrict mbase;
236
  index_type rank;
236
  index_type rank;
237
  index_type dim;
237
  index_type dim;
Lines 349-355 mmaxloc1_16_s1 (gfc_array_i16 * const restrict ret Link Here
349
349
350
  while (base)
350
  while (base)
351
    {
351
    {
352
      const GFC_INTEGER_1 * restrict src;
352
      const GFC_UINTEGER_1 * restrict src;
353
      const GFC_LOGICAL_1 * restrict msrc;
353
      const GFC_LOGICAL_1 * restrict msrc;
354
      GFC_INTEGER_16 result;
354
      GFC_INTEGER_16 result;
355
      src = base;
355
      src = base;
Lines 356-362 mmaxloc1_16_s1 (gfc_array_i16 * const restrict ret Link Here
356
      msrc = mbase;
356
      msrc = mbase;
357
      {
357
      {
358
358
359
	const GFC_INTEGER_1 *maxval;
359
	const GFC_UINTEGER_1 *maxval;
360
	maxval = base;
360
	maxval = base;
361
	result = 0;
361
	result = 0;
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
(-)libgfortran/generated/maxloc1_16_s4.c (-9 / +9 lines)
Lines 26-32 see the files COPYING3 and COPYING.RUNTIME respect Link Here
26
#include "libgfortran.h"
26
#include "libgfortran.h"
27
27
28
28
29
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16)
29
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_INTEGER_16)
30
30
31
#define HAVE_BACK_ARG 1
31
#define HAVE_BACK_ARG 1
32
32
Lines 34-42 see the files COPYING3 and COPYING.RUNTIME respect Link Here
34
#include <assert.h>
34
#include <assert.h>
35
35
36
static inline int
36
static inline int
37
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
37
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
38
{
38
{
39
  if (sizeof (GFC_INTEGER_4) == 1)
39
  if (sizeof (GFC_UINTEGER_4) == 1)
40
    return memcmp (a, b, n);
40
    return memcmp (a, b, n);
41
  else
41
  else
42
    return memcmp_char4 (a, b, n);
42
    return memcmp_char4 (a, b, n);
Lines 57-63 maxloc1_16_s4 (gfc_array_i16 * const restrict reta Link Here
57
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type extent[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
60
  const GFC_INTEGER_4 * restrict base;
60
  const GFC_UINTEGER_4 * restrict base;
61
  GFC_INTEGER_16 * restrict dest;
61
  GFC_INTEGER_16 * restrict dest;
62
  index_type rank;
62
  index_type rank;
63
  index_type n;
63
  index_type n;
Lines 155-166 maxloc1_16_s4 (gfc_array_i16 * const restrict reta Link Here
155
  continue_loop = 1;
155
  continue_loop = 1;
156
  while (continue_loop)
156
  while (continue_loop)
157
    {
157
    {
158
      const GFC_INTEGER_4 * restrict src;
158
      const GFC_UINTEGER_4 * restrict src;
159
      GFC_INTEGER_16 result;
159
      GFC_INTEGER_16 result;
160
      src = base;
160
      src = base;
161
      {
161
      {
162
162
163
	const GFC_INTEGER_4 *maxval;
163
	const GFC_UINTEGER_4 *maxval;
164
	maxval = NULL;
164
	maxval = NULL;
165
	result = 0;
165
	result = 0;
166
	if (len <= 0)
166
	if (len <= 0)
Lines 231-237 mmaxloc1_16_s4 (gfc_array_i16 * const restrict ret Link Here
231
  index_type dstride[GFC_MAX_DIMENSIONS];
231
  index_type dstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
233
  GFC_INTEGER_16 * restrict dest;
233
  GFC_INTEGER_16 * restrict dest;
234
  const GFC_INTEGER_4 * restrict base;
234
  const GFC_UINTEGER_4 * restrict base;
235
  const GFC_LOGICAL_1 * restrict mbase;
235
  const GFC_LOGICAL_1 * restrict mbase;
236
  index_type rank;
236
  index_type rank;
237
  index_type dim;
237
  index_type dim;
Lines 349-355 mmaxloc1_16_s4 (gfc_array_i16 * const restrict ret Link Here
349
349
350
  while (base)
350
  while (base)
351
    {
351
    {
352
      const GFC_INTEGER_4 * restrict src;
352
      const GFC_UINTEGER_4 * restrict src;
353
      const GFC_LOGICAL_1 * restrict msrc;
353
      const GFC_LOGICAL_1 * restrict msrc;
354
      GFC_INTEGER_16 result;
354
      GFC_INTEGER_16 result;
355
      src = base;
355
      src = base;
Lines 356-362 mmaxloc1_16_s4 (gfc_array_i16 * const restrict ret Link Here
356
      msrc = mbase;
356
      msrc = mbase;
357
      {
357
      {
358
358
359
	const GFC_INTEGER_4 *maxval;
359
	const GFC_UINTEGER_4 *maxval;
360
	maxval = base;
360
	maxval = base;
361
	result = 0;
361
	result = 0;
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
(-)libgfortran/generated/maxloc1_4_s1.c (-9 / +9 lines)
Lines 26-32 see the files COPYING3 and COPYING.RUNTIME respect Link Here
26
#include "libgfortran.h"
26
#include "libgfortran.h"
27
27
28
28
29
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4)
29
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_4)
30
30
31
#define HAVE_BACK_ARG 1
31
#define HAVE_BACK_ARG 1
32
32
Lines 34-42 see the files COPYING3 and COPYING.RUNTIME respect Link Here
34
#include <assert.h>
34
#include <assert.h>
35
35
36
static inline int
36
static inline int
37
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
37
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
38
{
38
{
39
  if (sizeof (GFC_INTEGER_1) == 1)
39
  if (sizeof (GFC_UINTEGER_1) == 1)
40
    return memcmp (a, b, n);
40
    return memcmp (a, b, n);
41
  else
41
  else
42
    return memcmp_char4 (a, b, n);
42
    return memcmp_char4 (a, b, n);
Lines 57-63 maxloc1_4_s1 (gfc_array_i4 * const restrict retarr Link Here
57
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type extent[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
60
  const GFC_INTEGER_1 * restrict base;
60
  const GFC_UINTEGER_1 * restrict base;
61
  GFC_INTEGER_4 * restrict dest;
61
  GFC_INTEGER_4 * restrict dest;
62
  index_type rank;
62
  index_type rank;
63
  index_type n;
63
  index_type n;
Lines 155-166 maxloc1_4_s1 (gfc_array_i4 * const restrict retarr Link Here
155
  continue_loop = 1;
155
  continue_loop = 1;
156
  while (continue_loop)
156
  while (continue_loop)
157
    {
157
    {
158
      const GFC_INTEGER_1 * restrict src;
158
      const GFC_UINTEGER_1 * restrict src;
159
      GFC_INTEGER_4 result;
159
      GFC_INTEGER_4 result;
160
      src = base;
160
      src = base;
161
      {
161
      {
162
162
163
	const GFC_INTEGER_1 *maxval;
163
	const GFC_UINTEGER_1 *maxval;
164
	maxval = NULL;
164
	maxval = NULL;
165
	result = 0;
165
	result = 0;
166
	if (len <= 0)
166
	if (len <= 0)
Lines 231-237 mmaxloc1_4_s1 (gfc_array_i4 * const restrict retar Link Here
231
  index_type dstride[GFC_MAX_DIMENSIONS];
231
  index_type dstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
233
  GFC_INTEGER_4 * restrict dest;
233
  GFC_INTEGER_4 * restrict dest;
234
  const GFC_INTEGER_1 * restrict base;
234
  const GFC_UINTEGER_1 * restrict base;
235
  const GFC_LOGICAL_1 * restrict mbase;
235
  const GFC_LOGICAL_1 * restrict mbase;
236
  index_type rank;
236
  index_type rank;
237
  index_type dim;
237
  index_type dim;
Lines 349-355 mmaxloc1_4_s1 (gfc_array_i4 * const restrict retar Link Here
349
349
350
  while (base)
350
  while (base)
351
    {
351
    {
352
      const GFC_INTEGER_1 * restrict src;
352
      const GFC_UINTEGER_1 * restrict src;
353
      const GFC_LOGICAL_1 * restrict msrc;
353
      const GFC_LOGICAL_1 * restrict msrc;
354
      GFC_INTEGER_4 result;
354
      GFC_INTEGER_4 result;
355
      src = base;
355
      src = base;
Lines 356-362 mmaxloc1_4_s1 (gfc_array_i4 * const restrict retar Link Here
356
      msrc = mbase;
356
      msrc = mbase;
357
      {
357
      {
358
358
359
	const GFC_INTEGER_1 *maxval;
359
	const GFC_UINTEGER_1 *maxval;
360
	maxval = base;
360
	maxval = base;
361
	result = 0;
361
	result = 0;
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
(-)libgfortran/generated/maxloc1_4_s4.c (-9 / +9 lines)
Lines 26-32 see the files COPYING3 and COPYING.RUNTIME respect Link Here
26
#include "libgfortran.h"
26
#include "libgfortran.h"
27
27
28
28
29
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4)
29
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_INTEGER_4)
30
30
31
#define HAVE_BACK_ARG 1
31
#define HAVE_BACK_ARG 1
32
32
Lines 34-42 see the files COPYING3 and COPYING.RUNTIME respect Link Here
34
#include <assert.h>
34
#include <assert.h>
35
35
36
static inline int
36
static inline int
37
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
37
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
38
{
38
{
39
  if (sizeof (GFC_INTEGER_4) == 1)
39
  if (sizeof (GFC_UINTEGER_4) == 1)
40
    return memcmp (a, b, n);
40
    return memcmp (a, b, n);
41
  else
41
  else
42
    return memcmp_char4 (a, b, n);
42
    return memcmp_char4 (a, b, n);
Lines 57-63 maxloc1_4_s4 (gfc_array_i4 * const restrict retarr Link Here
57
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type extent[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
60
  const GFC_INTEGER_4 * restrict base;
60
  const GFC_UINTEGER_4 * restrict base;
61
  GFC_INTEGER_4 * restrict dest;
61
  GFC_INTEGER_4 * restrict dest;
62
  index_type rank;
62
  index_type rank;
63
  index_type n;
63
  index_type n;
Lines 155-166 maxloc1_4_s4 (gfc_array_i4 * const restrict retarr Link Here
155
  continue_loop = 1;
155
  continue_loop = 1;
156
  while (continue_loop)
156
  while (continue_loop)
157
    {
157
    {
158
      const GFC_INTEGER_4 * restrict src;
158
      const GFC_UINTEGER_4 * restrict src;
159
      GFC_INTEGER_4 result;
159
      GFC_INTEGER_4 result;
160
      src = base;
160
      src = base;
161
      {
161
      {
162
162
163
	const GFC_INTEGER_4 *maxval;
163
	const GFC_UINTEGER_4 *maxval;
164
	maxval = NULL;
164
	maxval = NULL;
165
	result = 0;
165
	result = 0;
166
	if (len <= 0)
166
	if (len <= 0)
Lines 231-237 mmaxloc1_4_s4 (gfc_array_i4 * const restrict retar Link Here
231
  index_type dstride[GFC_MAX_DIMENSIONS];
231
  index_type dstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
233
  GFC_INTEGER_4 * restrict dest;
233
  GFC_INTEGER_4 * restrict dest;
234
  const GFC_INTEGER_4 * restrict base;
234
  const GFC_UINTEGER_4 * restrict base;
235
  const GFC_LOGICAL_1 * restrict mbase;
235
  const GFC_LOGICAL_1 * restrict mbase;
236
  index_type rank;
236
  index_type rank;
237
  index_type dim;
237
  index_type dim;
Lines 349-355 mmaxloc1_4_s4 (gfc_array_i4 * const restrict retar Link Here
349
349
350
  while (base)
350
  while (base)
351
    {
351
    {
352
      const GFC_INTEGER_4 * restrict src;
352
      const GFC_UINTEGER_4 * restrict src;
353
      const GFC_LOGICAL_1 * restrict msrc;
353
      const GFC_LOGICAL_1 * restrict msrc;
354
      GFC_INTEGER_4 result;
354
      GFC_INTEGER_4 result;
355
      src = base;
355
      src = base;
Lines 356-362 mmaxloc1_4_s4 (gfc_array_i4 * const restrict retar Link Here
356
      msrc = mbase;
356
      msrc = mbase;
357
      {
357
      {
358
358
359
	const GFC_INTEGER_4 *maxval;
359
	const GFC_UINTEGER_4 *maxval;
360
	maxval = base;
360
	maxval = base;
361
	result = 0;
361
	result = 0;
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
(-)libgfortran/generated/maxloc1_8_s1.c (-9 / +9 lines)
Lines 26-32 see the files COPYING3 and COPYING.RUNTIME respect Link Here
26
#include "libgfortran.h"
26
#include "libgfortran.h"
27
27
28
28
29
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_8)
29
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_8)
30
30
31
#define HAVE_BACK_ARG 1
31
#define HAVE_BACK_ARG 1
32
32
Lines 34-42 see the files COPYING3 and COPYING.RUNTIME respect Link Here
34
#include <assert.h>
34
#include <assert.h>
35
35
36
static inline int
36
static inline int
37
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
37
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
38
{
38
{
39
  if (sizeof (GFC_INTEGER_1) == 1)
39
  if (sizeof (GFC_UINTEGER_1) == 1)
40
    return memcmp (a, b, n);
40
    return memcmp (a, b, n);
41
  else
41
  else
42
    return memcmp_char4 (a, b, n);
42
    return memcmp_char4 (a, b, n);
Lines 57-63 maxloc1_8_s1 (gfc_array_i8 * const restrict retarr Link Here
57
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type extent[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
60
  const GFC_INTEGER_1 * restrict base;
60
  const GFC_UINTEGER_1 * restrict base;
61
  GFC_INTEGER_8 * restrict dest;
61
  GFC_INTEGER_8 * restrict dest;
62
  index_type rank;
62
  index_type rank;
63
  index_type n;
63
  index_type n;
Lines 155-166 maxloc1_8_s1 (gfc_array_i8 * const restrict retarr Link Here
155
  continue_loop = 1;
155
  continue_loop = 1;
156
  while (continue_loop)
156
  while (continue_loop)
157
    {
157
    {
158
      const GFC_INTEGER_1 * restrict src;
158
      const GFC_UINTEGER_1 * restrict src;
159
      GFC_INTEGER_8 result;
159
      GFC_INTEGER_8 result;
160
      src = base;
160
      src = base;
161
      {
161
      {
162
162
163
	const GFC_INTEGER_1 *maxval;
163
	const GFC_UINTEGER_1 *maxval;
164
	maxval = NULL;
164
	maxval = NULL;
165
	result = 0;
165
	result = 0;
166
	if (len <= 0)
166
	if (len <= 0)
Lines 231-237 mmaxloc1_8_s1 (gfc_array_i8 * const restrict retar Link Here
231
  index_type dstride[GFC_MAX_DIMENSIONS];
231
  index_type dstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
233
  GFC_INTEGER_8 * restrict dest;
233
  GFC_INTEGER_8 * restrict dest;
234
  const GFC_INTEGER_1 * restrict base;
234
  const GFC_UINTEGER_1 * restrict base;
235
  const GFC_LOGICAL_1 * restrict mbase;
235
  const GFC_LOGICAL_1 * restrict mbase;
236
  index_type rank;
236
  index_type rank;
237
  index_type dim;
237
  index_type dim;
Lines 349-355 mmaxloc1_8_s1 (gfc_array_i8 * const restrict retar Link Here
349
349
350
  while (base)
350
  while (base)
351
    {
351
    {
352
      const GFC_INTEGER_1 * restrict src;
352
      const GFC_UINTEGER_1 * restrict src;
353
      const GFC_LOGICAL_1 * restrict msrc;
353
      const GFC_LOGICAL_1 * restrict msrc;
354
      GFC_INTEGER_8 result;
354
      GFC_INTEGER_8 result;
355
      src = base;
355
      src = base;
Lines 356-362 mmaxloc1_8_s1 (gfc_array_i8 * const restrict retar Link Here
356
      msrc = mbase;
356
      msrc = mbase;
357
      {
357
      {
358
358
359
	const GFC_INTEGER_1 *maxval;
359
	const GFC_UINTEGER_1 *maxval;
360
	maxval = base;
360
	maxval = base;
361
	result = 0;
361
	result = 0;
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
(-)libgfortran/generated/maxloc1_8_s4.c (-9 / +9 lines)
Lines 26-32 see the files COPYING3 and COPYING.RUNTIME respect Link Here
26
#include "libgfortran.h"
26
#include "libgfortran.h"
27
27
28
28
29
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8)
29
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_INTEGER_8)
30
30
31
#define HAVE_BACK_ARG 1
31
#define HAVE_BACK_ARG 1
32
32
Lines 34-42 see the files COPYING3 and COPYING.RUNTIME respect Link Here
34
#include <assert.h>
34
#include <assert.h>
35
35
36
static inline int
36
static inline int
37
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
37
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
38
{
38
{
39
  if (sizeof (GFC_INTEGER_4) == 1)
39
  if (sizeof (GFC_UINTEGER_4) == 1)
40
    return memcmp (a, b, n);
40
    return memcmp (a, b, n);
41
  else
41
  else
42
    return memcmp_char4 (a, b, n);
42
    return memcmp_char4 (a, b, n);
Lines 57-63 maxloc1_8_s4 (gfc_array_i8 * const restrict retarr Link Here
57
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type extent[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
60
  const GFC_INTEGER_4 * restrict base;
60
  const GFC_UINTEGER_4 * restrict base;
61
  GFC_INTEGER_8 * restrict dest;
61
  GFC_INTEGER_8 * restrict dest;
62
  index_type rank;
62
  index_type rank;
63
  index_type n;
63
  index_type n;
Lines 155-166 maxloc1_8_s4 (gfc_array_i8 * const restrict retarr Link Here
155
  continue_loop = 1;
155
  continue_loop = 1;
156
  while (continue_loop)
156
  while (continue_loop)
157
    {
157
    {
158
      const GFC_INTEGER_4 * restrict src;
158
      const GFC_UINTEGER_4 * restrict src;
159
      GFC_INTEGER_8 result;
159
      GFC_INTEGER_8 result;
160
      src = base;
160
      src = base;
161
      {
161
      {
162
162
163
	const GFC_INTEGER_4 *maxval;
163
	const GFC_UINTEGER_4 *maxval;
164
	maxval = NULL;
164
	maxval = NULL;
165
	result = 0;
165
	result = 0;
166
	if (len <= 0)
166
	if (len <= 0)
Lines 231-237 mmaxloc1_8_s4 (gfc_array_i8 * const restrict retar Link Here
231
  index_type dstride[GFC_MAX_DIMENSIONS];
231
  index_type dstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
233
  GFC_INTEGER_8 * restrict dest;
233
  GFC_INTEGER_8 * restrict dest;
234
  const GFC_INTEGER_4 * restrict base;
234
  const GFC_UINTEGER_4 * restrict base;
235
  const GFC_LOGICAL_1 * restrict mbase;
235
  const GFC_LOGICAL_1 * restrict mbase;
236
  index_type rank;
236
  index_type rank;
237
  index_type dim;
237
  index_type dim;
Lines 349-355 mmaxloc1_8_s4 (gfc_array_i8 * const restrict retar Link Here
349
349
350
  while (base)
350
  while (base)
351
    {
351
    {
352
      const GFC_INTEGER_4 * restrict src;
352
      const GFC_UINTEGER_4 * restrict src;
353
      const GFC_LOGICAL_1 * restrict msrc;
353
      const GFC_LOGICAL_1 * restrict msrc;
354
      GFC_INTEGER_8 result;
354
      GFC_INTEGER_8 result;
355
      src = base;
355
      src = base;
Lines 356-362 mmaxloc1_8_s4 (gfc_array_i8 * const restrict retar Link Here
356
      msrc = mbase;
356
      msrc = mbase;
357
      {
357
      {
358
358
359
	const GFC_INTEGER_4 *maxval;
359
	const GFC_UINTEGER_4 *maxval;
360
	maxval = base;
360
	maxval = base;
361
	result = 0;
361
	result = 0;
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
(-)libgfortran/generated/maxloc2_16_s1.c (-7 / +7 lines)
Lines 28-39 see the files COPYING3 and COPYING.RUNTIME respect Link Here
28
#include <string.h>
28
#include <string.h>
29
#include <assert.h>
29
#include <assert.h>
30
30
31
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16)
31
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_16)
32
32
33
static inline int
33
static inline int
34
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
34
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
35
{
35
{
36
  if (sizeof (GFC_INTEGER_1) == 1)
36
  if (sizeof (GFC_UINTEGER_1) == 1)
37
    return memcmp (a, b, n);
37
    return memcmp (a, b, n);
38
  else
38
  else
39
    return memcmp_char4 (a, b, n);
39
    return memcmp_char4 (a, b, n);
Lines 49-56 maxloc2_16_s1 (gfc_array_s1 * const restrict array Link Here
49
  index_type ret;
49
  index_type ret;
50
  index_type sstride;
50
  index_type sstride;
51
  index_type extent;
51
  index_type extent;
52
  const GFC_INTEGER_1 *src;
52
  const GFC_UINTEGER_1 *src;
53
  const GFC_INTEGER_1 *maxval;
53
  const GFC_UINTEGER_1 *maxval;
54
  index_type i;
54
  index_type i;
55
55
56
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
56
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
Lines 88-95 mmaxloc2_16_s1 (gfc_array_s1 * const restrict arra Link Here
88
  index_type ret;
88
  index_type ret;
89
  index_type sstride;
89
  index_type sstride;
90
  index_type extent;
90
  index_type extent;
91
  const GFC_INTEGER_1 *src;
91
  const GFC_UINTEGER_1 *src;
92
  const GFC_INTEGER_1 *maxval;
92
  const GFC_UINTEGER_1 *maxval;
93
  index_type i, j;
93
  index_type i, j;
94
  GFC_LOGICAL_1 *mbase;
94
  GFC_LOGICAL_1 *mbase;
95
  int mask_kind;
95
  int mask_kind;
(-)libgfortran/generated/maxloc2_16_s4.c (-7 / +7 lines)
Lines 28-39 see the files COPYING3 and COPYING.RUNTIME respect Link Here
28
#include <string.h>
28
#include <string.h>
29
#include <assert.h>
29
#include <assert.h>
30
30
31
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16)
31
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_INTEGER_16)
32
32
33
static inline int
33
static inline int
34
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
34
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
35
{
35
{
36
  if (sizeof (GFC_INTEGER_4) == 1)
36
  if (sizeof (GFC_UINTEGER_4) == 1)
37
    return memcmp (a, b, n);
37
    return memcmp (a, b, n);
38
  else
38
  else
39
    return memcmp_char4 (a, b, n);
39
    return memcmp_char4 (a, b, n);
Lines 49-56 maxloc2_16_s4 (gfc_array_s4 * const restrict array Link Here
49
  index_type ret;
49
  index_type ret;
50
  index_type sstride;
50
  index_type sstride;
51
  index_type extent;
51
  index_type extent;
52
  const GFC_INTEGER_4 *src;
52
  const GFC_UINTEGER_4 *src;
53
  const GFC_INTEGER_4 *maxval;
53
  const GFC_UINTEGER_4 *maxval;
54
  index_type i;
54
  index_type i;
55
55
56
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
56
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
Lines 88-95 mmaxloc2_16_s4 (gfc_array_s4 * const restrict arra Link Here
88
  index_type ret;
88
  index_type ret;
89
  index_type sstride;
89
  index_type sstride;
90
  index_type extent;
90
  index_type extent;
91
  const GFC_INTEGER_4 *src;
91
  const GFC_UINTEGER_4 *src;
92
  const GFC_INTEGER_4 *maxval;
92
  const GFC_UINTEGER_4 *maxval;
93
  index_type i, j;
93
  index_type i, j;
94
  GFC_LOGICAL_1 *mbase;
94
  GFC_LOGICAL_1 *mbase;
95
  int mask_kind;
95
  int mask_kind;
(-)libgfortran/generated/maxloc2_4_s1.c (-7 / +7 lines)
Lines 28-39 see the files COPYING3 and COPYING.RUNTIME respect Link Here
28
#include <string.h>
28
#include <string.h>
29
#include <assert.h>
29
#include <assert.h>
30
30
31
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4)
31
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_4)
32
32
33
static inline int
33
static inline int
34
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
34
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
35
{
35
{
36
  if (sizeof (GFC_INTEGER_1) == 1)
36
  if (sizeof (GFC_UINTEGER_1) == 1)
37
    return memcmp (a, b, n);
37
    return memcmp (a, b, n);
38
  else
38
  else
39
    return memcmp_char4 (a, b, n);
39
    return memcmp_char4 (a, b, n);
Lines 49-56 maxloc2_4_s1 (gfc_array_s1 * const restrict array, Link Here
49
  index_type ret;
49
  index_type ret;
50
  index_type sstride;
50
  index_type sstride;
51
  index_type extent;
51
  index_type extent;
52
  const GFC_INTEGER_1 *src;
52
  const GFC_UINTEGER_1 *src;
53
  const GFC_INTEGER_1 *maxval;
53
  const GFC_UINTEGER_1 *maxval;
54
  index_type i;
54
  index_type i;
55
55
56
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
56
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
Lines 88-95 mmaxloc2_4_s1 (gfc_array_s1 * const restrict array Link Here
88
  index_type ret;
88
  index_type ret;
89
  index_type sstride;
89
  index_type sstride;
90
  index_type extent;
90
  index_type extent;
91
  const GFC_INTEGER_1 *src;
91
  const GFC_UINTEGER_1 *src;
92
  const GFC_INTEGER_1 *maxval;
92
  const GFC_UINTEGER_1 *maxval;
93
  index_type i, j;
93
  index_type i, j;
94
  GFC_LOGICAL_1 *mbase;
94
  GFC_LOGICAL_1 *mbase;
95
  int mask_kind;
95
  int mask_kind;
(-)libgfortran/generated/maxloc2_4_s4.c (-7 / +7 lines)
Lines 28-39 see the files COPYING3 and COPYING.RUNTIME respect Link Here
28
#include <string.h>
28
#include <string.h>
29
#include <assert.h>
29
#include <assert.h>
30
30
31
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4)
31
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_INTEGER_4)
32
32
33
static inline int
33
static inline int
34
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
34
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
35
{
35
{
36
  if (sizeof (GFC_INTEGER_4) == 1)
36
  if (sizeof (GFC_UINTEGER_4) == 1)
37
    return memcmp (a, b, n);
37
    return memcmp (a, b, n);
38
  else
38
  else
39
    return memcmp_char4 (a, b, n);
39
    return memcmp_char4 (a, b, n);
Lines 49-56 maxloc2_4_s4 (gfc_array_s4 * const restrict array, Link Here
49
  index_type ret;
49
  index_type ret;
50
  index_type sstride;
50
  index_type sstride;
51
  index_type extent;
51
  index_type extent;
52
  const GFC_INTEGER_4 *src;
52
  const GFC_UINTEGER_4 *src;
53
  const GFC_INTEGER_4 *maxval;
53
  const GFC_UINTEGER_4 *maxval;
54
  index_type i;
54
  index_type i;
55
55
56
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
56
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
Lines 88-95 mmaxloc2_4_s4 (gfc_array_s4 * const restrict array Link Here
88
  index_type ret;
88
  index_type ret;
89
  index_type sstride;
89
  index_type sstride;
90
  index_type extent;
90
  index_type extent;
91
  const GFC_INTEGER_4 *src;
91
  const GFC_UINTEGER_4 *src;
92
  const GFC_INTEGER_4 *maxval;
92
  const GFC_UINTEGER_4 *maxval;
93
  index_type i, j;
93
  index_type i, j;
94
  GFC_LOGICAL_1 *mbase;
94
  GFC_LOGICAL_1 *mbase;
95
  int mask_kind;
95
  int mask_kind;
(-)libgfortran/generated/maxloc2_8_s1.c (-7 / +7 lines)
Lines 28-39 see the files COPYING3 and COPYING.RUNTIME respect Link Here
28
#include <string.h>
28
#include <string.h>
29
#include <assert.h>
29
#include <assert.h>
30
30
31
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_8)
31
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_8)
32
32
33
static inline int
33
static inline int
34
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
34
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
35
{
35
{
36
  if (sizeof (GFC_INTEGER_1) == 1)
36
  if (sizeof (GFC_UINTEGER_1) == 1)
37
    return memcmp (a, b, n);
37
    return memcmp (a, b, n);
38
  else
38
  else
39
    return memcmp_char4 (a, b, n);
39
    return memcmp_char4 (a, b, n);
Lines 49-56 maxloc2_8_s1 (gfc_array_s1 * const restrict array, Link Here
49
  index_type ret;
49
  index_type ret;
50
  index_type sstride;
50
  index_type sstride;
51
  index_type extent;
51
  index_type extent;
52
  const GFC_INTEGER_1 *src;
52
  const GFC_UINTEGER_1 *src;
53
  const GFC_INTEGER_1 *maxval;
53
  const GFC_UINTEGER_1 *maxval;
54
  index_type i;
54
  index_type i;
55
55
56
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
56
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
Lines 88-95 mmaxloc2_8_s1 (gfc_array_s1 * const restrict array Link Here
88
  index_type ret;
88
  index_type ret;
89
  index_type sstride;
89
  index_type sstride;
90
  index_type extent;
90
  index_type extent;
91
  const GFC_INTEGER_1 *src;
91
  const GFC_UINTEGER_1 *src;
92
  const GFC_INTEGER_1 *maxval;
92
  const GFC_UINTEGER_1 *maxval;
93
  index_type i, j;
93
  index_type i, j;
94
  GFC_LOGICAL_1 *mbase;
94
  GFC_LOGICAL_1 *mbase;
95
  int mask_kind;
95
  int mask_kind;
(-)libgfortran/generated/maxloc2_8_s4.c (-7 / +7 lines)
Lines 28-39 see the files COPYING3 and COPYING.RUNTIME respect Link Here
28
#include <string.h>
28
#include <string.h>
29
#include <assert.h>
29
#include <assert.h>
30
30
31
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8)
31
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_INTEGER_8)
32
32
33
static inline int
33
static inline int
34
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
34
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
35
{
35
{
36
  if (sizeof (GFC_INTEGER_4) == 1)
36
  if (sizeof (GFC_UINTEGER_4) == 1)
37
    return memcmp (a, b, n);
37
    return memcmp (a, b, n);
38
  else
38
  else
39
    return memcmp_char4 (a, b, n);
39
    return memcmp_char4 (a, b, n);
Lines 49-56 maxloc2_8_s4 (gfc_array_s4 * const restrict array, Link Here
49
  index_type ret;
49
  index_type ret;
50
  index_type sstride;
50
  index_type sstride;
51
  index_type extent;
51
  index_type extent;
52
  const GFC_INTEGER_4 *src;
52
  const GFC_UINTEGER_4 *src;
53
  const GFC_INTEGER_4 *maxval;
53
  const GFC_UINTEGER_4 *maxval;
54
  index_type i;
54
  index_type i;
55
55
56
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
56
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
Lines 88-95 mmaxloc2_8_s4 (gfc_array_s4 * const restrict array Link Here
88
  index_type ret;
88
  index_type ret;
89
  index_type sstride;
89
  index_type sstride;
90
  index_type extent;
90
  index_type extent;
91
  const GFC_INTEGER_4 *src;
91
  const GFC_UINTEGER_4 *src;
92
  const GFC_INTEGER_4 *maxval;
92
  const GFC_UINTEGER_4 *maxval;
93
  index_type i, j;
93
  index_type i, j;
94
  GFC_LOGICAL_1 *mbase;
94
  GFC_LOGICAL_1 *mbase;
95
  int mask_kind;
95
  int mask_kind;
(-)libgfortran/generated/maxval0_s1.c (-13 / +13 lines)
Lines 30-41 see the files COPYING3 and COPYING.RUNTIME respect Link Here
30
#include <limits.h>
30
#include <limits.h>
31
31
32
32
33
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_1)
33
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_UINTEGER_1)
34
34
35
static inline int
35
static inline int
36
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
36
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
37
{
37
{
38
  if (sizeof (GFC_INTEGER_1) == 1)
38
  if (sizeof (GFC_UINTEGER_1) == 1)
39
    return memcmp (a, b, n);
39
    return memcmp (a, b, n);
40
  else
40
  else
41
    return memcmp_char4 (a, b, n);
41
    return memcmp_char4 (a, b, n);
Lines 44-56 static inline int Link Here
44
44
45
#define INITVAL 0
45
#define INITVAL 0
46
46
47
extern void maxval0_s1 (GFC_INTEGER_1 * restrict,
47
extern void maxval0_s1 (GFC_UINTEGER_1 * restrict,
48
        gfc_charlen_type,
48
        gfc_charlen_type,
49
	gfc_array_s1 * const restrict array, gfc_charlen_type);
49
	gfc_array_s1 * const restrict array, gfc_charlen_type);
50
export_proto(maxval0_s1);
50
export_proto(maxval0_s1);
51
51
52
void
52
void
53
maxval0_s1 (GFC_INTEGER_1 * restrict ret,
53
maxval0_s1 (GFC_UINTEGER_1 * restrict ret,
54
        gfc_charlen_type xlen,
54
        gfc_charlen_type xlen,
55
	gfc_array_s1 * const restrict array, gfc_charlen_type len)
55
	gfc_array_s1 * const restrict array, gfc_charlen_type len)
56
{
56
{
Lines 57-63 void Link Here
57
  index_type count[GFC_MAX_DIMENSIONS];
57
  index_type count[GFC_MAX_DIMENSIONS];
58
  index_type extent[GFC_MAX_DIMENSIONS];
58
  index_type extent[GFC_MAX_DIMENSIONS];
59
  index_type sstride[GFC_MAX_DIMENSIONS];
59
  index_type sstride[GFC_MAX_DIMENSIONS];
60
  const GFC_INTEGER_1 *base;
60
  const GFC_UINTEGER_1 *base;
61
  index_type rank;
61
  index_type rank;
62
  index_type n;
62
  index_type n;
63
63
Lines 83-89 void Link Here
83
83
84
  {
84
  {
85
85
86
  const GFC_INTEGER_1 *retval;
86
  const GFC_UINTEGER_1 *retval;
87
   retval = ret;
87
   retval = ret;
88
88
89
  while (base)
89
  while (base)
Lines 130-142 void Link Here
130
}
130
}
131
131
132
132
133
extern void mmaxval0_s1 (GFC_INTEGER_1 * restrict,
133
extern void mmaxval0_s1 (GFC_UINTEGER_1 * restrict,
134
       gfc_charlen_type, gfc_array_s1 * const restrict array,
134
       gfc_charlen_type, gfc_array_s1 * const restrict array,
135
       gfc_array_l1 * const restrict mask, gfc_charlen_type len);
135
       gfc_array_l1 * const restrict mask, gfc_charlen_type len);
136
export_proto(mmaxval0_s1);
136
export_proto(mmaxval0_s1);
137
137
138
void
138
void
139
mmaxval0_s1 (GFC_INTEGER_1 * const restrict ret,
139
mmaxval0_s1 (GFC_UINTEGER_1 * const restrict ret,
140
	gfc_charlen_type xlen, gfc_array_s1 * const restrict array,
140
	gfc_charlen_type xlen, gfc_array_s1 * const restrict array,
141
	gfc_array_l1 * const restrict mask, gfc_charlen_type len)
141
	gfc_array_l1 * const restrict mask, gfc_charlen_type len)
142
{
142
{
Lines 144-150 void Link Here
144
  index_type extent[GFC_MAX_DIMENSIONS];
144
  index_type extent[GFC_MAX_DIMENSIONS];
145
  index_type sstride[GFC_MAX_DIMENSIONS];
145
  index_type sstride[GFC_MAX_DIMENSIONS];
146
  index_type mstride[GFC_MAX_DIMENSIONS];
146
  index_type mstride[GFC_MAX_DIMENSIONS];
147
  const GFC_INTEGER_1 *base;
147
  const GFC_UINTEGER_1 *base;
148
  GFC_LOGICAL_1 *mbase;
148
  GFC_LOGICAL_1 *mbase;
149
  int rank;
149
  int rank;
150
  index_type n;
150
  index_type n;
Lines 185-191 void Link Here
185
  base = array->base_addr;
185
  base = array->base_addr;
186
  {
186
  {
187
187
188
  const GFC_INTEGER_1 *retval;
188
  const GFC_UINTEGER_1 *retval;
189
189
190
  retval = ret;
190
  retval = ret;
191
191
Lines 236-248 void Link Here
236
}
236
}
237
237
238
238
239
extern void smaxval0_s1 (GFC_INTEGER_1 * restrict,
239
extern void smaxval0_s1 (GFC_UINTEGER_1 * restrict,
240
        gfc_charlen_type,
240
        gfc_charlen_type,
241
	gfc_array_s1 * const restrict array, GFC_LOGICAL_4 *, gfc_charlen_type);
241
	gfc_array_s1 * const restrict array, GFC_LOGICAL_4 *, gfc_charlen_type);
242
export_proto(smaxval0_s1);
242
export_proto(smaxval0_s1);
243
243
244
void
244
void
245
smaxval0_s1 (GFC_INTEGER_1 * restrict ret,
245
smaxval0_s1 (GFC_UINTEGER_1 * restrict ret,
246
        gfc_charlen_type xlen, gfc_array_s1 * const restrict array,
246
        gfc_charlen_type xlen, gfc_array_s1 * const restrict array,
247
	GFC_LOGICAL_4 *mask, gfc_charlen_type len)
247
	GFC_LOGICAL_4 *mask, gfc_charlen_type len)
248
	
248
	
(-)libgfortran/generated/maxval0_s4.c (-13 / +13 lines)
Lines 30-41 see the files COPYING3 and COPYING.RUNTIME respect Link Here
30
#include <limits.h>
30
#include <limits.h>
31
31
32
32
33
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4)
33
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_UINTEGER_4)
34
34
35
static inline int
35
static inline int
36
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
36
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
37
{
37
{
38
  if (sizeof (GFC_INTEGER_4) == 1)
38
  if (sizeof (GFC_UINTEGER_4) == 1)
39
    return memcmp (a, b, n);
39
    return memcmp (a, b, n);
40
  else
40
  else
41
    return memcmp_char4 (a, b, n);
41
    return memcmp_char4 (a, b, n);
Lines 44-56 static inline int Link Here
44
44
45
#define INITVAL 0
45
#define INITVAL 0
46
46
47
extern void maxval0_s4 (GFC_INTEGER_4 * restrict,
47
extern void maxval0_s4 (GFC_UINTEGER_4 * restrict,
48
        gfc_charlen_type,
48
        gfc_charlen_type,
49
	gfc_array_s4 * const restrict array, gfc_charlen_type);
49
	gfc_array_s4 * const restrict array, gfc_charlen_type);
50
export_proto(maxval0_s4);
50
export_proto(maxval0_s4);
51
51
52
void
52
void
53
maxval0_s4 (GFC_INTEGER_4 * restrict ret,
53
maxval0_s4 (GFC_UINTEGER_4 * restrict ret,
54
        gfc_charlen_type xlen,
54
        gfc_charlen_type xlen,
55
	gfc_array_s4 * const restrict array, gfc_charlen_type len)
55
	gfc_array_s4 * const restrict array, gfc_charlen_type len)
56
{
56
{
Lines 57-63 void Link Here
57
  index_type count[GFC_MAX_DIMENSIONS];
57
  index_type count[GFC_MAX_DIMENSIONS];
58
  index_type extent[GFC_MAX_DIMENSIONS];
58
  index_type extent[GFC_MAX_DIMENSIONS];
59
  index_type sstride[GFC_MAX_DIMENSIONS];
59
  index_type sstride[GFC_MAX_DIMENSIONS];
60
  const GFC_INTEGER_4 *base;
60
  const GFC_UINTEGER_4 *base;
61
  index_type rank;
61
  index_type rank;
62
  index_type n;
62
  index_type n;
63
63
Lines 83-89 void Link Here
83
83
84
  {
84
  {
85
85
86
  const GFC_INTEGER_4 *retval;
86
  const GFC_UINTEGER_4 *retval;
87
   retval = ret;
87
   retval = ret;
88
88
89
  while (base)
89
  while (base)
Lines 130-142 void Link Here
130
}
130
}
131
131
132
132
133
extern void mmaxval0_s4 (GFC_INTEGER_4 * restrict,
133
extern void mmaxval0_s4 (GFC_UINTEGER_4 * restrict,
134
       gfc_charlen_type, gfc_array_s4 * const restrict array,
134
       gfc_charlen_type, gfc_array_s4 * const restrict array,
135
       gfc_array_l1 * const restrict mask, gfc_charlen_type len);
135
       gfc_array_l1 * const restrict mask, gfc_charlen_type len);
136
export_proto(mmaxval0_s4);
136
export_proto(mmaxval0_s4);
137
137
138
void
138
void
139
mmaxval0_s4 (GFC_INTEGER_4 * const restrict ret,
139
mmaxval0_s4 (GFC_UINTEGER_4 * const restrict ret,
140
	gfc_charlen_type xlen, gfc_array_s4 * const restrict array,
140
	gfc_charlen_type xlen, gfc_array_s4 * const restrict array,
141
	gfc_array_l1 * const restrict mask, gfc_charlen_type len)
141
	gfc_array_l1 * const restrict mask, gfc_charlen_type len)
142
{
142
{
Lines 144-150 void Link Here
144
  index_type extent[GFC_MAX_DIMENSIONS];
144
  index_type extent[GFC_MAX_DIMENSIONS];
145
  index_type sstride[GFC_MAX_DIMENSIONS];
145
  index_type sstride[GFC_MAX_DIMENSIONS];
146
  index_type mstride[GFC_MAX_DIMENSIONS];
146
  index_type mstride[GFC_MAX_DIMENSIONS];
147
  const GFC_INTEGER_4 *base;
147
  const GFC_UINTEGER_4 *base;
148
  GFC_LOGICAL_1 *mbase;
148
  GFC_LOGICAL_1 *mbase;
149
  int rank;
149
  int rank;
150
  index_type n;
150
  index_type n;
Lines 185-191 void Link Here
185
  base = array->base_addr;
185
  base = array->base_addr;
186
  {
186
  {
187
187
188
  const GFC_INTEGER_4 *retval;
188
  const GFC_UINTEGER_4 *retval;
189
189
190
  retval = ret;
190
  retval = ret;
191
191
Lines 236-248 void Link Here
236
}
236
}
237
237
238
238
239
extern void smaxval0_s4 (GFC_INTEGER_4 * restrict,
239
extern void smaxval0_s4 (GFC_UINTEGER_4 * restrict,
240
        gfc_charlen_type,
240
        gfc_charlen_type,
241
	gfc_array_s4 * const restrict array, GFC_LOGICAL_4 *, gfc_charlen_type);
241
	gfc_array_s4 * const restrict array, GFC_LOGICAL_4 *, gfc_charlen_type);
242
export_proto(smaxval0_s4);
242
export_proto(smaxval0_s4);
243
243
244
void
244
void
245
smaxval0_s4 (GFC_INTEGER_4 * restrict ret,
245
smaxval0_s4 (GFC_UINTEGER_4 * restrict ret,
246
        gfc_charlen_type xlen, gfc_array_s4 * const restrict array,
246
        gfc_charlen_type xlen, gfc_array_s4 * const restrict array,
247
	GFC_LOGICAL_4 *mask, gfc_charlen_type len)
247
	GFC_LOGICAL_4 *mask, gfc_charlen_type len)
248
	
248
	
(-)libgfortran/generated/maxval1_s1.c (-15 / +15 lines)
Lines 26-40 see the files COPYING3 and COPYING.RUNTIME respect Link Here
26
#include "libgfortran.h"
26
#include "libgfortran.h"
27
27
28
28
29
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_1)
29
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_UINTEGER_1)
30
30
31
#include <string.h>
31
#include <string.h>
32
#include <assert.h>
32
#include <assert.h>
33
33
34
static inline int
34
static inline int
35
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
35
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
36
{
36
{
37
  if (sizeof (GFC_INTEGER_1) == 1)
37
  if (sizeof (GFC_UINTEGER_1) == 1)
38
    return memcmp (a, b, n);
38
    return memcmp (a, b, n);
39
  else
39
  else
40
    return memcmp_char4 (a, b, n);
40
    return memcmp_char4 (a, b, n);
Lines 54-61 maxval1_s1 (gfc_array_s1 * const restrict retarray Link Here
54
  index_type extent[GFC_MAX_DIMENSIONS];
54
  index_type extent[GFC_MAX_DIMENSIONS];
55
  index_type sstride[GFC_MAX_DIMENSIONS];
55
  index_type sstride[GFC_MAX_DIMENSIONS];
56
  index_type dstride[GFC_MAX_DIMENSIONS];
56
  index_type dstride[GFC_MAX_DIMENSIONS];
57
  const GFC_INTEGER_1 * restrict base;
57
  const GFC_UINTEGER_1 * restrict base;
58
  GFC_INTEGER_1 * restrict dest;
58
  GFC_UINTEGER_1 * restrict dest;
59
  index_type rank;
59
  index_type rank;
60
  index_type n;
60
  index_type n;
61
  index_type len;
61
  index_type len;
Lines 119-125 maxval1_s1 (gfc_array_s1 * const restrict retarray Link Here
119
      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]
119
      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]
120
      		 * string_len;
120
      		 * string_len;
121
121
122
      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
122
      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1));
123
      if (alloc_size == 0)
123
      if (alloc_size == 0)
124
	{
124
	{
125
	  /* Make sure we have a zero-sized array.  */
125
	  /* Make sure we have a zero-sized array.  */
Lines 155-165 maxval1_s1 (gfc_array_s1 * const restrict retarray Link Here
155
  continue_loop = 1;
155
  continue_loop = 1;
156
  while (continue_loop)
156
  while (continue_loop)
157
    {
157
    {
158
      const GFC_INTEGER_1 * restrict src;
158
      const GFC_UINTEGER_1 * restrict src;
159
      src = base;
159
      src = base;
160
      {
160
      {
161
161
162
	const GFC_INTEGER_1 *retval;
162
	const GFC_UINTEGER_1 *retval;
163
	retval = base;
163
	retval = base;
164
	if (len <= 0)
164
	if (len <= 0)
165
	  memset (dest, 0, sizeof (*dest) * string_len);
165
	  memset (dest, 0, sizeof (*dest) * string_len);
Lines 228-235 mmaxval1_s1 (gfc_array_s1 * const restrict retarra Link Here
228
  index_type sstride[GFC_MAX_DIMENSIONS];
228
  index_type sstride[GFC_MAX_DIMENSIONS];
229
  index_type dstride[GFC_MAX_DIMENSIONS];
229
  index_type dstride[GFC_MAX_DIMENSIONS];
230
  index_type mstride[GFC_MAX_DIMENSIONS];
230
  index_type mstride[GFC_MAX_DIMENSIONS];
231
  GFC_INTEGER_1 * restrict dest;
231
  GFC_UINTEGER_1 * restrict dest;
232
  const GFC_INTEGER_1 * restrict base;
232
  const GFC_UINTEGER_1 * restrict base;
233
  const GFC_LOGICAL_1 * restrict mbase;
233
  const GFC_LOGICAL_1 * restrict mbase;
234
  index_type rank;
234
  index_type rank;
235
  index_type dim;
235
  index_type dim;
Lines 319-325 mmaxval1_s1 (gfc_array_s1 * const restrict retarra Link Here
319
	  return;
319
	  return;
320
	}
320
	}
321
      else
321
      else
322
	retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
322
	retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1));
323
323
324
    }
324
    }
325
  else
325
  else
Lines 349-355 mmaxval1_s1 (gfc_array_s1 * const restrict retarra Link Here
349
349
350
  while (base)
350
  while (base)
351
    {
351
    {
352
      const GFC_INTEGER_1 * restrict src;
352
      const GFC_UINTEGER_1 * restrict src;
353
      const GFC_LOGICAL_1 * restrict msrc;
353
      const GFC_LOGICAL_1 * restrict msrc;
354
354
355
      src = base;
355
      src = base;
Lines 356-362 mmaxval1_s1 (gfc_array_s1 * const restrict retarra Link Here
356
      msrc = mbase;
356
      msrc = mbase;
357
      {
357
      {
358
358
359
	const GFC_INTEGER_1 *retval;
359
	const GFC_UINTEGER_1 *retval;
360
	memset (dest, 0, sizeof (*dest) * string_len);
360
	memset (dest, 0, sizeof (*dest) * string_len);
361
	retval = dest;
361
	retval = dest;
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
Lines 430-436 smaxval1_s1 (gfc_array_s1 * const restrict retarra Link Here
430
  index_type count[GFC_MAX_DIMENSIONS];
430
  index_type count[GFC_MAX_DIMENSIONS];
431
  index_type extent[GFC_MAX_DIMENSIONS];
431
  index_type extent[GFC_MAX_DIMENSIONS];
432
  index_type dstride[GFC_MAX_DIMENSIONS];
432
  index_type dstride[GFC_MAX_DIMENSIONS];
433
  GFC_INTEGER_1 * restrict dest;
433
  GFC_UINTEGER_1 * restrict dest;
434
  index_type rank;
434
  index_type rank;
435
  index_type n;
435
  index_type n;
436
  index_type dim;
436
  index_type dim;
Lines 497-503 smaxval1_s1 (gfc_array_s1 * const restrict retarra Link Here
497
	  return;
497
	  return;
498
	}
498
	}
499
      else
499
      else
500
	retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
500
	retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1));
501
    }
501
    }
502
  else
502
  else
503
    {
503
    {
(-)libgfortran/generated/maxval1_s4.c (-15 / +15 lines)
Lines 26-40 see the files COPYING3 and COPYING.RUNTIME respect Link Here
26
#include "libgfortran.h"
26
#include "libgfortran.h"
27
27
28
28
29
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4)
29
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_UINTEGER_4)
30
30
31
#include <string.h>
31
#include <string.h>
32
#include <assert.h>
32
#include <assert.h>
33
33
34
static inline int
34
static inline int
35
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
35
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
36
{
36
{
37
  if (sizeof (GFC_INTEGER_4) == 1)
37
  if (sizeof (GFC_UINTEGER_4) == 1)
38
    return memcmp (a, b, n);
38
    return memcmp (a, b, n);
39
  else
39
  else
40
    return memcmp_char4 (a, b, n);
40
    return memcmp_char4 (a, b, n);
Lines 54-61 maxval1_s4 (gfc_array_s4 * const restrict retarray Link Here
54
  index_type extent[GFC_MAX_DIMENSIONS];
54
  index_type extent[GFC_MAX_DIMENSIONS];
55
  index_type sstride[GFC_MAX_DIMENSIONS];
55
  index_type sstride[GFC_MAX_DIMENSIONS];
56
  index_type dstride[GFC_MAX_DIMENSIONS];
56
  index_type dstride[GFC_MAX_DIMENSIONS];
57
  const GFC_INTEGER_4 * restrict base;
57
  const GFC_UINTEGER_4 * restrict base;
58
  GFC_INTEGER_4 * restrict dest;
58
  GFC_UINTEGER_4 * restrict dest;
59
  index_type rank;
59
  index_type rank;
60
  index_type n;
60
  index_type n;
61
  index_type len;
61
  index_type len;
Lines 119-125 maxval1_s4 (gfc_array_s4 * const restrict retarray Link Here
119
      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]
119
      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]
120
      		 * string_len;
120
      		 * string_len;
121
121
122
      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
122
      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4));
123
      if (alloc_size == 0)
123
      if (alloc_size == 0)
124
	{
124
	{
125
	  /* Make sure we have a zero-sized array.  */
125
	  /* Make sure we have a zero-sized array.  */
Lines 155-165 maxval1_s4 (gfc_array_s4 * const restrict retarray Link Here
155
  continue_loop = 1;
155
  continue_loop = 1;
156
  while (continue_loop)
156
  while (continue_loop)
157
    {
157
    {
158
      const GFC_INTEGER_4 * restrict src;
158
      const GFC_UINTEGER_4 * restrict src;
159
      src = base;
159
      src = base;
160
      {
160
      {
161
161
162
	const GFC_INTEGER_4 *retval;
162
	const GFC_UINTEGER_4 *retval;
163
	retval = base;
163
	retval = base;
164
	if (len <= 0)
164
	if (len <= 0)
165
	  memset (dest, 0, sizeof (*dest) * string_len);
165
	  memset (dest, 0, sizeof (*dest) * string_len);
Lines 228-235 mmaxval1_s4 (gfc_array_s4 * const restrict retarra Link Here
228
  index_type sstride[GFC_MAX_DIMENSIONS];
228
  index_type sstride[GFC_MAX_DIMENSIONS];
229
  index_type dstride[GFC_MAX_DIMENSIONS];
229
  index_type dstride[GFC_MAX_DIMENSIONS];
230
  index_type mstride[GFC_MAX_DIMENSIONS];
230
  index_type mstride[GFC_MAX_DIMENSIONS];
231
  GFC_INTEGER_4 * restrict dest;
231
  GFC_UINTEGER_4 * restrict dest;
232
  const GFC_INTEGER_4 * restrict base;
232
  const GFC_UINTEGER_4 * restrict base;
233
  const GFC_LOGICAL_1 * restrict mbase;
233
  const GFC_LOGICAL_1 * restrict mbase;
234
  index_type rank;
234
  index_type rank;
235
  index_type dim;
235
  index_type dim;
Lines 319-325 mmaxval1_s4 (gfc_array_s4 * const restrict retarra Link Here
319
	  return;
319
	  return;
320
	}
320
	}
321
      else
321
      else
322
	retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
322
	retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4));
323
323
324
    }
324
    }
325
  else
325
  else
Lines 349-355 mmaxval1_s4 (gfc_array_s4 * const restrict retarra Link Here
349
349
350
  while (base)
350
  while (base)
351
    {
351
    {
352
      const GFC_INTEGER_4 * restrict src;
352
      const GFC_UINTEGER_4 * restrict src;
353
      const GFC_LOGICAL_1 * restrict msrc;
353
      const GFC_LOGICAL_1 * restrict msrc;
354
354
355
      src = base;
355
      src = base;
Lines 356-362 mmaxval1_s4 (gfc_array_s4 * const restrict retarra Link Here
356
      msrc = mbase;
356
      msrc = mbase;
357
      {
357
      {
358
358
359
	const GFC_INTEGER_4 *retval;
359
	const GFC_UINTEGER_4 *retval;
360
	memset (dest, 0, sizeof (*dest) * string_len);
360
	memset (dest, 0, sizeof (*dest) * string_len);
361
	retval = dest;
361
	retval = dest;
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
Lines 430-436 smaxval1_s4 (gfc_array_s4 * const restrict retarra Link Here
430
  index_type count[GFC_MAX_DIMENSIONS];
430
  index_type count[GFC_MAX_DIMENSIONS];
431
  index_type extent[GFC_MAX_DIMENSIONS];
431
  index_type extent[GFC_MAX_DIMENSIONS];
432
  index_type dstride[GFC_MAX_DIMENSIONS];
432
  index_type dstride[GFC_MAX_DIMENSIONS];
433
  GFC_INTEGER_4 * restrict dest;
433
  GFC_UINTEGER_4 * restrict dest;
434
  index_type rank;
434
  index_type rank;
435
  index_type n;
435
  index_type n;
436
  index_type dim;
436
  index_type dim;
Lines 497-503 smaxval1_s4 (gfc_array_s4 * const restrict retarra Link Here
497
	  return;
497
	  return;
498
	}
498
	}
499
      else
499
      else
500
	retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
500
	retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4));
501
    }
501
    }
502
  else
502
  else
503
    {
503
    {
(-)libgfortran/generated/minloc0_16_s1.c (-7 / +7 lines)
Lines 30-43 see the files COPYING3 and COPYING.RUNTIME respect Link Here
30
#include <limits.h>
30
#include <limits.h>
31
31
32
32
33
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16)
33
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_16)
34
34
35
#define HAVE_BACK_ARG 1
35
#define HAVE_BACK_ARG 1
36
36
37
static inline int
37
static inline int
38
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
38
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
39
{
39
{
40
  if (sizeof (GFC_INTEGER_1) == 1)
40
  if (sizeof (GFC_UINTEGER_1) == 1)
41
    return memcmp (a, b, n);
41
    return memcmp (a, b, n);
42
  else
42
  else
43
    return memcmp_char4 (a, b, n);
43
    return memcmp_char4 (a, b, n);
Lines 56-62 minloc0_16_s1 (gfc_array_i16 * const restrict reta Link Here
56
  index_type extent[GFC_MAX_DIMENSIONS];
56
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type dstride;
58
  index_type dstride;
59
  const GFC_INTEGER_1 *base;
59
  const GFC_UINTEGER_1 *base;
60
  GFC_INTEGER_16 * restrict dest;
60
  GFC_INTEGER_16 * restrict dest;
61
  index_type rank;
61
  index_type rank;
62
  index_type n;
62
  index_type n;
Lines 102-108 minloc0_16_s1 (gfc_array_i16 * const restrict reta Link Here
102
    dest[n * dstride] = 1;
102
    dest[n * dstride] = 1;
103
  {
103
  {
104
104
105
  const GFC_INTEGER_1 *minval;
105
  const GFC_UINTEGER_1 *minval;
106
   minval = NULL;
106
   minval = NULL;
107
107
108
  while (base)
108
  while (base)
Lines 168-174 mminloc0_16_s1 (gfc_array_i16 * const restrict ret Link Here
168
  index_type mstride[GFC_MAX_DIMENSIONS];
168
  index_type mstride[GFC_MAX_DIMENSIONS];
169
  index_type dstride;
169
  index_type dstride;
170
  GFC_INTEGER_16 *dest;
170
  GFC_INTEGER_16 *dest;
171
  const GFC_INTEGER_1 *base;
171
  const GFC_UINTEGER_1 *base;
172
  GFC_LOGICAL_1 *mbase;
172
  GFC_LOGICAL_1 *mbase;
173
  int rank;
173
  int rank;
174
  index_type n;
174
  index_type n;
Lines 234-240 mminloc0_16_s1 (gfc_array_i16 * const restrict ret Link Here
234
    dest[n * dstride] = 0;
234
    dest[n * dstride] = 0;
235
  {
235
  {
236
236
237
  const GFC_INTEGER_1 *minval;
237
  const GFC_UINTEGER_1 *minval;
238
238
239
  minval = NULL;
239
  minval = NULL;
240
240
(-)libgfortran/generated/minloc0_16_s4.c (-7 / +7 lines)
Lines 30-43 see the files COPYING3 and COPYING.RUNTIME respect Link Here
30
#include <limits.h>
30
#include <limits.h>
31
31
32
32
33
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16)
33
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_INTEGER_16)
34
34
35
#define HAVE_BACK_ARG 1
35
#define HAVE_BACK_ARG 1
36
36
37
static inline int
37
static inline int
38
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
38
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
39
{
39
{
40
  if (sizeof (GFC_INTEGER_4) == 1)
40
  if (sizeof (GFC_UINTEGER_4) == 1)
41
    return memcmp (a, b, n);
41
    return memcmp (a, b, n);
42
  else
42
  else
43
    return memcmp_char4 (a, b, n);
43
    return memcmp_char4 (a, b, n);
Lines 56-62 minloc0_16_s4 (gfc_array_i16 * const restrict reta Link Here
56
  index_type extent[GFC_MAX_DIMENSIONS];
56
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type dstride;
58
  index_type dstride;
59
  const GFC_INTEGER_4 *base;
59
  const GFC_UINTEGER_4 *base;
60
  GFC_INTEGER_16 * restrict dest;
60
  GFC_INTEGER_16 * restrict dest;
61
  index_type rank;
61
  index_type rank;
62
  index_type n;
62
  index_type n;
Lines 102-108 minloc0_16_s4 (gfc_array_i16 * const restrict reta Link Here
102
    dest[n * dstride] = 1;
102
    dest[n * dstride] = 1;
103
  {
103
  {
104
104
105
  const GFC_INTEGER_4 *minval;
105
  const GFC_UINTEGER_4 *minval;
106
   minval = NULL;
106
   minval = NULL;
107
107
108
  while (base)
108
  while (base)
Lines 168-174 mminloc0_16_s4 (gfc_array_i16 * const restrict ret Link Here
168
  index_type mstride[GFC_MAX_DIMENSIONS];
168
  index_type mstride[GFC_MAX_DIMENSIONS];
169
  index_type dstride;
169
  index_type dstride;
170
  GFC_INTEGER_16 *dest;
170
  GFC_INTEGER_16 *dest;
171
  const GFC_INTEGER_4 *base;
171
  const GFC_UINTEGER_4 *base;
172
  GFC_LOGICAL_1 *mbase;
172
  GFC_LOGICAL_1 *mbase;
173
  int rank;
173
  int rank;
174
  index_type n;
174
  index_type n;
Lines 234-240 mminloc0_16_s4 (gfc_array_i16 * const restrict ret Link Here
234
    dest[n * dstride] = 0;
234
    dest[n * dstride] = 0;
235
  {
235
  {
236
236
237
  const GFC_INTEGER_4 *minval;
237
  const GFC_UINTEGER_4 *minval;
238
238
239
  minval = NULL;
239
  minval = NULL;
240
240
(-)libgfortran/generated/minloc0_4_s1.c (-7 / +7 lines)
Lines 30-43 see the files COPYING3 and COPYING.RUNTIME respect Link Here
30
#include <limits.h>
30
#include <limits.h>
31
31
32
32
33
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4)
33
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_4)
34
34
35
#define HAVE_BACK_ARG 1
35
#define HAVE_BACK_ARG 1
36
36
37
static inline int
37
static inline int
38
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
38
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
39
{
39
{
40
  if (sizeof (GFC_INTEGER_1) == 1)
40
  if (sizeof (GFC_UINTEGER_1) == 1)
41
    return memcmp (a, b, n);
41
    return memcmp (a, b, n);
42
  else
42
  else
43
    return memcmp_char4 (a, b, n);
43
    return memcmp_char4 (a, b, n);
Lines 56-62 minloc0_4_s1 (gfc_array_i4 * const restrict retarr Link Here
56
  index_type extent[GFC_MAX_DIMENSIONS];
56
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type dstride;
58
  index_type dstride;
59
  const GFC_INTEGER_1 *base;
59
  const GFC_UINTEGER_1 *base;
60
  GFC_INTEGER_4 * restrict dest;
60
  GFC_INTEGER_4 * restrict dest;
61
  index_type rank;
61
  index_type rank;
62
  index_type n;
62
  index_type n;
Lines 102-108 minloc0_4_s1 (gfc_array_i4 * const restrict retarr Link Here
102
    dest[n * dstride] = 1;
102
    dest[n * dstride] = 1;
103
  {
103
  {
104
104
105
  const GFC_INTEGER_1 *minval;
105
  const GFC_UINTEGER_1 *minval;
106
   minval = NULL;
106
   minval = NULL;
107
107
108
  while (base)
108
  while (base)
Lines 168-174 mminloc0_4_s1 (gfc_array_i4 * const restrict retar Link Here
168
  index_type mstride[GFC_MAX_DIMENSIONS];
168
  index_type mstride[GFC_MAX_DIMENSIONS];
169
  index_type dstride;
169
  index_type dstride;
170
  GFC_INTEGER_4 *dest;
170
  GFC_INTEGER_4 *dest;
171
  const GFC_INTEGER_1 *base;
171
  const GFC_UINTEGER_1 *base;
172
  GFC_LOGICAL_1 *mbase;
172
  GFC_LOGICAL_1 *mbase;
173
  int rank;
173
  int rank;
174
  index_type n;
174
  index_type n;
Lines 234-240 mminloc0_4_s1 (gfc_array_i4 * const restrict retar Link Here
234
    dest[n * dstride] = 0;
234
    dest[n * dstride] = 0;
235
  {
235
  {
236
236
237
  const GFC_INTEGER_1 *minval;
237
  const GFC_UINTEGER_1 *minval;
238
238
239
  minval = NULL;
239
  minval = NULL;
240
240
(-)libgfortran/generated/minloc0_4_s4.c (-7 / +7 lines)
Lines 30-43 see the files COPYING3 and COPYING.RUNTIME respect Link Here
30
#include <limits.h>
30
#include <limits.h>
31
31
32
32
33
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4)
33
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_INTEGER_4)
34
34
35
#define HAVE_BACK_ARG 1
35
#define HAVE_BACK_ARG 1
36
36
37
static inline int
37
static inline int
38
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
38
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
39
{
39
{
40
  if (sizeof (GFC_INTEGER_4) == 1)
40
  if (sizeof (GFC_UINTEGER_4) == 1)
41
    return memcmp (a, b, n);
41
    return memcmp (a, b, n);
42
  else
42
  else
43
    return memcmp_char4 (a, b, n);
43
    return memcmp_char4 (a, b, n);
Lines 56-62 minloc0_4_s4 (gfc_array_i4 * const restrict retarr Link Here
56
  index_type extent[GFC_MAX_DIMENSIONS];
56
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type dstride;
58
  index_type dstride;
59
  const GFC_INTEGER_4 *base;
59
  const GFC_UINTEGER_4 *base;
60
  GFC_INTEGER_4 * restrict dest;
60
  GFC_INTEGER_4 * restrict dest;
61
  index_type rank;
61
  index_type rank;
62
  index_type n;
62
  index_type n;
Lines 102-108 minloc0_4_s4 (gfc_array_i4 * const restrict retarr Link Here
102
    dest[n * dstride] = 1;
102
    dest[n * dstride] = 1;
103
  {
103
  {
104
104
105
  const GFC_INTEGER_4 *minval;
105
  const GFC_UINTEGER_4 *minval;
106
   minval = NULL;
106
   minval = NULL;
107
107
108
  while (base)
108
  while (base)
Lines 168-174 mminloc0_4_s4 (gfc_array_i4 * const restrict retar Link Here
168
  index_type mstride[GFC_MAX_DIMENSIONS];
168
  index_type mstride[GFC_MAX_DIMENSIONS];
169
  index_type dstride;
169
  index_type dstride;
170
  GFC_INTEGER_4 *dest;
170
  GFC_INTEGER_4 *dest;
171
  const GFC_INTEGER_4 *base;
171
  const GFC_UINTEGER_4 *base;
172
  GFC_LOGICAL_1 *mbase;
172
  GFC_LOGICAL_1 *mbase;
173
  int rank;
173
  int rank;
174
  index_type n;
174
  index_type n;
Lines 234-240 mminloc0_4_s4 (gfc_array_i4 * const restrict retar Link Here
234
    dest[n * dstride] = 0;
234
    dest[n * dstride] = 0;
235
  {
235
  {
236
236
237
  const GFC_INTEGER_4 *minval;
237
  const GFC_UINTEGER_4 *minval;
238
238
239
  minval = NULL;
239
  minval = NULL;
240
240
(-)libgfortran/generated/minloc0_8_s1.c (-7 / +7 lines)
Lines 30-43 see the files COPYING3 and COPYING.RUNTIME respect Link Here
30
#include <limits.h>
30
#include <limits.h>
31
31
32
32
33
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_8)
33
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_8)
34
34
35
#define HAVE_BACK_ARG 1
35
#define HAVE_BACK_ARG 1
36
36
37
static inline int
37
static inline int
38
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
38
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
39
{
39
{
40
  if (sizeof (GFC_INTEGER_1) == 1)
40
  if (sizeof (GFC_UINTEGER_1) == 1)
41
    return memcmp (a, b, n);
41
    return memcmp (a, b, n);
42
  else
42
  else
43
    return memcmp_char4 (a, b, n);
43
    return memcmp_char4 (a, b, n);
Lines 56-62 minloc0_8_s1 (gfc_array_i8 * const restrict retarr Link Here
56
  index_type extent[GFC_MAX_DIMENSIONS];
56
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type dstride;
58
  index_type dstride;
59
  const GFC_INTEGER_1 *base;
59
  const GFC_UINTEGER_1 *base;
60
  GFC_INTEGER_8 * restrict dest;
60
  GFC_INTEGER_8 * restrict dest;
61
  index_type rank;
61
  index_type rank;
62
  index_type n;
62
  index_type n;
Lines 102-108 minloc0_8_s1 (gfc_array_i8 * const restrict retarr Link Here
102
    dest[n * dstride] = 1;
102
    dest[n * dstride] = 1;
103
  {
103
  {
104
104
105
  const GFC_INTEGER_1 *minval;
105
  const GFC_UINTEGER_1 *minval;
106
   minval = NULL;
106
   minval = NULL;
107
107
108
  while (base)
108
  while (base)
Lines 168-174 mminloc0_8_s1 (gfc_array_i8 * const restrict retar Link Here
168
  index_type mstride[GFC_MAX_DIMENSIONS];
168
  index_type mstride[GFC_MAX_DIMENSIONS];
169
  index_type dstride;
169
  index_type dstride;
170
  GFC_INTEGER_8 *dest;
170
  GFC_INTEGER_8 *dest;
171
  const GFC_INTEGER_1 *base;
171
  const GFC_UINTEGER_1 *base;
172
  GFC_LOGICAL_1 *mbase;
172
  GFC_LOGICAL_1 *mbase;
173
  int rank;
173
  int rank;
174
  index_type n;
174
  index_type n;
Lines 234-240 mminloc0_8_s1 (gfc_array_i8 * const restrict retar Link Here
234
    dest[n * dstride] = 0;
234
    dest[n * dstride] = 0;
235
  {
235
  {
236
236
237
  const GFC_INTEGER_1 *minval;
237
  const GFC_UINTEGER_1 *minval;
238
238
239
  minval = NULL;
239
  minval = NULL;
240
240
(-)libgfortran/generated/minloc0_8_s4.c (-7 / +7 lines)
Lines 30-43 see the files COPYING3 and COPYING.RUNTIME respect Link Here
30
#include <limits.h>
30
#include <limits.h>
31
31
32
32
33
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8)
33
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_INTEGER_8)
34
34
35
#define HAVE_BACK_ARG 1
35
#define HAVE_BACK_ARG 1
36
36
37
static inline int
37
static inline int
38
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
38
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
39
{
39
{
40
  if (sizeof (GFC_INTEGER_4) == 1)
40
  if (sizeof (GFC_UINTEGER_4) == 1)
41
    return memcmp (a, b, n);
41
    return memcmp (a, b, n);
42
  else
42
  else
43
    return memcmp_char4 (a, b, n);
43
    return memcmp_char4 (a, b, n);
Lines 56-62 minloc0_8_s4 (gfc_array_i8 * const restrict retarr Link Here
56
  index_type extent[GFC_MAX_DIMENSIONS];
56
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
57
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type dstride;
58
  index_type dstride;
59
  const GFC_INTEGER_4 *base;
59
  const GFC_UINTEGER_4 *base;
60
  GFC_INTEGER_8 * restrict dest;
60
  GFC_INTEGER_8 * restrict dest;
61
  index_type rank;
61
  index_type rank;
62
  index_type n;
62
  index_type n;
Lines 102-108 minloc0_8_s4 (gfc_array_i8 * const restrict retarr Link Here
102
    dest[n * dstride] = 1;
102
    dest[n * dstride] = 1;
103
  {
103
  {
104
104
105
  const GFC_INTEGER_4 *minval;
105
  const GFC_UINTEGER_4 *minval;
106
   minval = NULL;
106
   minval = NULL;
107
107
108
  while (base)
108
  while (base)
Lines 168-174 mminloc0_8_s4 (gfc_array_i8 * const restrict retar Link Here
168
  index_type mstride[GFC_MAX_DIMENSIONS];
168
  index_type mstride[GFC_MAX_DIMENSIONS];
169
  index_type dstride;
169
  index_type dstride;
170
  GFC_INTEGER_8 *dest;
170
  GFC_INTEGER_8 *dest;
171
  const GFC_INTEGER_4 *base;
171
  const GFC_UINTEGER_4 *base;
172
  GFC_LOGICAL_1 *mbase;
172
  GFC_LOGICAL_1 *mbase;
173
  int rank;
173
  int rank;
174
  index_type n;
174
  index_type n;
Lines 234-240 mminloc0_8_s4 (gfc_array_i8 * const restrict retar Link Here
234
    dest[n * dstride] = 0;
234
    dest[n * dstride] = 0;
235
  {
235
  {
236
236
237
  const GFC_INTEGER_4 *minval;
237
  const GFC_UINTEGER_4 *minval;
238
238
239
  minval = NULL;
239
  minval = NULL;
240
240
(-)libgfortran/generated/minloc1_16_s1.c (-9 / +9 lines)
Lines 26-32 see the files COPYING3 and COPYING.RUNTIME respect Link Here
26
#include "libgfortran.h"
26
#include "libgfortran.h"
27
27
28
28
29
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16)
29
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_16)
30
30
31
#define HAVE_BACK_ARG 1
31
#define HAVE_BACK_ARG 1
32
32
Lines 34-42 see the files COPYING3 and COPYING.RUNTIME respect Link Here
34
#include <assert.h>
34
#include <assert.h>
35
35
36
static inline int
36
static inline int
37
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
37
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
38
{
38
{
39
  if (sizeof (GFC_INTEGER_1) == 1)
39
  if (sizeof (GFC_UINTEGER_1) == 1)
40
    return memcmp (a, b, n);
40
    return memcmp (a, b, n);
41
  else
41
  else
42
    return memcmp_char4 (a, b, n);
42
    return memcmp_char4 (a, b, n);
Lines 57-63 minloc1_16_s1 (gfc_array_i16 * const restrict reta Link Here
57
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type extent[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
60
  const GFC_INTEGER_1 * restrict base;
60
  const GFC_UINTEGER_1 * restrict base;
61
  GFC_INTEGER_16 * restrict dest;
61
  GFC_INTEGER_16 * restrict dest;
62
  index_type rank;
62
  index_type rank;
63
  index_type n;
63
  index_type n;
Lines 155-166 minloc1_16_s1 (gfc_array_i16 * const restrict reta Link Here
155
  continue_loop = 1;
155
  continue_loop = 1;
156
  while (continue_loop)
156
  while (continue_loop)
157
    {
157
    {
158
      const GFC_INTEGER_1 * restrict src;
158
      const GFC_UINTEGER_1 * restrict src;
159
      GFC_INTEGER_16 result;
159
      GFC_INTEGER_16 result;
160
      src = base;
160
      src = base;
161
      {
161
      {
162
162
163
	const GFC_INTEGER_1 *minval;
163
	const GFC_UINTEGER_1 *minval;
164
	minval = NULL;
164
	minval = NULL;
165
	result = 0;
165
	result = 0;
166
	if (len <= 0)
166
	if (len <= 0)
Lines 231-237 mminloc1_16_s1 (gfc_array_i16 * const restrict ret Link Here
231
  index_type dstride[GFC_MAX_DIMENSIONS];
231
  index_type dstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
233
  GFC_INTEGER_16 * restrict dest;
233
  GFC_INTEGER_16 * restrict dest;
234
  const GFC_INTEGER_1 * restrict base;
234
  const GFC_UINTEGER_1 * restrict base;
235
  const GFC_LOGICAL_1 * restrict mbase;
235
  const GFC_LOGICAL_1 * restrict mbase;
236
  index_type rank;
236
  index_type rank;
237
  index_type dim;
237
  index_type dim;
Lines 349-355 mminloc1_16_s1 (gfc_array_i16 * const restrict ret Link Here
349
349
350
  while (base)
350
  while (base)
351
    {
351
    {
352
      const GFC_INTEGER_1 * restrict src;
352
      const GFC_UINTEGER_1 * restrict src;
353
      const GFC_LOGICAL_1 * restrict msrc;
353
      const GFC_LOGICAL_1 * restrict msrc;
354
      GFC_INTEGER_16 result;
354
      GFC_INTEGER_16 result;
355
      src = base;
355
      src = base;
Lines 356-362 mminloc1_16_s1 (gfc_array_i16 * const restrict ret Link Here
356
      msrc = mbase;
356
      msrc = mbase;
357
      {
357
      {
358
358
359
	const GFC_INTEGER_1 *minval;
359
	const GFC_UINTEGER_1 *minval;
360
	minval = base;
360
	minval = base;
361
	result = 0;
361
	result = 0;
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
(-)libgfortran/generated/minloc1_16_s4.c (-9 / +9 lines)
Lines 26-32 see the files COPYING3 and COPYING.RUNTIME respect Link Here
26
#include "libgfortran.h"
26
#include "libgfortran.h"
27
27
28
28
29
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16)
29
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_INTEGER_16)
30
30
31
#define HAVE_BACK_ARG 1
31
#define HAVE_BACK_ARG 1
32
32
Lines 34-42 see the files COPYING3 and COPYING.RUNTIME respect Link Here
34
#include <assert.h>
34
#include <assert.h>
35
35
36
static inline int
36
static inline int
37
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
37
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
38
{
38
{
39
  if (sizeof (GFC_INTEGER_4) == 1)
39
  if (sizeof (GFC_UINTEGER_4) == 1)
40
    return memcmp (a, b, n);
40
    return memcmp (a, b, n);
41
  else
41
  else
42
    return memcmp_char4 (a, b, n);
42
    return memcmp_char4 (a, b, n);
Lines 57-63 minloc1_16_s4 (gfc_array_i16 * const restrict reta Link Here
57
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type extent[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
60
  const GFC_INTEGER_4 * restrict base;
60
  const GFC_UINTEGER_4 * restrict base;
61
  GFC_INTEGER_16 * restrict dest;
61
  GFC_INTEGER_16 * restrict dest;
62
  index_type rank;
62
  index_type rank;
63
  index_type n;
63
  index_type n;
Lines 155-166 minloc1_16_s4 (gfc_array_i16 * const restrict reta Link Here
155
  continue_loop = 1;
155
  continue_loop = 1;
156
  while (continue_loop)
156
  while (continue_loop)
157
    {
157
    {
158
      const GFC_INTEGER_4 * restrict src;
158
      const GFC_UINTEGER_4 * restrict src;
159
      GFC_INTEGER_16 result;
159
      GFC_INTEGER_16 result;
160
      src = base;
160
      src = base;
161
      {
161
      {
162
162
163
	const GFC_INTEGER_4 *minval;
163
	const GFC_UINTEGER_4 *minval;
164
	minval = NULL;
164
	minval = NULL;
165
	result = 0;
165
	result = 0;
166
	if (len <= 0)
166
	if (len <= 0)
Lines 231-237 mminloc1_16_s4 (gfc_array_i16 * const restrict ret Link Here
231
  index_type dstride[GFC_MAX_DIMENSIONS];
231
  index_type dstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
233
  GFC_INTEGER_16 * restrict dest;
233
  GFC_INTEGER_16 * restrict dest;
234
  const GFC_INTEGER_4 * restrict base;
234
  const GFC_UINTEGER_4 * restrict base;
235
  const GFC_LOGICAL_1 * restrict mbase;
235
  const GFC_LOGICAL_1 * restrict mbase;
236
  index_type rank;
236
  index_type rank;
237
  index_type dim;
237
  index_type dim;
Lines 349-355 mminloc1_16_s4 (gfc_array_i16 * const restrict ret Link Here
349
349
350
  while (base)
350
  while (base)
351
    {
351
    {
352
      const GFC_INTEGER_4 * restrict src;
352
      const GFC_UINTEGER_4 * restrict src;
353
      const GFC_LOGICAL_1 * restrict msrc;
353
      const GFC_LOGICAL_1 * restrict msrc;
354
      GFC_INTEGER_16 result;
354
      GFC_INTEGER_16 result;
355
      src = base;
355
      src = base;
Lines 356-362 mminloc1_16_s4 (gfc_array_i16 * const restrict ret Link Here
356
      msrc = mbase;
356
      msrc = mbase;
357
      {
357
      {
358
358
359
	const GFC_INTEGER_4 *minval;
359
	const GFC_UINTEGER_4 *minval;
360
	minval = base;
360
	minval = base;
361
	result = 0;
361
	result = 0;
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
(-)libgfortran/generated/minloc1_4_s1.c (-9 / +9 lines)
Lines 26-32 see the files COPYING3 and COPYING.RUNTIME respect Link Here
26
#include "libgfortran.h"
26
#include "libgfortran.h"
27
27
28
28
29
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4)
29
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_4)
30
30
31
#define HAVE_BACK_ARG 1
31
#define HAVE_BACK_ARG 1
32
32
Lines 34-42 see the files COPYING3 and COPYING.RUNTIME respect Link Here
34
#include <assert.h>
34
#include <assert.h>
35
35
36
static inline int
36
static inline int
37
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
37
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
38
{
38
{
39
  if (sizeof (GFC_INTEGER_1) == 1)
39
  if (sizeof (GFC_UINTEGER_1) == 1)
40
    return memcmp (a, b, n);
40
    return memcmp (a, b, n);
41
  else
41
  else
42
    return memcmp_char4 (a, b, n);
42
    return memcmp_char4 (a, b, n);
Lines 57-63 minloc1_4_s1 (gfc_array_i4 * const restrict retarr Link Here
57
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type extent[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
60
  const GFC_INTEGER_1 * restrict base;
60
  const GFC_UINTEGER_1 * restrict base;
61
  GFC_INTEGER_4 * restrict dest;
61
  GFC_INTEGER_4 * restrict dest;
62
  index_type rank;
62
  index_type rank;
63
  index_type n;
63
  index_type n;
Lines 155-166 minloc1_4_s1 (gfc_array_i4 * const restrict retarr Link Here
155
  continue_loop = 1;
155
  continue_loop = 1;
156
  while (continue_loop)
156
  while (continue_loop)
157
    {
157
    {
158
      const GFC_INTEGER_1 * restrict src;
158
      const GFC_UINTEGER_1 * restrict src;
159
      GFC_INTEGER_4 result;
159
      GFC_INTEGER_4 result;
160
      src = base;
160
      src = base;
161
      {
161
      {
162
162
163
	const GFC_INTEGER_1 *minval;
163
	const GFC_UINTEGER_1 *minval;
164
	minval = NULL;
164
	minval = NULL;
165
	result = 0;
165
	result = 0;
166
	if (len <= 0)
166
	if (len <= 0)
Lines 231-237 mminloc1_4_s1 (gfc_array_i4 * const restrict retar Link Here
231
  index_type dstride[GFC_MAX_DIMENSIONS];
231
  index_type dstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
233
  GFC_INTEGER_4 * restrict dest;
233
  GFC_INTEGER_4 * restrict dest;
234
  const GFC_INTEGER_1 * restrict base;
234
  const GFC_UINTEGER_1 * restrict base;
235
  const GFC_LOGICAL_1 * restrict mbase;
235
  const GFC_LOGICAL_1 * restrict mbase;
236
  index_type rank;
236
  index_type rank;
237
  index_type dim;
237
  index_type dim;
Lines 349-355 mminloc1_4_s1 (gfc_array_i4 * const restrict retar Link Here
349
349
350
  while (base)
350
  while (base)
351
    {
351
    {
352
      const GFC_INTEGER_1 * restrict src;
352
      const GFC_UINTEGER_1 * restrict src;
353
      const GFC_LOGICAL_1 * restrict msrc;
353
      const GFC_LOGICAL_1 * restrict msrc;
354
      GFC_INTEGER_4 result;
354
      GFC_INTEGER_4 result;
355
      src = base;
355
      src = base;
Lines 356-362 mminloc1_4_s1 (gfc_array_i4 * const restrict retar Link Here
356
      msrc = mbase;
356
      msrc = mbase;
357
      {
357
      {
358
358
359
	const GFC_INTEGER_1 *minval;
359
	const GFC_UINTEGER_1 *minval;
360
	minval = base;
360
	minval = base;
361
	result = 0;
361
	result = 0;
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
(-)libgfortran/generated/minloc1_4_s4.c (-9 / +9 lines)
Lines 26-32 see the files COPYING3 and COPYING.RUNTIME respect Link Here
26
#include "libgfortran.h"
26
#include "libgfortran.h"
27
27
28
28
29
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4)
29
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_INTEGER_4)
30
30
31
#define HAVE_BACK_ARG 1
31
#define HAVE_BACK_ARG 1
32
32
Lines 34-42 see the files COPYING3 and COPYING.RUNTIME respect Link Here
34
#include <assert.h>
34
#include <assert.h>
35
35
36
static inline int
36
static inline int
37
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
37
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
38
{
38
{
39
  if (sizeof (GFC_INTEGER_4) == 1)
39
  if (sizeof (GFC_UINTEGER_4) == 1)
40
    return memcmp (a, b, n);
40
    return memcmp (a, b, n);
41
  else
41
  else
42
    return memcmp_char4 (a, b, n);
42
    return memcmp_char4 (a, b, n);
Lines 57-63 minloc1_4_s4 (gfc_array_i4 * const restrict retarr Link Here
57
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type extent[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
60
  const GFC_INTEGER_4 * restrict base;
60
  const GFC_UINTEGER_4 * restrict base;
61
  GFC_INTEGER_4 * restrict dest;
61
  GFC_INTEGER_4 * restrict dest;
62
  index_type rank;
62
  index_type rank;
63
  index_type n;
63
  index_type n;
Lines 155-166 minloc1_4_s4 (gfc_array_i4 * const restrict retarr Link Here
155
  continue_loop = 1;
155
  continue_loop = 1;
156
  while (continue_loop)
156
  while (continue_loop)
157
    {
157
    {
158
      const GFC_INTEGER_4 * restrict src;
158
      const GFC_UINTEGER_4 * restrict src;
159
      GFC_INTEGER_4 result;
159
      GFC_INTEGER_4 result;
160
      src = base;
160
      src = base;
161
      {
161
      {
162
162
163
	const GFC_INTEGER_4 *minval;
163
	const GFC_UINTEGER_4 *minval;
164
	minval = NULL;
164
	minval = NULL;
165
	result = 0;
165
	result = 0;
166
	if (len <= 0)
166
	if (len <= 0)
Lines 231-237 mminloc1_4_s4 (gfc_array_i4 * const restrict retar Link Here
231
  index_type dstride[GFC_MAX_DIMENSIONS];
231
  index_type dstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
233
  GFC_INTEGER_4 * restrict dest;
233
  GFC_INTEGER_4 * restrict dest;
234
  const GFC_INTEGER_4 * restrict base;
234
  const GFC_UINTEGER_4 * restrict base;
235
  const GFC_LOGICAL_1 * restrict mbase;
235
  const GFC_LOGICAL_1 * restrict mbase;
236
  index_type rank;
236
  index_type rank;
237
  index_type dim;
237
  index_type dim;
Lines 349-355 mminloc1_4_s4 (gfc_array_i4 * const restrict retar Link Here
349
349
350
  while (base)
350
  while (base)
351
    {
351
    {
352
      const GFC_INTEGER_4 * restrict src;
352
      const GFC_UINTEGER_4 * restrict src;
353
      const GFC_LOGICAL_1 * restrict msrc;
353
      const GFC_LOGICAL_1 * restrict msrc;
354
      GFC_INTEGER_4 result;
354
      GFC_INTEGER_4 result;
355
      src = base;
355
      src = base;
Lines 356-362 mminloc1_4_s4 (gfc_array_i4 * const restrict retar Link Here
356
      msrc = mbase;
356
      msrc = mbase;
357
      {
357
      {
358
358
359
	const GFC_INTEGER_4 *minval;
359
	const GFC_UINTEGER_4 *minval;
360
	minval = base;
360
	minval = base;
361
	result = 0;
361
	result = 0;
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
(-)libgfortran/generated/minloc1_8_s1.c (-9 / +9 lines)
Lines 26-32 see the files COPYING3 and COPYING.RUNTIME respect Link Here
26
#include "libgfortran.h"
26
#include "libgfortran.h"
27
27
28
28
29
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_8)
29
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_8)
30
30
31
#define HAVE_BACK_ARG 1
31
#define HAVE_BACK_ARG 1
32
32
Lines 34-42 see the files COPYING3 and COPYING.RUNTIME respect Link Here
34
#include <assert.h>
34
#include <assert.h>
35
35
36
static inline int
36
static inline int
37
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
37
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
38
{
38
{
39
  if (sizeof (GFC_INTEGER_1) == 1)
39
  if (sizeof (GFC_UINTEGER_1) == 1)
40
    return memcmp (a, b, n);
40
    return memcmp (a, b, n);
41
  else
41
  else
42
    return memcmp_char4 (a, b, n);
42
    return memcmp_char4 (a, b, n);
Lines 57-63 minloc1_8_s1 (gfc_array_i8 * const restrict retarr Link Here
57
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type extent[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
60
  const GFC_INTEGER_1 * restrict base;
60
  const GFC_UINTEGER_1 * restrict base;
61
  GFC_INTEGER_8 * restrict dest;
61
  GFC_INTEGER_8 * restrict dest;
62
  index_type rank;
62
  index_type rank;
63
  index_type n;
63
  index_type n;
Lines 155-166 minloc1_8_s1 (gfc_array_i8 * const restrict retarr Link Here
155
  continue_loop = 1;
155
  continue_loop = 1;
156
  while (continue_loop)
156
  while (continue_loop)
157
    {
157
    {
158
      const GFC_INTEGER_1 * restrict src;
158
      const GFC_UINTEGER_1 * restrict src;
159
      GFC_INTEGER_8 result;
159
      GFC_INTEGER_8 result;
160
      src = base;
160
      src = base;
161
      {
161
      {
162
162
163
	const GFC_INTEGER_1 *minval;
163
	const GFC_UINTEGER_1 *minval;
164
	minval = NULL;
164
	minval = NULL;
165
	result = 0;
165
	result = 0;
166
	if (len <= 0)
166
	if (len <= 0)
Lines 231-237 mminloc1_8_s1 (gfc_array_i8 * const restrict retar Link Here
231
  index_type dstride[GFC_MAX_DIMENSIONS];
231
  index_type dstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
233
  GFC_INTEGER_8 * restrict dest;
233
  GFC_INTEGER_8 * restrict dest;
234
  const GFC_INTEGER_1 * restrict base;
234
  const GFC_UINTEGER_1 * restrict base;
235
  const GFC_LOGICAL_1 * restrict mbase;
235
  const GFC_LOGICAL_1 * restrict mbase;
236
  index_type rank;
236
  index_type rank;
237
  index_type dim;
237
  index_type dim;
Lines 349-355 mminloc1_8_s1 (gfc_array_i8 * const restrict retar Link Here
349
349
350
  while (base)
350
  while (base)
351
    {
351
    {
352
      const GFC_INTEGER_1 * restrict src;
352
      const GFC_UINTEGER_1 * restrict src;
353
      const GFC_LOGICAL_1 * restrict msrc;
353
      const GFC_LOGICAL_1 * restrict msrc;
354
      GFC_INTEGER_8 result;
354
      GFC_INTEGER_8 result;
355
      src = base;
355
      src = base;
Lines 356-362 mminloc1_8_s1 (gfc_array_i8 * const restrict retar Link Here
356
      msrc = mbase;
356
      msrc = mbase;
357
      {
357
      {
358
358
359
	const GFC_INTEGER_1 *minval;
359
	const GFC_UINTEGER_1 *minval;
360
	minval = base;
360
	minval = base;
361
	result = 0;
361
	result = 0;
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
(-)libgfortran/generated/minloc1_8_s4.c (-9 / +9 lines)
Lines 26-32 see the files COPYING3 and COPYING.RUNTIME respect Link Here
26
#include "libgfortran.h"
26
#include "libgfortran.h"
27
27
28
28
29
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8)
29
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_INTEGER_8)
30
30
31
#define HAVE_BACK_ARG 1
31
#define HAVE_BACK_ARG 1
32
32
Lines 34-42 see the files COPYING3 and COPYING.RUNTIME respect Link Here
34
#include <assert.h>
34
#include <assert.h>
35
35
36
static inline int
36
static inline int
37
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
37
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
38
{
38
{
39
  if (sizeof (GFC_INTEGER_4) == 1)
39
  if (sizeof (GFC_UINTEGER_4) == 1)
40
    return memcmp (a, b, n);
40
    return memcmp (a, b, n);
41
  else
41
  else
42
    return memcmp_char4 (a, b, n);
42
    return memcmp_char4 (a, b, n);
Lines 57-63 minloc1_8_s4 (gfc_array_i8 * const restrict retarr Link Here
57
  index_type extent[GFC_MAX_DIMENSIONS];
57
  index_type extent[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
58
  index_type sstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
59
  index_type dstride[GFC_MAX_DIMENSIONS];
60
  const GFC_INTEGER_4 * restrict base;
60
  const GFC_UINTEGER_4 * restrict base;
61
  GFC_INTEGER_8 * restrict dest;
61
  GFC_INTEGER_8 * restrict dest;
62
  index_type rank;
62
  index_type rank;
63
  index_type n;
63
  index_type n;
Lines 155-166 minloc1_8_s4 (gfc_array_i8 * const restrict retarr Link Here
155
  continue_loop = 1;
155
  continue_loop = 1;
156
  while (continue_loop)
156
  while (continue_loop)
157
    {
157
    {
158
      const GFC_INTEGER_4 * restrict src;
158
      const GFC_UINTEGER_4 * restrict src;
159
      GFC_INTEGER_8 result;
159
      GFC_INTEGER_8 result;
160
      src = base;
160
      src = base;
161
      {
161
      {
162
162
163
	const GFC_INTEGER_4 *minval;
163
	const GFC_UINTEGER_4 *minval;
164
	minval = NULL;
164
	minval = NULL;
165
	result = 0;
165
	result = 0;
166
	if (len <= 0)
166
	if (len <= 0)
Lines 231-237 mminloc1_8_s4 (gfc_array_i8 * const restrict retar Link Here
231
  index_type dstride[GFC_MAX_DIMENSIONS];
231
  index_type dstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
232
  index_type mstride[GFC_MAX_DIMENSIONS];
233
  GFC_INTEGER_8 * restrict dest;
233
  GFC_INTEGER_8 * restrict dest;
234
  const GFC_INTEGER_4 * restrict base;
234
  const GFC_UINTEGER_4 * restrict base;
235
  const GFC_LOGICAL_1 * restrict mbase;
235
  const GFC_LOGICAL_1 * restrict mbase;
236
  index_type rank;
236
  index_type rank;
237
  index_type dim;
237
  index_type dim;
Lines 349-355 mminloc1_8_s4 (gfc_array_i8 * const restrict retar Link Here
349
349
350
  while (base)
350
  while (base)
351
    {
351
    {
352
      const GFC_INTEGER_4 * restrict src;
352
      const GFC_UINTEGER_4 * restrict src;
353
      const GFC_LOGICAL_1 * restrict msrc;
353
      const GFC_LOGICAL_1 * restrict msrc;
354
      GFC_INTEGER_8 result;
354
      GFC_INTEGER_8 result;
355
      src = base;
355
      src = base;
Lines 356-362 mminloc1_8_s4 (gfc_array_i8 * const restrict retar Link Here
356
      msrc = mbase;
356
      msrc = mbase;
357
      {
357
      {
358
358
359
	const GFC_INTEGER_4 *minval;
359
	const GFC_UINTEGER_4 *minval;
360
	minval = base;
360
	minval = base;
361
	result = 0;
361
	result = 0;
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
(-)libgfortran/generated/minloc2_16_s1.c (-7 / +7 lines)
Lines 28-39 see the files COPYING3 and COPYING.RUNTIME respect Link Here
28
#include <string.h>
28
#include <string.h>
29
#include <assert.h>
29
#include <assert.h>
30
30
31
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_16)
31
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_16)
32
32
33
static inline int
33
static inline int
34
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
34
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
35
{
35
{
36
  if (sizeof (GFC_INTEGER_1) == 1)
36
  if (sizeof (GFC_UINTEGER_1) == 1)
37
    return memcmp (a, b, n);
37
    return memcmp (a, b, n);
38
  else
38
  else
39
    return memcmp_char4 (a, b, n);
39
    return memcmp_char4 (a, b, n);
Lines 50-57 minloc2_16_s1 (gfc_array_s1 * const restrict array Link Here
50
  index_type ret;
50
  index_type ret;
51
  index_type sstride;
51
  index_type sstride;
52
  index_type extent;
52
  index_type extent;
53
  const GFC_INTEGER_1 *src;
53
  const GFC_UINTEGER_1 *src;
54
  const GFC_INTEGER_1 *minval;
54
  const GFC_UINTEGER_1 *minval;
55
  index_type i;
55
  index_type i;
56
56
57
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
57
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
Lines 89-96 mminloc2_16_s1 (gfc_array_s1 * const restrict arra Link Here
89
  index_type ret;
89
  index_type ret;
90
  index_type sstride;
90
  index_type sstride;
91
  index_type extent;
91
  index_type extent;
92
  const GFC_INTEGER_1 *src;
92
  const GFC_UINTEGER_1 *src;
93
  const GFC_INTEGER_1 *maxval;
93
  const GFC_UINTEGER_1 *maxval;
94
  index_type i, j;
94
  index_type i, j;
95
  GFC_LOGICAL_1 *mbase;
95
  GFC_LOGICAL_1 *mbase;
96
  int mask_kind;
96
  int mask_kind;
(-)libgfortran/generated/minloc2_16_s4.c (-7 / +7 lines)
Lines 28-39 see the files COPYING3 and COPYING.RUNTIME respect Link Here
28
#include <string.h>
28
#include <string.h>
29
#include <assert.h>
29
#include <assert.h>
30
30
31
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_16)
31
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_INTEGER_16)
32
32
33
static inline int
33
static inline int
34
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
34
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
35
{
35
{
36
  if (sizeof (GFC_INTEGER_4) == 1)
36
  if (sizeof (GFC_UINTEGER_4) == 1)
37
    return memcmp (a, b, n);
37
    return memcmp (a, b, n);
38
  else
38
  else
39
    return memcmp_char4 (a, b, n);
39
    return memcmp_char4 (a, b, n);
Lines 50-57 minloc2_16_s4 (gfc_array_s4 * const restrict array Link Here
50
  index_type ret;
50
  index_type ret;
51
  index_type sstride;
51
  index_type sstride;
52
  index_type extent;
52
  index_type extent;
53
  const GFC_INTEGER_4 *src;
53
  const GFC_UINTEGER_4 *src;
54
  const GFC_INTEGER_4 *minval;
54
  const GFC_UINTEGER_4 *minval;
55
  index_type i;
55
  index_type i;
56
56
57
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
57
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
Lines 89-96 mminloc2_16_s4 (gfc_array_s4 * const restrict arra Link Here
89
  index_type ret;
89
  index_type ret;
90
  index_type sstride;
90
  index_type sstride;
91
  index_type extent;
91
  index_type extent;
92
  const GFC_INTEGER_4 *src;
92
  const GFC_UINTEGER_4 *src;
93
  const GFC_INTEGER_4 *maxval;
93
  const GFC_UINTEGER_4 *maxval;
94
  index_type i, j;
94
  index_type i, j;
95
  GFC_LOGICAL_1 *mbase;
95
  GFC_LOGICAL_1 *mbase;
96
  int mask_kind;
96
  int mask_kind;
(-)libgfortran/generated/minloc2_4_s1.c (-7 / +7 lines)
Lines 28-39 see the files COPYING3 and COPYING.RUNTIME respect Link Here
28
#include <string.h>
28
#include <string.h>
29
#include <assert.h>
29
#include <assert.h>
30
30
31
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_4)
31
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_4)
32
32
33
static inline int
33
static inline int
34
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
34
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
35
{
35
{
36
  if (sizeof (GFC_INTEGER_1) == 1)
36
  if (sizeof (GFC_UINTEGER_1) == 1)
37
    return memcmp (a, b, n);
37
    return memcmp (a, b, n);
38
  else
38
  else
39
    return memcmp_char4 (a, b, n);
39
    return memcmp_char4 (a, b, n);
Lines 50-57 minloc2_4_s1 (gfc_array_s1 * const restrict array, Link Here
50
  index_type ret;
50
  index_type ret;
51
  index_type sstride;
51
  index_type sstride;
52
  index_type extent;
52
  index_type extent;
53
  const GFC_INTEGER_1 *src;
53
  const GFC_UINTEGER_1 *src;
54
  const GFC_INTEGER_1 *minval;
54
  const GFC_UINTEGER_1 *minval;
55
  index_type i;
55
  index_type i;
56
56
57
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
57
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
Lines 89-96 mminloc2_4_s1 (gfc_array_s1 * const restrict array Link Here
89
  index_type ret;
89
  index_type ret;
90
  index_type sstride;
90
  index_type sstride;
91
  index_type extent;
91
  index_type extent;
92
  const GFC_INTEGER_1 *src;
92
  const GFC_UINTEGER_1 *src;
93
  const GFC_INTEGER_1 *maxval;
93
  const GFC_UINTEGER_1 *maxval;
94
  index_type i, j;
94
  index_type i, j;
95
  GFC_LOGICAL_1 *mbase;
95
  GFC_LOGICAL_1 *mbase;
96
  int mask_kind;
96
  int mask_kind;
(-)libgfortran/generated/minloc2_4_s4.c (-7 / +7 lines)
Lines 28-39 see the files COPYING3 and COPYING.RUNTIME respect Link Here
28
#include <string.h>
28
#include <string.h>
29
#include <assert.h>
29
#include <assert.h>
30
30
31
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4)
31
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_INTEGER_4)
32
32
33
static inline int
33
static inline int
34
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
34
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
35
{
35
{
36
  if (sizeof (GFC_INTEGER_4) == 1)
36
  if (sizeof (GFC_UINTEGER_4) == 1)
37
    return memcmp (a, b, n);
37
    return memcmp (a, b, n);
38
  else
38
  else
39
    return memcmp_char4 (a, b, n);
39
    return memcmp_char4 (a, b, n);
Lines 50-57 minloc2_4_s4 (gfc_array_s4 * const restrict array, Link Here
50
  index_type ret;
50
  index_type ret;
51
  index_type sstride;
51
  index_type sstride;
52
  index_type extent;
52
  index_type extent;
53
  const GFC_INTEGER_4 *src;
53
  const GFC_UINTEGER_4 *src;
54
  const GFC_INTEGER_4 *minval;
54
  const GFC_UINTEGER_4 *minval;
55
  index_type i;
55
  index_type i;
56
56
57
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
57
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
Lines 89-96 mminloc2_4_s4 (gfc_array_s4 * const restrict array Link Here
89
  index_type ret;
89
  index_type ret;
90
  index_type sstride;
90
  index_type sstride;
91
  index_type extent;
91
  index_type extent;
92
  const GFC_INTEGER_4 *src;
92
  const GFC_UINTEGER_4 *src;
93
  const GFC_INTEGER_4 *maxval;
93
  const GFC_UINTEGER_4 *maxval;
94
  index_type i, j;
94
  index_type i, j;
95
  GFC_LOGICAL_1 *mbase;
95
  GFC_LOGICAL_1 *mbase;
96
  int mask_kind;
96
  int mask_kind;
(-)libgfortran/generated/minloc2_8_s1.c (-7 / +7 lines)
Lines 28-39 see the files COPYING3 and COPYING.RUNTIME respect Link Here
28
#include <string.h>
28
#include <string.h>
29
#include <assert.h>
29
#include <assert.h>
30
30
31
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_8)
31
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_INTEGER_8)
32
32
33
static inline int
33
static inline int
34
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
34
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
35
{
35
{
36
  if (sizeof (GFC_INTEGER_1) == 1)
36
  if (sizeof (GFC_UINTEGER_1) == 1)
37
    return memcmp (a, b, n);
37
    return memcmp (a, b, n);
38
  else
38
  else
39
    return memcmp_char4 (a, b, n);
39
    return memcmp_char4 (a, b, n);
Lines 50-57 minloc2_8_s1 (gfc_array_s1 * const restrict array, Link Here
50
  index_type ret;
50
  index_type ret;
51
  index_type sstride;
51
  index_type sstride;
52
  index_type extent;
52
  index_type extent;
53
  const GFC_INTEGER_1 *src;
53
  const GFC_UINTEGER_1 *src;
54
  const GFC_INTEGER_1 *minval;
54
  const GFC_UINTEGER_1 *minval;
55
  index_type i;
55
  index_type i;
56
56
57
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
57
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
Lines 89-96 mminloc2_8_s1 (gfc_array_s1 * const restrict array Link Here
89
  index_type ret;
89
  index_type ret;
90
  index_type sstride;
90
  index_type sstride;
91
  index_type extent;
91
  index_type extent;
92
  const GFC_INTEGER_1 *src;
92
  const GFC_UINTEGER_1 *src;
93
  const GFC_INTEGER_1 *maxval;
93
  const GFC_UINTEGER_1 *maxval;
94
  index_type i, j;
94
  index_type i, j;
95
  GFC_LOGICAL_1 *mbase;
95
  GFC_LOGICAL_1 *mbase;
96
  int mask_kind;
96
  int mask_kind;
(-)libgfortran/generated/minloc2_8_s4.c (-7 / +7 lines)
Lines 28-39 see the files COPYING3 and COPYING.RUNTIME respect Link Here
28
#include <string.h>
28
#include <string.h>
29
#include <assert.h>
29
#include <assert.h>
30
30
31
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_8)
31
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_INTEGER_8)
32
32
33
static inline int
33
static inline int
34
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
34
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
35
{
35
{
36
  if (sizeof (GFC_INTEGER_4) == 1)
36
  if (sizeof (GFC_UINTEGER_4) == 1)
37
    return memcmp (a, b, n);
37
    return memcmp (a, b, n);
38
  else
38
  else
39
    return memcmp_char4 (a, b, n);
39
    return memcmp_char4 (a, b, n);
Lines 50-57 minloc2_8_s4 (gfc_array_s4 * const restrict array, Link Here
50
  index_type ret;
50
  index_type ret;
51
  index_type sstride;
51
  index_type sstride;
52
  index_type extent;
52
  index_type extent;
53
  const GFC_INTEGER_4 *src;
53
  const GFC_UINTEGER_4 *src;
54
  const GFC_INTEGER_4 *minval;
54
  const GFC_UINTEGER_4 *minval;
55
  index_type i;
55
  index_type i;
56
56
57
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
57
  extent = GFC_DESCRIPTOR_EXTENT(array,0);
Lines 89-96 mminloc2_8_s4 (gfc_array_s4 * const restrict array Link Here
89
  index_type ret;
89
  index_type ret;
90
  index_type sstride;
90
  index_type sstride;
91
  index_type extent;
91
  index_type extent;
92
  const GFC_INTEGER_4 *src;
92
  const GFC_UINTEGER_4 *src;
93
  const GFC_INTEGER_4 *maxval;
93
  const GFC_UINTEGER_4 *maxval;
94
  index_type i, j;
94
  index_type i, j;
95
  GFC_LOGICAL_1 *mbase;
95
  GFC_LOGICAL_1 *mbase;
96
  int mask_kind;
96
  int mask_kind;
(-)libgfortran/generated/minval0_s1.c (-13 / +13 lines)
Lines 30-41 see the files COPYING3 and COPYING.RUNTIME respect Link Here
30
#include <limits.h>
30
#include <limits.h>
31
31
32
32
33
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_1)
33
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_UINTEGER_1)
34
34
35
static inline int
35
static inline int
36
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
36
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
37
{
37
{
38
  if (sizeof (GFC_INTEGER_1) == 1)
38
  if (sizeof (GFC_UINTEGER_1) == 1)
39
    return memcmp (a, b, n);
39
    return memcmp (a, b, n);
40
  else
40
  else
41
    return memcmp_char4 (a, b, n);
41
    return memcmp_char4 (a, b, n);
Lines 44-56 static inline int Link Here
44
44
45
#define INITVAL 255
45
#define INITVAL 255
46
46
47
extern void minval0_s1 (GFC_INTEGER_1 * restrict,
47
extern void minval0_s1 (GFC_UINTEGER_1 * restrict,
48
        gfc_charlen_type,
48
        gfc_charlen_type,
49
	gfc_array_s1 * const restrict array, gfc_charlen_type);
49
	gfc_array_s1 * const restrict array, gfc_charlen_type);
50
export_proto(minval0_s1);
50
export_proto(minval0_s1);
51
51
52
void
52
void
53
minval0_s1 (GFC_INTEGER_1 * restrict ret,
53
minval0_s1 (GFC_UINTEGER_1 * restrict ret,
54
        gfc_charlen_type xlen,
54
        gfc_charlen_type xlen,
55
	gfc_array_s1 * const restrict array, gfc_charlen_type len)
55
	gfc_array_s1 * const restrict array, gfc_charlen_type len)
56
{
56
{
Lines 57-63 void Link Here
57
  index_type count[GFC_MAX_DIMENSIONS];
57
  index_type count[GFC_MAX_DIMENSIONS];
58
  index_type extent[GFC_MAX_DIMENSIONS];
58
  index_type extent[GFC_MAX_DIMENSIONS];
59
  index_type sstride[GFC_MAX_DIMENSIONS];
59
  index_type sstride[GFC_MAX_DIMENSIONS];
60
  const GFC_INTEGER_1 *base;
60
  const GFC_UINTEGER_1 *base;
61
  index_type rank;
61
  index_type rank;
62
  index_type n;
62
  index_type n;
63
63
Lines 83-89 void Link Here
83
83
84
  {
84
  {
85
85
86
  const GFC_INTEGER_1 *retval;
86
  const GFC_UINTEGER_1 *retval;
87
   retval = ret;
87
   retval = ret;
88
88
89
  while (base)
89
  while (base)
Lines 130-142 void Link Here
130
}
130
}
131
131
132
132
133
extern void mminval0_s1 (GFC_INTEGER_1 * restrict,
133
extern void mminval0_s1 (GFC_UINTEGER_1 * restrict,
134
       gfc_charlen_type, gfc_array_s1 * const restrict array,
134
       gfc_charlen_type, gfc_array_s1 * const restrict array,
135
       gfc_array_l1 * const restrict mask, gfc_charlen_type len);
135
       gfc_array_l1 * const restrict mask, gfc_charlen_type len);
136
export_proto(mminval0_s1);
136
export_proto(mminval0_s1);
137
137
138
void
138
void
139
mminval0_s1 (GFC_INTEGER_1 * const restrict ret,
139
mminval0_s1 (GFC_UINTEGER_1 * const restrict ret,
140
	gfc_charlen_type xlen, gfc_array_s1 * const restrict array,
140
	gfc_charlen_type xlen, gfc_array_s1 * const restrict array,
141
	gfc_array_l1 * const restrict mask, gfc_charlen_type len)
141
	gfc_array_l1 * const restrict mask, gfc_charlen_type len)
142
{
142
{
Lines 144-150 void Link Here
144
  index_type extent[GFC_MAX_DIMENSIONS];
144
  index_type extent[GFC_MAX_DIMENSIONS];
145
  index_type sstride[GFC_MAX_DIMENSIONS];
145
  index_type sstride[GFC_MAX_DIMENSIONS];
146
  index_type mstride[GFC_MAX_DIMENSIONS];
146
  index_type mstride[GFC_MAX_DIMENSIONS];
147
  const GFC_INTEGER_1 *base;
147
  const GFC_UINTEGER_1 *base;
148
  GFC_LOGICAL_1 *mbase;
148
  GFC_LOGICAL_1 *mbase;
149
  int rank;
149
  int rank;
150
  index_type n;
150
  index_type n;
Lines 185-191 void Link Here
185
  base = array->base_addr;
185
  base = array->base_addr;
186
  {
186
  {
187
187
188
  const GFC_INTEGER_1 *retval;
188
  const GFC_UINTEGER_1 *retval;
189
189
190
  retval = ret;
190
  retval = ret;
191
191
Lines 236-248 void Link Here
236
}
236
}
237
237
238
238
239
extern void sminval0_s1 (GFC_INTEGER_1 * restrict,
239
extern void sminval0_s1 (GFC_UINTEGER_1 * restrict,
240
        gfc_charlen_type,
240
        gfc_charlen_type,
241
	gfc_array_s1 * const restrict array, GFC_LOGICAL_4 *, gfc_charlen_type);
241
	gfc_array_s1 * const restrict array, GFC_LOGICAL_4 *, gfc_charlen_type);
242
export_proto(sminval0_s1);
242
export_proto(sminval0_s1);
243
243
244
void
244
void
245
sminval0_s1 (GFC_INTEGER_1 * restrict ret,
245
sminval0_s1 (GFC_UINTEGER_1 * restrict ret,
246
        gfc_charlen_type xlen, gfc_array_s1 * const restrict array,
246
        gfc_charlen_type xlen, gfc_array_s1 * const restrict array,
247
	GFC_LOGICAL_4 *mask, gfc_charlen_type len)
247
	GFC_LOGICAL_4 *mask, gfc_charlen_type len)
248
	
248
	
(-)libgfortran/generated/minval0_s4.c (-13 / +13 lines)
Lines 30-41 see the files COPYING3 and COPYING.RUNTIME respect Link Here
30
#include <limits.h>
30
#include <limits.h>
31
31
32
32
33
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4)
33
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_UINTEGER_4)
34
34
35
static inline int
35
static inline int
36
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
36
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
37
{
37
{
38
  if (sizeof (GFC_INTEGER_4) == 1)
38
  if (sizeof (GFC_UINTEGER_4) == 1)
39
    return memcmp (a, b, n);
39
    return memcmp (a, b, n);
40
  else
40
  else
41
    return memcmp_char4 (a, b, n);
41
    return memcmp_char4 (a, b, n);
Lines 44-56 static inline int Link Here
44
44
45
#define INITVAL 255
45
#define INITVAL 255
46
46
47
extern void minval0_s4 (GFC_INTEGER_4 * restrict,
47
extern void minval0_s4 (GFC_UINTEGER_4 * restrict,
48
        gfc_charlen_type,
48
        gfc_charlen_type,
49
	gfc_array_s4 * const restrict array, gfc_charlen_type);
49
	gfc_array_s4 * const restrict array, gfc_charlen_type);
50
export_proto(minval0_s4);
50
export_proto(minval0_s4);
51
51
52
void
52
void
53
minval0_s4 (GFC_INTEGER_4 * restrict ret,
53
minval0_s4 (GFC_UINTEGER_4 * restrict ret,
54
        gfc_charlen_type xlen,
54
        gfc_charlen_type xlen,
55
	gfc_array_s4 * const restrict array, gfc_charlen_type len)
55
	gfc_array_s4 * const restrict array, gfc_charlen_type len)
56
{
56
{
Lines 57-63 void Link Here
57
  index_type count[GFC_MAX_DIMENSIONS];
57
  index_type count[GFC_MAX_DIMENSIONS];
58
  index_type extent[GFC_MAX_DIMENSIONS];
58
  index_type extent[GFC_MAX_DIMENSIONS];
59
  index_type sstride[GFC_MAX_DIMENSIONS];
59
  index_type sstride[GFC_MAX_DIMENSIONS];
60
  const GFC_INTEGER_4 *base;
60
  const GFC_UINTEGER_4 *base;
61
  index_type rank;
61
  index_type rank;
62
  index_type n;
62
  index_type n;
63
63
Lines 83-89 void Link Here
83
83
84
  {
84
  {
85
85
86
  const GFC_INTEGER_4 *retval;
86
  const GFC_UINTEGER_4 *retval;
87
   retval = ret;
87
   retval = ret;
88
88
89
  while (base)
89
  while (base)
Lines 130-142 void Link Here
130
}
130
}
131
131
132
132
133
extern void mminval0_s4 (GFC_INTEGER_4 * restrict,
133
extern void mminval0_s4 (GFC_UINTEGER_4 * restrict,
134
       gfc_charlen_type, gfc_array_s4 * const restrict array,
134
       gfc_charlen_type, gfc_array_s4 * const restrict array,
135
       gfc_array_l1 * const restrict mask, gfc_charlen_type len);
135
       gfc_array_l1 * const restrict mask, gfc_charlen_type len);
136
export_proto(mminval0_s4);
136
export_proto(mminval0_s4);
137
137
138
void
138
void
139
mminval0_s4 (GFC_INTEGER_4 * const restrict ret,
139
mminval0_s4 (GFC_UINTEGER_4 * const restrict ret,
140
	gfc_charlen_type xlen, gfc_array_s4 * const restrict array,
140
	gfc_charlen_type xlen, gfc_array_s4 * const restrict array,
141
	gfc_array_l1 * const restrict mask, gfc_charlen_type len)
141
	gfc_array_l1 * const restrict mask, gfc_charlen_type len)
142
{
142
{
Lines 144-150 void Link Here
144
  index_type extent[GFC_MAX_DIMENSIONS];
144
  index_type extent[GFC_MAX_DIMENSIONS];
145
  index_type sstride[GFC_MAX_DIMENSIONS];
145
  index_type sstride[GFC_MAX_DIMENSIONS];
146
  index_type mstride[GFC_MAX_DIMENSIONS];
146
  index_type mstride[GFC_MAX_DIMENSIONS];
147
  const GFC_INTEGER_4 *base;
147
  const GFC_UINTEGER_4 *base;
148
  GFC_LOGICAL_1 *mbase;
148
  GFC_LOGICAL_1 *mbase;
149
  int rank;
149
  int rank;
150
  index_type n;
150
  index_type n;
Lines 185-191 void Link Here
185
  base = array->base_addr;
185
  base = array->base_addr;
186
  {
186
  {
187
187
188
  const GFC_INTEGER_4 *retval;
188
  const GFC_UINTEGER_4 *retval;
189
189
190
  retval = ret;
190
  retval = ret;
191
191
Lines 236-248 void Link Here
236
}
236
}
237
237
238
238
239
extern void sminval0_s4 (GFC_INTEGER_4 * restrict,
239
extern void sminval0_s4 (GFC_UINTEGER_4 * restrict,
240
        gfc_charlen_type,
240
        gfc_charlen_type,
241
	gfc_array_s4 * const restrict array, GFC_LOGICAL_4 *, gfc_charlen_type);
241
	gfc_array_s4 * const restrict array, GFC_LOGICAL_4 *, gfc_charlen_type);
242
export_proto(sminval0_s4);
242
export_proto(sminval0_s4);
243
243
244
void
244
void
245
sminval0_s4 (GFC_INTEGER_4 * restrict ret,
245
sminval0_s4 (GFC_UINTEGER_4 * restrict ret,
246
        gfc_charlen_type xlen, gfc_array_s4 * const restrict array,
246
        gfc_charlen_type xlen, gfc_array_s4 * const restrict array,
247
	GFC_LOGICAL_4 *mask, gfc_charlen_type len)
247
	GFC_LOGICAL_4 *mask, gfc_charlen_type len)
248
	
248
	
(-)libgfortran/generated/minval1_s1.c (-15 / +15 lines)
Lines 26-40 see the files COPYING3 and COPYING.RUNTIME respect Link Here
26
#include "libgfortran.h"
26
#include "libgfortran.h"
27
27
28
28
29
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_1)
29
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_UINTEGER_1)
30
30
31
#include <string.h>
31
#include <string.h>
32
#include <assert.h>
32
#include <assert.h>
33
33
34
static inline int
34
static inline int
35
compare_fcn (const GFC_INTEGER_1 *a, const GFC_INTEGER_1 *b, gfc_charlen_type n)
35
compare_fcn (const GFC_UINTEGER_1 *a, const GFC_UINTEGER_1 *b, gfc_charlen_type n)
36
{
36
{
37
  if (sizeof (GFC_INTEGER_1) == 1)
37
  if (sizeof (GFC_UINTEGER_1) == 1)
38
    return memcmp (a, b, n);
38
    return memcmp (a, b, n);
39
  else
39
  else
40
    return memcmp_char4 (a, b, n);
40
    return memcmp_char4 (a, b, n);
Lines 54-61 minval1_s1 (gfc_array_s1 * const restrict retarray Link Here
54
  index_type extent[GFC_MAX_DIMENSIONS];
54
  index_type extent[GFC_MAX_DIMENSIONS];
55
  index_type sstride[GFC_MAX_DIMENSIONS];
55
  index_type sstride[GFC_MAX_DIMENSIONS];
56
  index_type dstride[GFC_MAX_DIMENSIONS];
56
  index_type dstride[GFC_MAX_DIMENSIONS];
57
  const GFC_INTEGER_1 * restrict base;
57
  const GFC_UINTEGER_1 * restrict base;
58
  GFC_INTEGER_1 * restrict dest;
58
  GFC_UINTEGER_1 * restrict dest;
59
  index_type rank;
59
  index_type rank;
60
  index_type n;
60
  index_type n;
61
  index_type len;
61
  index_type len;
Lines 119-125 minval1_s1 (gfc_array_s1 * const restrict retarray Link Here
119
      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]
119
      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]
120
      		 * string_len;
120
      		 * string_len;
121
121
122
      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
122
      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1));
123
      if (alloc_size == 0)
123
      if (alloc_size == 0)
124
	{
124
	{
125
	  /* Make sure we have a zero-sized array.  */
125
	  /* Make sure we have a zero-sized array.  */
Lines 155-165 minval1_s1 (gfc_array_s1 * const restrict retarray Link Here
155
  continue_loop = 1;
155
  continue_loop = 1;
156
  while (continue_loop)
156
  while (continue_loop)
157
    {
157
    {
158
      const GFC_INTEGER_1 * restrict src;
158
      const GFC_UINTEGER_1 * restrict src;
159
      src = base;
159
      src = base;
160
      {
160
      {
161
161
162
	const GFC_INTEGER_1 *retval;
162
	const GFC_UINTEGER_1 *retval;
163
	retval = base;
163
	retval = base;
164
	if (len <= 0)
164
	if (len <= 0)
165
	  memset (dest, 255, sizeof (*dest) * string_len);
165
	  memset (dest, 255, sizeof (*dest) * string_len);
Lines 228-235 mminval1_s1 (gfc_array_s1 * const restrict retarra Link Here
228
  index_type sstride[GFC_MAX_DIMENSIONS];
228
  index_type sstride[GFC_MAX_DIMENSIONS];
229
  index_type dstride[GFC_MAX_DIMENSIONS];
229
  index_type dstride[GFC_MAX_DIMENSIONS];
230
  index_type mstride[GFC_MAX_DIMENSIONS];
230
  index_type mstride[GFC_MAX_DIMENSIONS];
231
  GFC_INTEGER_1 * restrict dest;
231
  GFC_UINTEGER_1 * restrict dest;
232
  const GFC_INTEGER_1 * restrict base;
232
  const GFC_UINTEGER_1 * restrict base;
233
  const GFC_LOGICAL_1 * restrict mbase;
233
  const GFC_LOGICAL_1 * restrict mbase;
234
  index_type rank;
234
  index_type rank;
235
  index_type dim;
235
  index_type dim;
Lines 319-325 mminval1_s1 (gfc_array_s1 * const restrict retarra Link Here
319
	  return;
319
	  return;
320
	}
320
	}
321
      else
321
      else
322
	retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
322
	retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1));
323
323
324
    }
324
    }
325
  else
325
  else
Lines 349-355 mminval1_s1 (gfc_array_s1 * const restrict retarra Link Here
349
349
350
  while (base)
350
  while (base)
351
    {
351
    {
352
      const GFC_INTEGER_1 * restrict src;
352
      const GFC_UINTEGER_1 * restrict src;
353
      const GFC_LOGICAL_1 * restrict msrc;
353
      const GFC_LOGICAL_1 * restrict msrc;
354
354
355
      src = base;
355
      src = base;
Lines 356-362 mminval1_s1 (gfc_array_s1 * const restrict retarra Link Here
356
      msrc = mbase;
356
      msrc = mbase;
357
      {
357
      {
358
358
359
	const GFC_INTEGER_1 *retval;
359
	const GFC_UINTEGER_1 *retval;
360
	memset (dest, 255, sizeof (*dest) * string_len);
360
	memset (dest, 255, sizeof (*dest) * string_len);
361
	retval = dest;
361
	retval = dest;
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
Lines 430-436 sminval1_s1 (gfc_array_s1 * const restrict retarra Link Here
430
  index_type count[GFC_MAX_DIMENSIONS];
430
  index_type count[GFC_MAX_DIMENSIONS];
431
  index_type extent[GFC_MAX_DIMENSIONS];
431
  index_type extent[GFC_MAX_DIMENSIONS];
432
  index_type dstride[GFC_MAX_DIMENSIONS];
432
  index_type dstride[GFC_MAX_DIMENSIONS];
433
  GFC_INTEGER_1 * restrict dest;
433
  GFC_UINTEGER_1 * restrict dest;
434
  index_type rank;
434
  index_type rank;
435
  index_type n;
435
  index_type n;
436
  index_type dim;
436
  index_type dim;
Lines 497-503 sminval1_s1 (gfc_array_s1 * const restrict retarra Link Here
497
	  return;
497
	  return;
498
	}
498
	}
499
      else
499
      else
500
	retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
500
	retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1));
501
    }
501
    }
502
  else
502
  else
503
    {
503
    {
(-)libgfortran/generated/minval1_s4.c (-15 / +15 lines)
Lines 26-40 see the files COPYING3 and COPYING.RUNTIME respect Link Here
26
#include "libgfortran.h"
26
#include "libgfortran.h"
27
27
28
28
29
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4)
29
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_UINTEGER_4)
30
30
31
#include <string.h>
31
#include <string.h>
32
#include <assert.h>
32
#include <assert.h>
33
33
34
static inline int
34
static inline int
35
compare_fcn (const GFC_INTEGER_4 *a, const GFC_INTEGER_4 *b, gfc_charlen_type n)
35
compare_fcn (const GFC_UINTEGER_4 *a, const GFC_UINTEGER_4 *b, gfc_charlen_type n)
36
{
36
{
37
  if (sizeof (GFC_INTEGER_4) == 1)
37
  if (sizeof (GFC_UINTEGER_4) == 1)
38
    return memcmp (a, b, n);
38
    return memcmp (a, b, n);
39
  else
39
  else
40
    return memcmp_char4 (a, b, n);
40
    return memcmp_char4 (a, b, n);
Lines 54-61 minval1_s4 (gfc_array_s4 * const restrict retarray Link Here
54
  index_type extent[GFC_MAX_DIMENSIONS];
54
  index_type extent[GFC_MAX_DIMENSIONS];
55
  index_type sstride[GFC_MAX_DIMENSIONS];
55
  index_type sstride[GFC_MAX_DIMENSIONS];
56
  index_type dstride[GFC_MAX_DIMENSIONS];
56
  index_type dstride[GFC_MAX_DIMENSIONS];
57
  const GFC_INTEGER_4 * restrict base;
57
  const GFC_UINTEGER_4 * restrict base;
58
  GFC_INTEGER_4 * restrict dest;
58
  GFC_UINTEGER_4 * restrict dest;
59
  index_type rank;
59
  index_type rank;
60
  index_type n;
60
  index_type n;
61
  index_type len;
61
  index_type len;
Lines 119-125 minval1_s4 (gfc_array_s4 * const restrict retarray Link Here
119
      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]
119
      alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1]
120
      		 * string_len;
120
      		 * string_len;
121
121
122
      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
122
      retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4));
123
      if (alloc_size == 0)
123
      if (alloc_size == 0)
124
	{
124
	{
125
	  /* Make sure we have a zero-sized array.  */
125
	  /* Make sure we have a zero-sized array.  */
Lines 155-165 minval1_s4 (gfc_array_s4 * const restrict retarray Link Here
155
  continue_loop = 1;
155
  continue_loop = 1;
156
  while (continue_loop)
156
  while (continue_loop)
157
    {
157
    {
158
      const GFC_INTEGER_4 * restrict src;
158
      const GFC_UINTEGER_4 * restrict src;
159
      src = base;
159
      src = base;
160
      {
160
      {
161
161
162
	const GFC_INTEGER_4 *retval;
162
	const GFC_UINTEGER_4 *retval;
163
	retval = base;
163
	retval = base;
164
	if (len <= 0)
164
	if (len <= 0)
165
	  memset (dest, 255, sizeof (*dest) * string_len);
165
	  memset (dest, 255, sizeof (*dest) * string_len);
Lines 228-235 mminval1_s4 (gfc_array_s4 * const restrict retarra Link Here
228
  index_type sstride[GFC_MAX_DIMENSIONS];
228
  index_type sstride[GFC_MAX_DIMENSIONS];
229
  index_type dstride[GFC_MAX_DIMENSIONS];
229
  index_type dstride[GFC_MAX_DIMENSIONS];
230
  index_type mstride[GFC_MAX_DIMENSIONS];
230
  index_type mstride[GFC_MAX_DIMENSIONS];
231
  GFC_INTEGER_4 * restrict dest;
231
  GFC_UINTEGER_4 * restrict dest;
232
  const GFC_INTEGER_4 * restrict base;
232
  const GFC_UINTEGER_4 * restrict base;
233
  const GFC_LOGICAL_1 * restrict mbase;
233
  const GFC_LOGICAL_1 * restrict mbase;
234
  index_type rank;
234
  index_type rank;
235
  index_type dim;
235
  index_type dim;
Lines 319-325 mminval1_s4 (gfc_array_s4 * const restrict retarra Link Here
319
	  return;
319
	  return;
320
	}
320
	}
321
      else
321
      else
322
	retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
322
	retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4));
323
323
324
    }
324
    }
325
  else
325
  else
Lines 349-355 mminval1_s4 (gfc_array_s4 * const restrict retarra Link Here
349
349
350
  while (base)
350
  while (base)
351
    {
351
    {
352
      const GFC_INTEGER_4 * restrict src;
352
      const GFC_UINTEGER_4 * restrict src;
353
      const GFC_LOGICAL_1 * restrict msrc;
353
      const GFC_LOGICAL_1 * restrict msrc;
354
354
355
      src = base;
355
      src = base;
Lines 356-362 mminval1_s4 (gfc_array_s4 * const restrict retarra Link Here
356
      msrc = mbase;
356
      msrc = mbase;
357
      {
357
      {
358
358
359
	const GFC_INTEGER_4 *retval;
359
	const GFC_UINTEGER_4 *retval;
360
	memset (dest, 255, sizeof (*dest) * string_len);
360
	memset (dest, 255, sizeof (*dest) * string_len);
361
	retval = dest;
361
	retval = dest;
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
362
	for (n = 0; n < len; n++, src += delta, msrc += mdelta)
Lines 430-436 sminval1_s4 (gfc_array_s4 * const restrict retarra Link Here
430
  index_type count[GFC_MAX_DIMENSIONS];
430
  index_type count[GFC_MAX_DIMENSIONS];
431
  index_type extent[GFC_MAX_DIMENSIONS];
431
  index_type extent[GFC_MAX_DIMENSIONS];
432
  index_type dstride[GFC_MAX_DIMENSIONS];
432
  index_type dstride[GFC_MAX_DIMENSIONS];
433
  GFC_INTEGER_4 * restrict dest;
433
  GFC_UINTEGER_4 * restrict dest;
434
  index_type rank;
434
  index_type rank;
435
  index_type n;
435
  index_type n;
436
  index_type dim;
436
  index_type dim;
Lines 497-503 sminval1_s4 (gfc_array_s4 * const restrict retarra Link Here
497
	  return;
497
	  return;
498
	}
498
	}
499
      else
499
      else
500
	retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
500
	retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4));
501
    }
501
    }
502
  else
502
  else
503
    {
503
    {
(-)libgfortran/libgfortran.h (-4 / +8 lines)
Lines 359-364 typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_1) gfc_a Link Here
359
typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_2) gfc_array_i2;
359
typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_2) gfc_array_i2;
360
typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_4) gfc_array_i4;
360
typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_4) gfc_array_i4;
361
typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_8) gfc_array_i8;
361
typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_8) gfc_array_i8;
362
typedef GFC_ARRAY_DESCRIPTOR (index_type) gfc_array_index_type;
362
#ifdef HAVE_GFC_INTEGER_16
363
#ifdef HAVE_GFC_INTEGER_16
363
typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_16) gfc_array_i16;
364
typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_16) gfc_array_i16;
364
#endif
365
#endif
Lines 385-393 typedef GFC_ARRAY_DESCRIPTOR (GFC_LOGICAL_8) gfc_a Link Here
385
#ifdef HAVE_GFC_LOGICAL_16
386
#ifdef HAVE_GFC_LOGICAL_16
386
typedef GFC_ARRAY_DESCRIPTOR (GFC_LOGICAL_16) gfc_array_l16;
387
typedef GFC_ARRAY_DESCRIPTOR (GFC_LOGICAL_16) gfc_array_l16;
387
#endif
388
#endif
388
typedef gfc_array_i1 gfc_array_s1;
389
typedef gfc_array_i4 gfc_array_s4;
390
389
390
typedef GFC_ARRAY_DESCRIPTOR (GFC_UINTEGER_1) gfc_array_s1;
391
typedef GFC_ARRAY_DESCRIPTOR (GFC_UINTEGER_4) gfc_array_s4;
392
391
/* These are for when you actually want to declare a descriptor, as
393
/* These are for when you actually want to declare a descriptor, as
392
   opposed to a pointer to it.  */
394
   opposed to a pointer to it.  */
393
395
Lines 1757-1763 void cshift1_16_c16 (gfc_array_c16 * const restric Link Here
1757
internal_proto(cshift1_16_c16);
1759
internal_proto(cshift1_16_c16);
1758
#endif
1760
#endif
1759
1761
1760
/* Define this if we support asynchronous I/O on this platform.  This
1762
/* We always have these.  */
1761
   currently requires weak symbols.  */
1762
1763
1764
#define HAVE_GFC_UINTEGER_1 1
1765
#define HAVE_GFC_UINTEGER_4 1
1766
1763
#endif  /* LIBGFOR_H  */
1767
#endif  /* LIBGFOR_H  */
(-)libgfortran/m4/findloc0.m4 (+37 lines)
Line 0 Link Here
1
dnl Support macros for findloc.
2
dnl This file is part of the GNU Fortran Runtime Library (libgfortran)
3
dnl Distributed under the GNU GPL with exception.  See COPYING for details.
4
include(iparm.m4)dnl
5
define(header1,`extern void findloc0_'atype_code` (gfc_array_index_type * const restrict retarray,
6
       	    		'atype` * const restrict array, 'atype_name` value,
7
			 GFC_LOGICAL_4);
8
export_proto(findloc0_'atype_code`);
9
10
void
11
findloc0_'atype_code` (gfc_array_index_type * const restrict retarray,
12
    	    'atype` * const restrict array, 'atype_name` value,
13
	    GFC_LOGICAL_4 back)')dnl
14
dnl
15
define(header2,`extern void mfindloc0_'atype_code` (gfc_array_index_type * const restrict retarray,
16
       	    		'atype` * const restrict array, 'atype_name` value,
17
			 gfc_array_l1 *const restrict, GFC_LOGICAL_4);
18
export_proto(mfindloc0_'atype_code`);
19
20
void
21
mfindloc0_'atype_code` (gfc_array_index_type * const restrict retarray,
22
    	    'atype` * const restrict array, 'atype_name` value,
23
	    gfc_array_l1 *const restrict mask, GFC_LOGICAL_4 back)')
24
dnl
25
define(header3,`extern void sfindloc0_'atype_code` (gfc_array_index_type * const restrict retarray,
26
       	    		'atype` * const restrict array, 'atype_name` value,
27
			 GFC_LOGICAL_4 *, GFC_LOGICAL_4);
28
export_proto(sfindloc0_'atype_code`);
29
30
void
31
sfindloc0_'atype_code` (gfc_array_index_type * const restrict retarray,
32
    	    'atype` * const restrict array, 'atype_name` value,
33
	    GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back)')dnl
34
dnl
35
define(comparison,`*base == value')dnl
36
define(len_arg,`')dnl
37
include(ifindloc0.m4)dnl
(-)libgfortran/m4/findloc0s.m4 (+47 lines)
Line 0 Link Here
1
dnl Support macros for findloc.
2
dnl This file is part of the GNU Fortran Runtime Library (libgfortran)
3
dnl Distributed under the GNU GPL with exception.  See COPYING for details.
4
include(iparm.m4)dnl
5
define(header1,`extern void findloc0_'atype_code` (gfc_array_index_type * const restrict retarray,
6
       	    		'atype` * const restrict array, 'atype_name` *value,
7
			 GFC_LOGICAL_4, gfc_charlen_type, gfc_charlen_type);
8
9
export_proto(findloc0_'atype_code`);
10
11
void
12
findloc0_'atype_code` (gfc_array_index_type * const restrict retarray,
13
    	    'atype` * const restrict array, 'atype_name` *value,
14
	    GFC_LOGICAL_4 back, gfc_charlen_type len, gfc_charlen_type len_value)')dnl
15
dnl
16
define(header2,`extern void mfindloc0_'atype_code` (gfc_array_index_type * const restrict retarray,
17
       	    		'atype` * const restrict array, 'atype_name` *value,
18
			 gfc_array_l1 *const restrict, GFC_LOGICAL_4, gfc_charlen_type,
19
			 gfc_charlen_type);
20
export_proto(mfindloc0_'atype_code`);
21
22
void
23
mfindloc0_'atype_code` (gfc_array_index_type * const restrict retarray,
24
    	    'atype` * const restrict array, 'atype_name` *value,
25
	    gfc_array_l1 *const restrict mask, GFC_LOGICAL_4 back,
26
	    gfc_charlen_type len, gfc_charlen_type len_value)')
27
dnl
28
define(header3,`extern void sfindloc0_'atype_code` (gfc_array_index_type * const restrict retarray,
29
       	    		'atype` * const restrict array, 'atype_name` *value,
30
			 GFC_LOGICAL_4 *, GFC_LOGICAL_4, gfc_charlen_type,
31
			 gfc_charlen_type);
32
export_proto(sfindloc0_'atype_code`);
33
34
void
35
sfindloc0_'atype_code` (gfc_array_index_type * const restrict retarray,
36
    	    'atype` * const restrict array, 'atype_name` *value,
37
	    GFC_LOGICAL_4 * mask, GFC_LOGICAL_4 back, gfc_charlen_type len,
38
	    gfc_charlen_type len_value)')dnl
39
dnl
40
define(comparison,ifelse(atype_kind,4,dnl
41
`compare_string_char4 (len, base, len_value, value) == 0',dnl
42
`compare_string (len, base, len_value, value) == 0'))dnl
43
define(len_arg,`, len, len_value')dnl
44
include(ifindloc0.m4)dnl
45
46
47
(-)libgfortran/m4/ifindloc0.m4 (+350 lines)
Line 0 Link Here
1
`/* Implementation of the FINDLOC intrinsic
2
   Copyright (C) 2018 Free Software Foundation, Inc.
3
   Contributed by Thomas K├Ânig <tk@tkoenig.net>
4
5
This file is part of the GNU Fortran 95 runtime library (libgfortran).
6
7
Libgfortran is free software; you can redistribute it and/or
8
modify it under the terms of the GNU General Public
9
License as published by the Free Software Foundation; either
10
version 3 of the License, or (at your option) any later version.
11
12
Libgfortran is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
GNU General Public License for more details.
16
17
Under Section 7 of GPL version 3, you are granted additional
18
permissions described in the GCC Runtime Library Exception, version
19
3.1, as published by the Free Software Foundation.
20
21
You should have received a copy of the GNU General Public License and
22
a copy of the GCC Runtime Library Exception along with this program;
23
see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
24
<http://www.gnu.org/licenses/>.  */
25
26
#include "libgfortran.h"
27
#include <assert.h>
28
29
#if defined (HAVE_'atype_name`)
30
'header1`
31
{
32
  index_type count[GFC_MAX_DIMENSIONS];
33
  index_type extent[GFC_MAX_DIMENSIONS];
34
  index_type sstride[GFC_MAX_DIMENSIONS];
35
  index_type dstride;
36
  const 'atype_name` *base;
37
  index_type * restrict dest;
38
  index_type rank;
39
  index_type n;
40
  index_type sz;
41
42
  rank = GFC_DESCRIPTOR_RANK (array);
43
  if (rank <= 0)
44
    runtime_error ("Rank of array needs to be > 0");
45
46
  if (retarray->base_addr == NULL)
47
    {
48
      GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
49
      retarray->dtype.rank = 1;
50
      retarray->offset = 0;
51
      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
52
    }
53
  else
54
    {
55
      if (unlikely (compile_options.bounds_check))
56
	bounds_iforeach_return ((array_t *) retarray, (array_t *) array,
57
				"FINDLOC");
58
    }
59
60
  dstride = GFC_DESCRIPTOR_STRIDE(retarray,0);
61
  dest = retarray->base_addr;
62
63
  /* Set the return value.  */
64
  for (n = 0; n < rank; n++)
65
    dest[n * dstride] = 0;
66
67
  sz = 1;
68
  for (n = 0; n < rank; n++)
69
    {
70
      sstride[n] = GFC_DESCRIPTOR_STRIDE(array,n);
71
      extent[n] = GFC_DESCRIPTOR_EXTENT(array,n);
72
      sz *= extent[n];
73
      if (extent[n] <= 0)
74
	return;
75
    }
76
77
    for (n = 0; n < rank; n++)
78
      count[n] = 0;
79
80
  if (back)
81
    {
82
      base = array->base_addr + sz - 1;
83
84
      while (1)
85
        {
86
	  do
87
	    {
88
	      if (unlikely('comparison`))
89
	        {
90
		  for (n = 0; n < rank; n++)
91
		    dest[n * dstride] = extent[n] - count[n];
92
93
		  return;
94
		}
95
	      base -= sstride[0];
96
	    } while(++count[0] != extent[0]);
97
98
	  n = 0;
99
	  do
100
	    {
101
	      /* When we get to the end of a dimension, reset it and increment
102
		 the next dimension.  */
103
	      count[n] = 0;
104
	      /* We could precalculate these products, but this is a less
105
		 frequently used path so probably not worth it.  */
106
	      base += sstride[n] * extent[n];
107
	      n++;
108
	      if (n >= rank)
109
	        return;
110
	      else
111
		{
112
		  count[n]++;
113
		  base -= sstride[n];
114
		}
115
	    } while (count[n] == extent[n]);      
116
	}
117
    }
118
  else
119
    {
120
      base = array->base_addr;
121
      while (1)
122
        {
123
	  do
124
	    {
125
	      if (unlikely('comparison`))
126
	        {
127
		  for (n = 0; n < rank; n++)
128
		    dest[n * dstride] = count[n] + 1;
129
130
		  return;
131
		}
132
	      base += sstride[0];
133
	    } while(++count[0] != extent[0]);
134
135
	  n = 0;
136
	  do
137
	    {
138
	      /* When we get to the end of a dimension, reset it and increment
139
		 the next dimension.  */
140
	      count[n] = 0;
141
	      /* We could precalculate these products, but this is a less
142
		 frequently used path so probably not worth it.  */
143
	      base -= sstride[n] * extent[n];
144
	      n++;
145
	      if (n >= rank)
146
	        return;
147
	      else
148
		{
149
		  count[n]++;
150
		  base += sstride[n];
151
		}
152
	    } while (count[n] == extent[n]);
153
	}
154
    }
155
  return;
156
}
157
158
'header2`
159
{
160
  index_type count[GFC_MAX_DIMENSIONS];
161
  index_type extent[GFC_MAX_DIMENSIONS];
162
  index_type sstride[GFC_MAX_DIMENSIONS];
163
  index_type mstride[GFC_MAX_DIMENSIONS];
164
  index_type dstride;
165
  const 'atype_name` *base;
166
  index_type * restrict dest;
167
  GFC_LOGICAL_1 *mbase;
168
  index_type rank;
169
  index_type n;
170
  int mask_kind;
171
  index_type sz;
172
173
  rank = GFC_DESCRIPTOR_RANK (array);
174
  if (rank <= 0)
175
    runtime_error ("Rank of array needs to be > 0");
176
177
  if (retarray->base_addr == NULL)
178
    {
179
      GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
180
      retarray->dtype.rank = 1;
181
      retarray->offset = 0;
182
      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
183
    }
184
  else
185
    {
186
      if (unlikely (compile_options.bounds_check))
187
	{
188
	  bounds_iforeach_return ((array_t *) retarray, (array_t *) array,
189
				  "FINDLOC");
190
	  bounds_equal_extents ((array_t *) mask, (array_t *) array,
191
				"MASK argument", "FINDLOC");
192
	}
193
    }
194
195
  mask_kind = GFC_DESCRIPTOR_SIZE (mask);
196
197
  mbase = mask->base_addr;
198
199
  if (mask_kind == 1 || mask_kind == 2 || mask_kind == 4 || mask_kind == 8
200
#ifdef HAVE_GFC_LOGICAL_16
201
      || mask_kind == 16
202
#endif
203
      )
204
    mbase = GFOR_POINTER_TO_L1 (mbase, mask_kind);
205
  else
206
    internal_error (NULL, "Funny sized logical array");
207
208
  dstride = GFC_DESCRIPTOR_STRIDE(retarray,0);
209
  dest = retarray->base_addr;
210
211
  /* Set the return value.  */
212
  for (n = 0; n < rank; n++)
213
    dest[n * dstride] = 0;
214
215
  sz = 1;
216
  for (n = 0; n < rank; n++)
217
    {
218
      sstride[n] = GFC_DESCRIPTOR_STRIDE(array,n);
219
      mstride[n] = GFC_DESCRIPTOR_STRIDE_BYTES(mask,n);
220
      extent[n] = GFC_DESCRIPTOR_EXTENT(array,n);
221
      sz *= extent[n];
222
      if (extent[n] <= 0)
223
	return;
224
    }
225
226
    for (n = 0; n < rank; n++)
227
      count[n] = 0;
228
229
  if (back)
230
    {
231
      base = array->base_addr + sz - 1;
232
      mbase = mbase + (sz - 1) * mask_kind;
233
      while (1)
234
        {
235
	  do
236
	    {
237
	      if (unlikely(*mbase && 'comparison`))
238
	        {
239
		  for (n = 0; n < rank; n++)
240
		    dest[n * dstride] = extent[n] - count[n];
241
242
		  return;
243
		}
244
	      base -= sstride[0];
245
	      mbase -= mstride[0];
246
	    } while(++count[0] != extent[0]);
247
248
	  n = 0;
249
	  do
250
	    {
251
	      /* When we get to the end of a dimension, reset it and increment
252
		 the next dimension.  */
253
	      count[n] = 0;
254
	      /* We could precalculate these products, but this is a less
255
		 frequently used path so probably not worth it.  */
256
	      base += sstride[n] * extent[n];
257
	      mbase -= mstride[n] * extent[n];
258
	      n++;
259
	      if (n >= rank)
260
		return;
261
	      else
262
		{
263
		  count[n]++;
264
		  base -= sstride[n];
265
		  mbase += mstride[n];
266
		}
267
	    } while (count[n] == extent[n]);      
268
	}
269
    }
270
  else
271
    {
272
      base = array->base_addr;
273
      while (1)
274
        {
275
	  do
276
	    {
277
	      if (unlikely(*mbase && 'comparison`))
278
	        {
279
		  for (n = 0; n < rank; n++)
280
		    dest[n * dstride] = count[n] + 1;
281
282
		  return;
283
		}
284
	      base += sstride[0];
285
	      mbase += mstride[0];
286
	    } while(++count[0] != extent[0]);
287
288
	  n = 0;
289
	  do
290
	    {
291
	      /* When we get to the end of a dimension, reset it and increment
292
		 the next dimension.  */
293
	      count[n] = 0;
294
	      /* We could precalculate these products, but this is a less
295
		 frequently used path so probably not worth it.  */
296
	      base -= sstride[n] * extent[n];
297
	      mbase -= mstride[n] * extent[n];
298
	      n++;
299
	      if (n >= rank)
300
		return;
301
	      else
302
		{
303
		  count[n]++;
304
		  base += sstride[n];
305
		  mbase += mstride[n];
306
		}
307
	    } while (count[n] == extent[n]);
308
	}
309
    }
310
  return;
311
}
312
313
'header3`
314
{
315
  index_type rank;
316
  index_type dstride;
317
  index_type * restrict dest;
318
  index_type n;
319
320
  if (*mask)
321
    {
322
      findloc0_'atype_code` (retarray, array, value, back'len_arg`);
323
      return;
324
    }
325
326
  rank = GFC_DESCRIPTOR_RANK (array);
327
328
  if (rank <= 0)
329
    internal_error (NULL, "Rank of array needs to be > 0");
330
331
  if (retarray->base_addr == NULL)
332
    {
333
      GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
334
      retarray->dtype.rank = 1;
335
      retarray->offset = 0;
336
      retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
337
    }
338
  else if (unlikely (compile_options.bounds_check))
339
    {
340
       bounds_iforeach_return ((array_t *) retarray, (array_t *) array,
341
			       "FINDLOC");
342
    }
343
344
  dstride = GFC_DESCRIPTOR_STRIDE(retarray,0);
345
  dest = retarray->base_addr;
346
  for (n = 0; n<rank; n++)
347
    dest[n * dstride] = 0 ;
348
}
349
350
#endif'
(-)libgfortran/m4/iparm.m4 (-1 / +1 lines)
Lines 4-10 dnl This file is part of the GNU Fortran 95 Runtim Link Here
4
dnl Distributed under the GNU GPL with exception.  See COPYING for details.
4
dnl Distributed under the GNU GPL with exception.  See COPYING for details.
5
dnl M4 macro file to get type names from filenames
5
dnl M4 macro file to get type names from filenames
6
define(get_typename2, `GFC_$1_$2')dnl
6
define(get_typename2, `GFC_$1_$2')dnl
7
define(get_typename, `get_typename2(ifelse($1,i,INTEGER,ifelse($1,r,REAL,ifelse($1,l,LOGICAL,ifelse($1,c,COMPLEX,ifelse($1,s,INTEGER,unknown))))),`$2')')dnl
7
define(get_typename, `get_typename2(ifelse($1,i,INTEGER,ifelse($1,r,REAL,ifelse($1,l,LOGICAL,ifelse($1,c,COMPLEX,ifelse($1,s,UINTEGER,unknown))))),`$2')')dnl
8
define(get_arraytype, `gfc_array_$1$2')dnl
8
define(get_arraytype, `gfc_array_$1$2')dnl
9
define(define_type, `dnl
9
define(define_type, `dnl
10
ifelse(regexp($2,`^[0-9]'),-1,`dnl
10
ifelse(regexp($2,`^[0-9]'),-1,`dnl

Return to bug 54613