mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 13:27:26 +08:00
Fortran, testsuite: Add testcases for nested structures.
As as result of printing only the outer elements of nested structures, some testcases have to be added to check for corner cases with VLA's. 2016-05-25 Bernhard Heckel <bernhard.heckel@intel.com> gdb/testsuite/Changelog: * gdb.fortran/vla-type.exp: Access elements in nested structs.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2016-05-25 Bernhard Heckel <bernhard.heckel@intel.com>
|
||||||
|
|
||||||
|
* gdb.fortran/vla-type.exp: Access elements in nested structs.
|
||||||
|
|
||||||
2016-05-25 Bernhard Heckel <bernhard.heckel@intel.com>
|
2016-05-25 Bernhard Heckel <bernhard.heckel@intel.com>
|
||||||
|
|
||||||
* gdb.fortran/type.f90: Add nested structures.
|
* gdb.fortran/type.f90: Add nested structures.
|
||||||
|
@ -101,6 +101,10 @@ gdb_test "ptype fivev" \
|
|||||||
[multi_line "type = Type five" \
|
[multi_line "type = Type five" \
|
||||||
"\\s+Type one :: tone" \
|
"\\s+Type one :: tone" \
|
||||||
"End Type five" ]
|
"End Type five" ]
|
||||||
|
gdb_test "ptype fivev%tone" \
|
||||||
|
[multi_line "type = Type one" \
|
||||||
|
" $int :: ivla\\(10,10,10\\)" \
|
||||||
|
"End Type one" ]
|
||||||
|
|
||||||
# Check array of types containing a VLA
|
# Check array of types containing a VLA
|
||||||
gdb_breakpoint [gdb_get_line_number "fivearr-filled"]
|
gdb_breakpoint [gdb_get_line_number "fivearr-filled"]
|
||||||
@ -114,10 +118,18 @@ gdb_test "ptype fivearr(1)" \
|
|||||||
[multi_line "type = Type five" \
|
[multi_line "type = Type five" \
|
||||||
"\\s+Type one :: tone" \
|
"\\s+Type one :: tone" \
|
||||||
"End Type five" ]
|
"End Type five" ]
|
||||||
|
gdb_test "ptype fivearr(1)%tone" \
|
||||||
|
[multi_line "type = Type one" \
|
||||||
|
" $int :: ivla\\(2,4,6\\)" \
|
||||||
|
"End Type one" ]
|
||||||
gdb_test "ptype fivearr(2)" \
|
gdb_test "ptype fivearr(2)" \
|
||||||
[multi_line "type = Type five" \
|
[multi_line "type = Type five" \
|
||||||
"\\s+Type one :: tone" \
|
"\\s+Type one :: tone" \
|
||||||
"End Type five" ]
|
"End Type five" ]
|
||||||
|
gdb_test "ptype fivearr(2)%tone" \
|
||||||
|
[multi_line "type = Type one" \
|
||||||
|
" $int :: ivla\\(12,14,16\\)" \
|
||||||
|
"End Type one" ]
|
||||||
|
|
||||||
# Check allocation status of dynamic array and it's dynamic members
|
# Check allocation status of dynamic array and it's dynamic members
|
||||||
gdb_test "ptype fivedynarr" "type = <not allocated>"
|
gdb_test "ptype fivedynarr" "type = <not allocated>"
|
||||||
@ -126,6 +138,11 @@ gdb_test "ptype fivedynarr(2)" \
|
|||||||
[multi_line "type = Type five" \
|
[multi_line "type = Type five" \
|
||||||
"\\s+Type one :: tone" \
|
"\\s+Type one :: tone" \
|
||||||
"End Type five" ]
|
"End Type five" ]
|
||||||
|
gdb_test "ptype fivedynarr(2)%tone" \
|
||||||
|
[multi_line "type = Type one" \
|
||||||
|
" $int :: ivla\\(<not allocated>\\)" \
|
||||||
|
"End Type one" ] \
|
||||||
|
"ptype fivedynarr(2)%tone, not allocated"
|
||||||
|
|
||||||
# Check dynamic array of types containing a VLA
|
# Check dynamic array of types containing a VLA
|
||||||
gdb_breakpoint [gdb_get_line_number "fivedynarr-filled"]
|
gdb_breakpoint [gdb_get_line_number "fivedynarr-filled"]
|
||||||
@ -139,7 +156,15 @@ gdb_test "ptype fivedynarr(1)" \
|
|||||||
[multi_line "type = Type five" \
|
[multi_line "type = Type five" \
|
||||||
"\\s+Type one :: tone" \
|
"\\s+Type one :: tone" \
|
||||||
"End Type five" ]
|
"End Type five" ]
|
||||||
|
gdb_test "ptype fivedynarr(1)%tone" \
|
||||||
|
[multi_line "type = Type one" \
|
||||||
|
" $int :: ivla\\(2,4,6\\)" \
|
||||||
|
"End Type one" ]
|
||||||
gdb_test "ptype fivedynarr(2)" \
|
gdb_test "ptype fivedynarr(2)" \
|
||||||
[multi_line "type = Type five" \
|
[multi_line "type = Type five" \
|
||||||
"\\s+Type one :: tone" \
|
"\\s+Type one :: tone" \
|
||||||
"End Type five" ]
|
"End Type five" ]
|
||||||
|
gdb_test "ptype fivedynarr(2)%tone" \
|
||||||
|
[multi_line "type = Type one" \
|
||||||
|
" $int :: ivla\\(12,14,16\\)" \
|
||||||
|
"End Type one" ]
|
||||||
|
Reference in New Issue
Block a user