xref: /netbsd-src/external/gpl3/gcc.old/dist/libgfortran/runtime/select.c (revision 4c3eb207d36f67d31994830c0a694161fc1ca39b)
1627f7eb2Smrg /* Implement the SELECT statement for character variables.
2*4c3eb207Smrg    Copyright (C) 2008-2020 Free Software Foundation, Inc.
3627f7eb2Smrg 
4627f7eb2Smrg This file is part of the GNU Fortran runtime library (libgfortran).
5627f7eb2Smrg 
6627f7eb2Smrg Libgfortran is free software; you can redistribute it and/or
7627f7eb2Smrg modify it under the terms of the GNU General Public
8627f7eb2Smrg License as published by the Free Software Foundation; either
9627f7eb2Smrg version 3 of the License, or (at your option) any later version.
10627f7eb2Smrg 
11627f7eb2Smrg Libgfortran is distributed in the hope that it will be useful,
12627f7eb2Smrg but WITHOUT ANY WARRANTY; without even the implied warranty of
13627f7eb2Smrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14627f7eb2Smrg GNU General Public License for more details.
15627f7eb2Smrg 
16627f7eb2Smrg Under Section 7 of GPL version 3, you are granted additional
17627f7eb2Smrg permissions described in the GCC Runtime Library Exception, version
18627f7eb2Smrg 3.1, as published by the Free Software Foundation.
19627f7eb2Smrg 
20627f7eb2Smrg You should have received a copy of the GNU General Public License and
21627f7eb2Smrg a copy of the GCC Runtime Library Exception along with this program;
22627f7eb2Smrg see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
23627f7eb2Smrg <http://www.gnu.org/licenses/>.  */
24627f7eb2Smrg 
25627f7eb2Smrg #include "libgfortran.h"
26627f7eb2Smrg 
27627f7eb2Smrg 
28627f7eb2Smrg /* The string selection function is defined using a few generic macros
29627f7eb2Smrg    in select_inc.c, so we avoid code duplication between the various
30627f7eb2Smrg    character type kinds.  */
31627f7eb2Smrg 
32627f7eb2Smrg #undef  CHARTYPE
33627f7eb2Smrg #define CHARTYPE char
34627f7eb2Smrg #undef  SUFFIX
35627f7eb2Smrg #define SUFFIX(x) x
36627f7eb2Smrg 
37627f7eb2Smrg #include "select_inc.c"
38627f7eb2Smrg 
39627f7eb2Smrg 
40627f7eb2Smrg #undef  CHARTYPE
41627f7eb2Smrg #define CHARTYPE gfc_char4_t
42627f7eb2Smrg #undef  SUFFIX
43627f7eb2Smrg #define SUFFIX(x) x ## _char4
44627f7eb2Smrg 
45627f7eb2Smrg #include "select_inc.c"
46627f7eb2Smrg 
47