Mercurial > hg > CbC > CbC_gcc
comparison libgfortran/generated/maxloc2_16_s4.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 /* Implementation of the MAXLOC intrinsic | 1 /* Implementation of the MAXLOC intrinsic |
2 Copyright (C) 2017-2018 Free Software Foundation, Inc. | 2 Copyright (C) 2017-2020 Free Software Foundation, Inc. |
3 Contributed by Thomas Koenig | 3 Contributed by Thomas Koenig |
4 | 4 |
5 This file is part of the GNU Fortran runtime library (libgfortran). | 5 This file is part of the GNU Fortran runtime library (libgfortran). |
6 | 6 |
7 Libgfortran is free software; you can redistribute it and/or | 7 Libgfortran is free software; you can redistribute it and/or |
26 #include "libgfortran.h" | 26 #include "libgfortran.h" |
27 #include <stdlib.h> | 27 #include <stdlib.h> |
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); |
40 } | 40 } |
41 | 41 |
47 maxloc2_16_s4 (gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) | 47 maxloc2_16_s4 (gfc_array_s4 * const restrict array, GFC_LOGICAL_4 back, gfc_charlen_type len) |
48 { | 48 { |
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); |
57 if (extent <= 0) | 57 if (extent <= 0) |
58 return 0; | 58 return 0; |
86 gfc_charlen_type len) | 86 gfc_charlen_type len) |
87 { | 87 { |
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; |
96 index_type mstride; | 96 index_type mstride; |
97 | 97 |