]>
Commit | Line | Data |
---|---|---|
4ee9c684 | 1 | `/* Implementation of the PRODUCT intrinsic |
f1717362 | 2 | Copyright (C) 2002-2016 Free Software Foundation, Inc. |
4ee9c684 | 3 | Contributed by Paul Brook <paul@nowt.org> |
4 | ||
b4ba8232 | 5 | This file is part of the GNU Fortran 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 |
6bc9506f | 10 | version 3 of the License, or (at your option) any later version. |
4ee9c684 | 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 | |
b417ea8c | 15 | GNU General Public License for more details. |
4ee9c684 | 16 | |
6bc9506f | 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/>. */ | |
4ee9c684 | 25 | |
41f2d5e8 | 26 | #include "libgfortran.h" |
4ee9c684 | 27 | #include <stdlib.h> |
41f2d5e8 | 28 | #include <assert.h>' |
4ee9c684 | 29 | |
30 | include(iparm.m4)dnl | |
31 | include(ifunction.m4)dnl | |
920e54ef | 32 | |
33 | `#if defined (HAVE_'atype_name`) && defined (HAVE_'rtype_name`)' | |
34 | ||
4ee9c684 | 35 | ARRAY_FUNCTION(1, |
36 | ` result = 1;', | |
b4ba8232 | 37 | ` result *= *src;', `') |
4ee9c684 | 38 | |
39 | MASKED_ARRAY_FUNCTION(1, | |
40 | ` result = 1;', | |
41 | ` if (*msrc) | |
42 | result *= *src;') | |
43 | ||
4292b27d | 44 | SCALAR_ARRAY_FUNCTION(1) |
45 | ||
0a6b5f6b | 46 | `#endif' |