Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C: Fixes from LFortran #2289

Merged
merged 3 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
TEST: Update reference tests
  • Loading branch information
Shaikh-Ubaid committed Aug 22, 2023
commit 1954d735dcb1b72d404d3be7bf887a910823c663
4 changes: 2 additions & 2 deletions tests/reference/asr-generics_02-e2ea5c9.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"basename": "asr-generics_02-e2ea5c9",
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
"infile": "tests/../integration_tests/generics_02.py",
"infile_hash": "f34adf5280ade332f6f72c81cdc0d18b463176f23df500f7a08370e0",
"infile_hash": "8406b1b9329997678ed067f896373fbbf49daeb2e379c700c5c2e917",
"outfile": null,
"outfile_hash": null,
"stdout": "asr-generics_02-e2ea5c9.stdout",
"stdout_hash": "06fea11e3d245974eb6e026ef7754acae43816a4cbd10c7c27ce37c8",
"stdout_hash": "f5a159e575ecf0fdad20418b4106f3da761a8abaf39ed65de2a7b83e",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
133 changes: 112 additions & 21 deletions tests/reference/asr-generics_02-e2ea5c9.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
__asr_generic_swap_0:
(Function
(SymbolTable
4
5
{
temp:
(Variable
4
5
temp
[]
Local
Expand All @@ -48,7 +48,7 @@
),
x:
(Variable
4
5
x
[]
InOut
Expand All @@ -64,7 +64,7 @@
),
y:
(Variable
4
5
y
[]
InOut
Expand Down Expand Up @@ -96,32 +96,32 @@
.false.
)
[]
[(Var 4 x)
(Var 4 y)]
[(Var 5 x)
(Var 5 y)]
[(=
(Var 4 temp)
(Var 4 x)
(Var 5 temp)
(Var 5 x)
()
)
(=
(Var 4 x)
(Var 4 y)
(Var 5 x)
(Var 5 y)
()
)
(=
(Var 4 y)
(Var 4 temp)
(Var 5 y)
(Var 5 temp)
()
)
(Print
()
[(Var 4 x)]
[(Var 5 x)]
()
()
)
(Print
()
[(Var 4 y)]
[(Var 5 y)]
()
()
)]
Expand All @@ -134,7 +134,7 @@
__main__global_stmts:
(Function
(SymbolTable
5
6
{

})
Expand All @@ -153,13 +153,104 @@
[]
.false.
)
[__asr_generic_swap_0]
[main0]
[]
[(SubroutineCall
2 main0
()
[]
()
)]
()
Public
.false.
.false.
()
),
main0:
(Function
(SymbolTable
4
{
a:
(Variable
4
a
[]
Local
()
()
Default
(Integer 4)
()
Source
Public
Required
.false.
),
b:
(Variable
4
b
[]
Local
()
()
Default
(Integer 4)
()
Source
Public
Required
.false.
)
})
main0
(FunctionType
[]
()
Source
Implementation
()
.false.
.false.
.false.
.false.
.false.
[]
.false.
)
[__asr_generic_swap_0]
[]
[(=
(Var 4 a)
(IntegerConstant 5 (Integer 4))
()
)
(=
(Var 4 b)
(IntegerConstant 10 (Integer 4))
()
)
(Print
()
[(Var 4 a)
(Var 4 b)]
()
()
)
(SubroutineCall
2 __asr_generic_swap_0
()
[((IntegerConstant 1 (Integer 4)))
((IntegerConstant 2 (Integer 4)))]
[((Var 4 a))
((Var 4 b))]
()
)
(Print
()
[(Var 4 a)
(Var 4 b)]
()
()
)]
()
Expand Down Expand Up @@ -293,11 +384,11 @@
main_program:
(Program
(SymbolTable
6
7
{
__main__global_stmts:
(ExternalSymbol
6
7
__main__global_stmts
2 __main__global_stmts
__main__
Expand All @@ -309,7 +400,7 @@
main_program
[__main__]
[(SubroutineCall
6 __main__global_stmts
7 __main__global_stmts
2 __main__global_stmts
[]
()
Expand Down