This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SIGSEV in user-defined elemental function


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]