This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] PR35203 - reject dummies with VALUE + OPTIONAL
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Tobias Schlüter" <tobias dot schlueter at physik dot uni-muenchen dot de>
- Cc: "Tobias Burnus" <tobias dot burnus at physik dot fu-berlin dot de>, gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Wed, 26 Mar 2008 21:58:14 +0100
- Subject: Re: [Patch, Fortran] PR35203 - reject dummies with VALUE + OPTIONAL
- References: <20080326203912.GA7862@physik.fu-berlin.de> <47EAB572.8000202@physik.uni-muenchen.de>
On Wed, Mar 26, 2008 at 9:43 PM, Tobias Schlüter
<tobias.schlueter@physik.uni-muenchen.de> wrote:
>
> Tobias Burnus wrote:
> > Having a dummy which has VALUE and OPTIONAL attribute does not work in
> > gfortran, but is valid Fortran 9x/200x; to be more precise: One cannot
> > distinguish an absent argument (argument == NULL) from an argument
> > of value 0 (argument == 0). Without VALUE this is easy: arg == NULL
> > vs. *arg == 0.
> >
> > One has therefore to do the same as for character variables: A hidden
> > argument needs to be passed.
> >
> > This patch takes the simple route by simply rejecting such dummies.
> >
> > OK for the trunk?
>
> Please don't use gfc_error for shortcomings in the compiler. ICEing or
> gfc_internal_error is much more appropriate for something where the
> compiler is at fault.
We have sorry () for this purpose (known implementation limitations).
Richard.