1
1

If the F77 datatype (like INTEGER*1) is supposed to be available, check

for the size. If it does not fit, purge from the list, i.e. reset all
values to zero.

Fixes pgf90 problem, which silently accepts INTEGER*16, but internally
using INTEGER...

This commit was SVN r5594.
Этот коммит содержится в:
Rainer Keller 2005-05-04 18:37:32 +00:00
родитель 536a5c5d09
Коммит 164e8caa5e
3 изменённых файлов: 55 добавлений и 0 удалений

Просмотреть файл

@ -33,6 +33,7 @@ sinclude(config/f77_find_ext_symbol_convention.m4)
sinclude(config/f77_get_alignment.m4)
sinclude(config/f77_get_fortran_handle_max.m4)
sinclude(config/f77_get_sizeof.m4)
sinclude(config/f77_purge_unsupported_kind.m4)
sinclude(config/f90_check_type.m4)
sinclude(config/f90_find_module_include_flag.m4)

34
config/f77_purge_unsupported_kind.m4 Обычный файл
Просмотреть файл

@ -0,0 +1,34 @@
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2004-2005 The Trustees of Indiana University.
dnl All rights reserved.
dnl Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
dnl All rights reserved.
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl
AC_DEFUN([OMPI_F77_PURGE_UNSUPPORTED_KIND],[
# Purge F77 types (such as INTEGER*16) that don't match exptected datatype size.
# First arg is type, 2nd arg is config var to define.
AC_MSG_CHECKING([whether FORTRAN $1 has expected size])
val=`echo $1 | cut -f2 -d'*'`
type=`echo $1 | cut -f1 -d'*'`
if test "x$((OMPI_SIZEOF_FORTRAN_$type$val))" != "x$val" ; then
eval "OMPI_SIZEOF_FORTRAN_$type$val=0"
# eval "OMPI_ALIGNMENT_FORTRAN_$type$val=0"
eval "OMPI_HAVE_FORTRAN_$type$val=0"
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([yes])
fi
unset val type
])dnl

Просмотреть файл

@ -421,6 +421,26 @@ else
OMPI_F77_GET_SIZEOF(COMPLEX, OMPI_SIZEOF_FORTRAN_COMPLEX)
OMPI_F77_GET_SIZEOF(DOUBLE COMPLEX, OMPI_SIZEOF_FORTRAN_DBLCOMPLEX)
if test "$OMPI_HAVE_FORTRAN_INTEGER1" = "1"; then
OMPI_F77_GET_SIZEOF(INTEGER*1, OMPI_SIZEOF_FORTRAN_INTEGER1)
OMPI_F77_PURGE_UNSUPPORTED_KIND(INTEGER*1)
fi
if test "$OMPI_HAVE_FORTRAN_INTEGER2" = "1"; then
OMPI_F77_GET_SIZEOF(INTEGER*2, OMPI_SIZEOF_FORTRAN_INTEGER2)
OMPI_F77_PURGE_UNSUPPORTED_KIND(INTEGER*2)
fi
if test "$OMPI_HAVE_FORTRAN_INTEGER4" = "1"; then
OMPI_F77_GET_SIZEOF(INTEGER*4, OMPI_SIZEOF_FORTRAN_INTEGER4)
OMPI_F77_PURGE_UNSUPPORTED_KIND(INTEGER*4)
fi
if test "$OMPI_HAVE_FORTRAN_INTEGER8" = "1"; then
OMPI_F77_GET_SIZEOF(INTEGER*8, OMPI_SIZEOF_FORTRAN_INTEGER8)
OMPI_F77_PURGE_UNSUPPORTED_KIND(INTEGER*8)
fi
if test "$OMPI_HAVE_FORTRAN_INTEGER16" = "1"; then
OMPI_F77_GET_SIZEOF(INTEGER*16, OMPI_SIZEOF_FORTRAN_INTEGER16)
OMPI_F77_PURGE_UNSUPPORTED_KIND(INTEGER*16)
fi
OMPI_F77_GET_ALIGNMENT(LOGICAL, OMPI_ALIGNMENT_FORTRAN_LOGICAL)
OMPI_F77_GET_ALIGNMENT(INTEGER, OMPI_ALIGNMENT_FORTRAN_INTEGER)
OMPI_F77_GET_ALIGNMENT(REAL, OMPI_ALIGNMENT_FORTRAN_REAL)