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