SIGSEV in user-defined elemental function

Tobias Burnus burnus@net-b.de
Tue Nov 21 17:37:00 GMT 2006


Hi,

Paul Thomas wrote:
> The dereferencing of D.1005, or of t.data, is what produces the
> segfault.  It seems to me that you are obliged to check the status of
> the pointer when using it; in this case in the main program.
>
> I would be dead against putting default runtime checks in there but if
> anybody feels motivated to do it, an option could be added to check
> pointer actual arguments, if the formal argument is not a pointer. 
> This could be part of -fbounds-check, for the sake of economy and
> convenience.  In this context, if the write statement is replaced by
> and assignment to an array, -fbounds-check picks up the mismatch in
> array size.
This PR already exists: 29616

Tobias



More information about the Fortran mailing list