This is the mail archive of the mailing list for the GDB 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: [PATCH] gdb: Check for not allocated/associated values during array slicing

>>>>> "Andrew" == Andrew Burgess <> writes:

Andrew> When extracting an array slice we should give up if the array is
Andrew> not-allocated or not-associated.  For Fortran, at least in gfortran
Andrew> compiled code, the upper and lower bounds are undefined if the array
Andrew> is not allocated or not associated, in which case performing checks
Andrew> against these bounds will result in undefined behaviour.

Andrew> Better then to throw an error if we try to slice such an array.  This
Andrew> changes the error message that the user will receive in these
Andrew> cases (if they got an error message before).  Previously they may have
Andrew> gotten "slice out of range" now they'll get "array not allocated" or
Andrew> "array not associated".

I don't know Fortran, so I hesitated to comment on this patch.  But,
maybe you are waiting for some feedback?  I don't have an objection to
it, though that isn't super comforting considering that I don't know
what an associated type is.


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