gdb_breakpoint [gdb_get_line_number "Break Here"]
gdb_continue_to_breakpoint "Break Here"
-gdb_test "whatis var1" "type = real\\(kind=4\\) \\(3\\)"
-gdb_test "whatis var2" "type = real\\(kind=4\\), allocatable \\(4\\)"
+set real4 [fortran_real4]
+set int4 [fortran_int4]
+
+gdb_test "whatis var1" "type = ${real4} \\(3\\)"
+gdb_test "whatis var2" "type = ${real4}, allocatable \\(4\\)"
gdb_test "whatis var3" "type = Type type1"
gdb_test "whatis var4" "type = Type type2"
gdb_test "whatis var5" "type = Type type3"
gdb_test "whatis var6" "type = Type type4"
gdb_test "whatis var7" "type = Type type5"
-gdb_test "ptype var1" "type = real\\(kind=4\\) \\(3\\)"
-gdb_test "ptype var2" "type = real\\(kind=4\\), allocatable \\(4\\)"
+gdb_test "ptype var1" "type = ${real4} \\(3\\)"
+gdb_test "ptype var2" "type = ${real4}, allocatable \\(4\\)"
gdb_test "ptype var3" \
[ multi_line "type = Type type1" \
- " integer\\(kind=4\\) :: spacer" \
- " integer\\(kind=4\\) :: t1_i" \
+ " ${int4} :: spacer" \
+ " ${int4} :: t1_i" \
"End Type type1" ]
gdb_test "ptype var4" \
[multi_line "type = Type type2" \
- " integer\\(kind=4\\) :: spacer" \
+ " ${int4} :: spacer" \
" Type type1, allocatable :: t2_array\\(3\\)" \
"End Type type2"]
gdb_test "ptype var5" \
[ multi_line "type = Type type3" \
- " integer\\(kind=4\\) :: spacer" \
+ " ${int4} :: spacer" \
" Type type1 :: t3_array\\(3\\)"\
"End Type type3" ]
gdb_test "ptype var6" \
[ multi_line "type = Type type4" \
- " integer\\(kind=4\\) :: spacer" \
+ " ${int4} :: spacer" \
" Type type2, allocatable :: t4_array\\(3\\)" \
"End Type type4" ]
gdb_test "ptype var7" \
[ multi_line "type = Type type5" \
- " integer\\(kind=4\\) :: spacer" \
+ " ${int4} :: spacer" \
" Type type2 :: t5_array\\(4\\)" \
"End Type type5" ]
-gdb_test "whatis var3%t1_i" "type = integer\\(kind=4\\)"
+gdb_test "whatis var3%t1_i" "type = ${int4}"
gdb_test "whatis var4%t2_array" "type = Type type1, allocatable \\(3\\)"
gdb_test "whatis var5%t3_array" "type = Type type1 \\(3\\)"
gdb_test "whatis var6%t4_array" "type = Type type2, allocatable \\(3\\)"
gdb_test "whatis var7%t5_array" "type = Type type2 \\(4\\)"
-gdb_test "ptype var3%t1_i" "type = integer\\(kind=4\\)"
+gdb_test "ptype var3%t1_i" "type = ${int4}"
gdb_test "ptype var4%t2_array" [ multi_line "type = Type type1" \
- " integer\\(kind=4\\) :: spacer" \
- " integer\\(kind=4\\) :: t1_i" \
+ " ${int4} :: spacer" \
+ " ${int4} :: t1_i" \
"End Type type1, allocatable \\(3\\)" ]
gdb_test "ptype var5%t3_array" [ multi_line "type = Type type1" \
- " integer\\(kind=4\\) :: spacer" \
- " integer\\(kind=4\\) :: t1_i" \
+ " ${int4} :: spacer" \
+ " ${int4} :: t1_i" \
"End Type type1 \\(3\\)" ]
gdb_test "ptype var6%t4_array" \
[ multi_line "type = Type type2" \
- " integer\\(kind=4\\) :: spacer" \
+ " ${int4} :: spacer" \
" Type type1, allocatable :: t2_array\\(:\\)" \
"End Type type2, allocatable \\(3\\)" ]
gdb_test "ptype var7%t5_array" \
[ multi_line "type = Type type2" \
- " integer\\(kind=4\\) :: spacer" \
+ " ${int4} :: spacer" \
" Type type1, allocatable :: t2_array\\(:\\)" \
"End Type type2 \\(4\\)" ]
gdb_test "whatis var4%t2_array(1)" "type = Type type1"
gdb_test "whatis var7%t5_array(1)" "type = Type type2"
gdb_test "ptype var4%t2_array(1)" \
[ multi_line "type = Type type1" \
- " integer\\(kind=4\\) :: spacer" \
- " integer\\(kind=4\\) :: t1_i" \
+ " ${int4} :: spacer" \
+ " ${int4} :: t1_i" \
"End Type type1" ]
gdb_test "ptype var5%t3_array(1)" \
[ multi_line "type = Type type1" \
- " integer\\(kind=4\\) :: spacer" \
- " integer\\(kind=4\\) :: t1_i" \
+ " ${int4} :: spacer" \
+ " ${int4} :: t1_i" \
"End Type type1" ]
gdb_test "ptype var6%t4_array(1)" \
[ multi_line "type = Type type2" \
- " integer\\(kind=4\\) :: spacer" \
+ " ${int4} :: spacer" \
" Type type1, allocatable :: t2_array\\(2\\)" \
"End Type type2" ]
gdb_test "ptype var7%t5_array(1)" \
[ multi_line "type = Type type2" \
- " integer\\(kind=4\\) :: spacer" \
+ " ${int4} :: spacer" \
" Type type1, allocatable :: t2_array\\(2\\)" \
"End Type type2" ]
-gdb_test "whatis var4%t2_array(1)%t1_i" "type = integer\\(kind=4\\)"
-gdb_test "whatis var5%t3_array(1)%t1_i" "type = integer\\(kind=4\\)"
+gdb_test "whatis var4%t2_array(1)%t1_i" "type = ${int4}"
+gdb_test "whatis var5%t3_array(1)%t1_i" "type = ${int4}"
gdb_test "whatis var6%t4_array(1)%t2_array" \
"type = Type type1, allocatable \\(2\\)"
gdb_test "whatis var7%t5_array(1)%t2_array" \
"type = Type type1, allocatable \\(2\\)"
-gdb_test "ptype var4%t2_array(1)%t1_i" "type = integer\\(kind=4\\)"
-gdb_test "ptype var5%t3_array(1)%t1_i" "type = integer\\(kind=4\\)"
+gdb_test "ptype var4%t2_array(1)%t1_i" "type = ${int4}"
+gdb_test "ptype var5%t3_array(1)%t1_i" "type = ${int4}"
gdb_test "ptype var6%t4_array(1)%t2_array" \
[ multi_line "type = Type type1" \
- " integer\\(kind=4\\) :: spacer" \
- " integer\\(kind=4\\) :: t1_i" \
+ " ${int4} :: spacer" \
+ " ${int4} :: t1_i" \
"End Type type1, allocatable \\(2\\)" ]
gdb_test "ptype var7%t5_array(1)%t2_array" \
[ multi_line "type = Type type1" \
- " integer\\(kind=4\\) :: spacer" \
- " integer\\(kind=4\\) :: t1_i" \
+ " ${int4} :: spacer" \
+ " ${int4} :: t1_i" \
"End Type type1, allocatable \\(2\\)" ]
gdb_test "whatis var6%t4_array(1)%t2_array(1)" \
"type = Type type1"
gdb_test "ptype var6%t4_array(1)%t2_array(1)" \
[ multi_line \
"type = Type type1" \
- " integer\\(kind=4\\) :: spacer" \
- " integer\\(kind=4\\) :: t1_i" \
+ " ${int4} :: spacer" \
+ " ${int4} :: t1_i" \
"End Type type1" ]
gdb_test "ptype var7%t5_array(1)%t2_array(1)" \
[ multi_line \
"type = Type type1" \
- " integer\\(kind=4\\) :: spacer" \
- " integer\\(kind=4\\) :: t1_i" \
+ " ${int4} :: spacer" \
+ " ${int4} :: t1_i" \
"End Type type1" ]
gdb_test "ptype var8%ptr_1%t2_array" \
[ multi_line \
"type = Type type1" \
- " integer\\(kind=4\\) :: spacer" \
- " integer\\(kind=4\\) :: t1_i" \
+ " ${int4} :: spacer" \
+ " ${int4} :: t1_i" \
"End Type type1, allocatable \\(3\\)" ]