]>
Commit | Line | Data |
---|---|---|
4ee9c684 | 1 | `/* Implementation of the MAXVAL intrinsic |
41f2d5e8 | 2 | Copyright 2002, 2007 Free Software Foundation, Inc. |
4ee9c684 | 3 | Contributed by Paul Brook <paul@nowt.org> |
4 | ||
b417ea8c | 5 | This file is part of the GNU Fortran 95 runtime library (libgfortran). |
4ee9c684 | 6 | |
7 | Libgfortran is free software; you can redistribute it and/or | |
b417ea8c | 8 | modify it under the terms of the GNU General Public |
4ee9c684 | 9 | License as published by the Free Software Foundation; either |
b417ea8c | 10 | version 2 of the License, or (at your option) any later version. |
11 | ||
12 | In addition to the permissions in the GNU General Public License, the | |
13 | Free Software Foundation gives you unlimited permission to link the | |
14 | compiled version of this file into combinations with other programs, | |
15 | and to distribute those combinations without any restriction coming | |
16 | from the use of this file. (The General Public License restrictions | |
17 | do apply in other respects; for example, they cover modification of | |
18 | the file, and distribution when not linked into a combine | |
19 | executable.) | |
4ee9c684 | 20 | |
21 | Libgfortran is distributed in the hope that it will be useful, | |
22 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
b417ea8c | 24 | GNU General Public License for more details. |
4ee9c684 | 25 | |
b417ea8c | 26 | You should have received a copy of the GNU General Public |
27 | License along with libgfortran; see the file COPYING. If not, | |
5ac2525b | 28 | write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
29 | Boston, MA 02110-1301, USA. */ | |
4ee9c684 | 30 | |
41f2d5e8 | 31 | #include "libgfortran.h" |
4ee9c684 | 32 | #include <stdlib.h> |
41f2d5e8 | 33 | #include <assert.h>' |
4ee9c684 | 34 | |
35 | include(iparm.m4)dnl | |
36 | include(ifunction.m4)dnl | |
920e54ef | 37 | |
38 | `#if defined (HAVE_'atype_name`) && defined (HAVE_'rtype_name`)' | |
39 | ||
cdafa1f6 | 40 | ARRAY_FUNCTION(atype_min, |
41 | ` result = atype_min;', | |
4ee9c684 | 42 | ` if (*src > result) |
43 | result = *src;') | |
44 | ||
cdafa1f6 | 45 | MASKED_ARRAY_FUNCTION(atype_min, |
46 | ` result = atype_min;', | |
4ee9c684 | 47 | ` if (*msrc && *src > result) |
48 | result = *src;') | |
49 | ||
4292b27d | 50 | SCALAR_ARRAY_FUNCTION(atype_min) |
51 | ||
920e54ef | 52 | #endif |