This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] PR 14928: Fix two-argument variant of MINLOC/MAXLOC
- From: Paul Brook <paul at codesourcery dot com>
- To: fortran at gcc dot gnu dot org
- Cc: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>,patch <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 12 Jun 2004 12:58:08 +0100
- Subject: Re: [gfortran] PR 14928: Fix two-argument variant of MINLOC/MAXLOC
- Organization: CodeSourcery
- References: <40C1C604.2070905@physik.uni-muenchen.de>
> 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
> Andrew Vaught <andyv@firstinter.net>
>
> * check.c (gfc_check_minloc_maxloc): Take argument list insted
> of individual arguments, reorder if necessary.
> * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
> * intrinsic.c (add_functions): Special treatment for MINLOC,
> MAXLOC, pass check function as (void *).
> (check_specific): Catch special case MINLOC, MAXLOC.
You can't typecast a function pointer to (void *), it will break on targets
that use function descriptors (eg. ia64). You'll need to figure out another
way of doing this. Maybe add a new variant of add_sym_3, (similar to
gfc_add_sym_3s).
Other than that, it looks ok.
Paul