Skip to content

Commit efe432e

Browse files
author
Craig Rasmussen
committed
Fixed ATerm comparison brought about by removal of explicit Kind term within a type.
1 parent d0e467c commit efe432e

6 files changed

Lines changed: 42 additions & 53 deletions

File tree

tests/rule-tests/ast-aterms/R1211.f90.fast.trm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Program(
2121
)
2222
, ProcedureDeclarationStmt(
2323
no-label()
24-
, INTEGER(Kind(IntVal("4")))
24+
, INTEGER(IntVal("4"))
2525
, []
2626
, [ProcDecl("a5", no-init())]
2727
){Comment("

tests/rule-tests/ast-aterms/R404.f90.fast.trm

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Program(
1010
)
1111
, TypeDeclarationStmt(
1212
no-label()
13-
, INTEGER(Kind(IntVal("4")))
13+
, INTEGER(IntVal("4"))
1414
, []
15-
, [Var("b", INTEGER(Kind(IntVal("4"))), no-init())]
15+
, [Var("b", INTEGER(IntVal("4")), no-init())]
1616
)
1717
, TypeDeclarationStmt(
1818
no-label()
@@ -22,9 +22,9 @@ Program(
2222
)
2323
, TypeDeclarationStmt(
2424
no-label()
25-
, REAL(Kind(IntVal("4")))
25+
, REAL(IntVal("4"))
2626
, []
27-
, [Var("d", REAL(Kind(IntVal("4"))), no-init())]
27+
, [Var("d", REAL(IntVal("4")), no-init())]
2828
)
2929
, TypeDeclarationStmt(
3030
no-label()
@@ -46,9 +46,9 @@ Program(
4646
)
4747
, TypeDeclarationStmt(
4848
no-label()
49-
, COMPLEX(Kind(IntVal("4")))
49+
, COMPLEX(IntVal("4"))
5050
, []
51-
, [Var("h", COMPLEX(Kind(IntVal("4"))), no-init())]
51+
, [Var("h", COMPLEX(IntVal("4")), no-init())]
5252
)
5353
, TypeDeclarationStmt(
5454
no-label()
@@ -82,9 +82,9 @@ Program(
8282
)
8383
, TypeDeclarationStmt(
8484
no-label()
85-
, LOGICAL(Kind(IntVal("1")))
85+
, LOGICAL(IntVal("1"))
8686
, []
87-
, [Var("n", LOGICAL(Kind(IntVal("1"))), no-init())]
87+
, [Var("n", LOGICAL(IntVal("1")), no-init())]
8888
)
8989
, TypeDeclarationStmt(
9090
no-label()

tests/rule-tests/ast-aterms/R405.f90.fast.trm

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,82 +12,78 @@ Program(
1212
")}
1313
, TypeDeclarationStmt(
1414
no-label()
15-
, INTEGER(Kind(IntVal("4")))
15+
, INTEGER(IntVal("4"))
1616
, [PARAMETER()]
17-
, [Var(
18-
"i"
19-
, INTEGER(Kind(IntVal("4")))
20-
, Init(IntVal("4"))
21-
)]
17+
, [Var("i", INTEGER(IntVal("4")), Init(IntVal("4")))]
2218
)
2319
, TypeDeclarationStmt(
2420
no-label()
25-
, INTEGER(Kind(IntVal("4")))
21+
, INTEGER(IntVal("4"))
2622
, []
27-
, [Var("p", INTEGER(Kind(IntVal("4"))), no-init())]
23+
, [Var("p", INTEGER(IntVal("4")), no-init())]
2824
)
2925
, TypeDeclarationStmt(
3026
no-label()
31-
, INTEGER(Kind(VarRef("foo")))
27+
, INTEGER(VarRef("foo"))
3228
, []
33-
, [Var("bar", INTEGER(Kind(VarRef("foo"))), no-init())]
29+
, [Var("bar", INTEGER(VarRef("foo")), no-init())]
3430
)
3531
, TypeDeclarationStmt(
3632
no-label()
37-
, INTEGER(Kind(IntVal("8")))
33+
, INTEGER(IntVal("8"))
3834
, []
39-
, [Var("j", INTEGER(Kind(IntVal("8"))), no-init())]
35+
, [Var("j", INTEGER(IntVal("8")), no-init())]
4036
)
4137
, TypeDeclarationStmt(
4238
no-label()
43-
, INTEGER(Kind(PartRef("KIND", [IntVal("4")], no-image-selector())))
39+
, INTEGER(PartRef("KIND", [IntVal("4")], no-image-selector()))
4440
, []
4541
, [ Var(
4642
"k"
47-
, INTEGER(Kind(PartRef("KIND", [IntVal("4")], no-image-selector())))
43+
, INTEGER(PartRef("KIND", [IntVal("4")], no-image-selector()))
4844
, no-init()
4945
)
5046
]
5147
)
5248
, TypeDeclarationStmt(
5349
no-label()
54-
, INTEGER(Kind(VarRef("i")))
50+
, INTEGER(VarRef("i"))
5551
, []
56-
, [Var("m", INTEGER(Kind(VarRef("i"))), no-init())]
52+
, [Var("m", INTEGER(VarRef("i")), no-init())]
5753
)
5854
, TypeDeclarationStmt(
5955
no-label()
60-
, INTEGER(Kind(PartRef("KIND", [VarRef("j")], no-image-selector())))
56+
, INTEGER(PartRef("KIND", [VarRef("j")], no-image-selector()))
6157
, []
6258
, [ Var(
6359
"n"
64-
, INTEGER(Kind(PartRef("KIND", [VarRef("j")], no-image-selector())))
60+
, INTEGER(PartRef("KIND", [VarRef("j")], no-image-selector()))
6561
, no-init()
6662
)
6763
]
6864
)
6965
, TypeDeclarationStmt(
7066
no-label()
71-
, INTEGER(Kind(VarRef("i")))
67+
, INTEGER(VarRef("i"))
7268
, []
73-
, [Var("o", INTEGER(Kind(VarRef("i"))), no-init())]
69+
, [Var("o", INTEGER(VarRef("i")), no-init())]
7470
)
7571
, TypeDeclarationStmt(
7672
no-label()
77-
, INTEGER(Kind(PartRef("SELECTED_INT_KIND", [IntVal("12")], no-image-selector())))
73+
, INTEGER(PartRef("SELECTED_INT_KIND", [IntVal("12")], no-image-selector()))
7874
, []
7975
, [ Var(
8076
"d"
81-
, INTEGER(Kind(PartRef("SELECTED_INT_KIND", [IntVal("12")], no-image-selector())))
77+
, INTEGER(PartRef("SELECTED_INT_KIND", [IntVal("12")], no-image-selector()))
8278
, no-init()
8379
)
8480
]
8581
)
8682
, TypeDeclarationStmt(
8783
no-label()
88-
, REAL(Kind(IntVal("4")))
84+
, REAL(IntVal("4"))
8985
, []
90-
, [Var("q", REAL(Kind(IntVal("4"))), no-init())]
86+
, [Var("q", REAL(IntVal("4")), no-init())]
9187
){Comment("
9288

9389
")}

tests/rule-tests/ast-aterms/R463.f90.fast.trm

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@ Program(
44
, Scope(
55
[ TypeDeclarationStmt(
66
no-label()
7-
, INTEGER(Kind(IntVal("16")))
7+
, INTEGER(IntVal("16"))
88
, [PARAMETER()]
9-
, [Var(
10-
"ieee64_two"
11-
, INTEGER(Kind(IntVal("16")))
12-
, Init(HexVal("Z'4000000000000000'"))
13-
)]
9+
, [Var("ieee64_two", INTEGER(IntVal("16")), Init(HexVal("Z'4000000000000000'")))]
1410
){Comment("
1511

1612
")}

tests/rule-tests/ast-aterms/R501.f90.fast.trm

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ Program(
4040
")}
4141
, TypeDeclarationStmt(
4242
no-label()
43-
, INTEGER(Kind(IntVal("4")))
43+
, INTEGER(IntVal("4"))
4444
, []
45-
, [Var("m", INTEGER(Kind(IntVal("4"))), no-init())]
45+
, [Var("m", INTEGER(IntVal("4")), no-init())]
4646
){Comment("
4747

4848
! intrinsic-type-spec with char-selector
@@ -105,35 +105,35 @@ Program(
105105
)
106106
, TypeDeclarationStmt(
107107
no-label()
108-
, INTEGER(Kind(VarRef("SHORT")))
108+
, INTEGER(VarRef("SHORT"))
109109
, []
110-
, [Var("K", INTEGER(Kind(VarRef("SHORT"))), no-init())]
110+
, [Var("K", INTEGER(VarRef("SHORT")), no-init())]
111111
){Comment("! Range at least -9999 to 9999.
112112
")}
113113
, TypeDeclarationStmt(
114114
no-label()
115-
, REAL(Kind(PartRef("KIND", [RealVal("0.0D0")], no-image-selector())))
115+
, REAL(PartRef("KIND", [RealVal("0.0D0")], no-image-selector()))
116116
, []
117117
, [ Var(
118118
"A"
119-
, REAL(Kind(PartRef("KIND", [RealVal("0.0D0")], no-image-selector())))
119+
, REAL(PartRef("KIND", [RealVal("0.0D0")], no-image-selector()))
120120
, no-init()
121121
)
122122
]
123123
)
124124
, TypeDeclarationStmt(
125125
no-label()
126-
, REAL(Kind(IntVal("2")))
126+
, REAL(IntVal("2"))
127127
, []
128-
, [Var("B", REAL(Kind(IntVal("2"))), no-init())]
128+
, [Var("B", REAL(IntVal("2")), no-init())]
129129
)
130130
, TypeDeclarationStmt(
131131
no-label()
132-
, COMPLEX(Kind(PartRef("KIND", [RealVal("0.0D0")], no-image-selector())))
132+
, COMPLEX(PartRef("KIND", [RealVal("0.0D0")], no-image-selector()))
133133
, []
134134
, [ Var(
135135
"C"
136-
, COMPLEX(Kind(PartRef("KIND", [RealVal("0.0D0")], no-image-selector())))
136+
, COMPLEX(PartRef("KIND", [RealVal("0.0D0")], no-image-selector()))
137137
, no-init()
138138
)
139139
]

tests/rule-tests/ast-aterms/R561.f90.fast.trm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ Program(
55
[]
66
, [ ImplicitStmt(
77
"10"
8-
, [ImplicitSpec(
9-
INTEGER(Kind(IntVal("4")))
10-
, [LetterSpec("i", no-letter())]
11-
)]
8+
, [ImplicitSpec(INTEGER(IntVal("4")), [LetterSpec("i", no-letter())])]
129
, eos("\n")
1310
)
1411
, ImplicitStmt(

0 commit comments

Comments
 (0)