any.m4 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. `/* Implementation of the ANY intrinsic
  2. Copyright (C) 2002-2022 Free Software Foundation, Inc.
  3. Contributed by Paul Brook <paul@nowt.org>
  4. This file is part of the GNU Fortran runtime library (libgfortran).
  5. Libgfortran is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public
  7. License as published by the Free Software Foundation; either
  8. version 3 of the License, or (at your option) any later version.
  9. Libgfortran is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. Under Section 7 of GPL version 3, you are granted additional
  14. permissions described in the GCC Runtime Library Exception, version
  15. 3.1, as published by the Free Software Foundation.
  16. You should have received a copy of the GNU General Public License and
  17. a copy of the GCC Runtime Library Exception along with this program;
  18. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  19. <http://www.gnu.org/licenses/>. */
  20. #include "libgfortran.h"'
  21. include(iparm.m4)dnl
  22. include(ifunction_logical.m4)dnl
  23. `#if defined (HAVE_'rtype_name`)'
  24. ARRAY_FUNCTION(0,
  25. ` result = 0;',
  26. ` /* Return true if any of the elements are set. */
  27. if (*src)
  28. {
  29. result = 1;
  30. break;
  31. }', `')`
  32. #endif'