binutils-gdb/gdb/testsuite/gdb.fortran
Andrew Burgess a706786341 gdb: Check for not allocated/associated values during array slicing
When extracting an array slice we should give up if the array is
not-allocated or not-associated.  For Fortran, at least in gfortran
compiled code, the upper and lower bounds are undefined if the array
is not allocated or not associated, in which case performing checks
against these bounds will result in undefined behaviour.

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

gdb/ChangeLog:

	* valops.c (value_slice): Check for not allocated or not
	associated values.

gdb/testsuite/ChangeLog:

	* gdb.fortran/vla-sizeof.exp: Update expected results.
2019-06-10 23:05:58 +01:00
..
array-bounds.exp
array-bounds.f90
array-element.exp
array-element.f
charset.exp
charset.f90
common-block.exp
common-block.f90
complex.exp gdb/fortran: Use floatformats_ia64_quad for fortran 16-byte floats 2019-05-18 09:49:02 +01:00
complex.f90 gdb/fortran: better types for components of complex numbers 2019-04-30 10:10:31 +01:00
derived-type-function.exp
derived-type-function.f90
derived-type.exp
derived-type.f90
dot-ops.exp
exprs.exp gdb/fortran: Print 'void' type in lower case 2019-04-30 10:17:01 +01:00
function-calls.exp
function-calls.f90
intrinsics.exp
intrinsics.f90
library-module-lib.f90
library-module-main.f90
library-module.exp
logical.exp
logical.f90
max-depth.exp
max-depth.f90
module.exp
module.f90
multi-dim.exp
multi-dim.f90
nested-funcs.exp
nested-funcs.f90
print-formatted.exp
print-formatted.f90
printing-types.exp gdb/fortran: Use floatformats_ia64_quad for fortran 16-byte floats 2019-05-18 09:49:02 +01:00
printing-types.f90 gdb/fortran: Use floatformats_ia64_quad for fortran 16-byte floats 2019-05-18 09:49:02 +01:00
ptr-indentation.exp gdb/fortran: Update rules for printing whitespace in types 2019-04-30 10:36:56 +01:00
ptr-indentation.f90
ptype-on-functions.exp gdb/fortran: Update rules for printing whitespace in types 2019-04-30 10:36:56 +01:00
ptype-on-functions.f90 gdb/fortran: print function arguments when printing function type 2019-04-30 10:34:26 +01:00
short-circuit-argument-list.exp
short-circuit-argument-list.f90
subarray.exp
subarray.f
type-kinds.exp gdb/fortran: Use floatformats_ia64_quad for fortran 16-byte floats 2019-05-18 09:49:02 +01:00
type.f90
types.exp
vla-alloc-assoc.exp
vla-datatypes.exp gdb/fortran: Add allocatable type qualifier 2019-04-30 10:36:57 +01:00
vla-datatypes.f90
vla-history.exp
vla-ptr-info.exp gdb/fortran: Update rules for printing whitespace in types 2019-04-30 10:36:56 +01:00
vla-ptype-sub.exp
vla-ptype.exp gdb/fortran: Add allocatable type qualifier 2019-04-30 10:36:57 +01:00
vla-sizeof.exp gdb: Check for not allocated/associated values during array slicing 2019-06-10 23:05:58 +01:00
vla-sub.f90
vla-type.exp gdb/fortran: Add allocatable type qualifier 2019-04-30 10:36:57 +01:00
vla-type.f90
vla-value-sub-arbitrary.exp
vla-value-sub-finish.exp
vla-value-sub.exp
vla-value.exp gdb/fortran: Add allocatable type qualifier 2019-04-30 10:36:57 +01:00
vla.f90
whatis_type.exp