Skip to content

Commit

Permalink
removed irrelevant changes
Browse files Browse the repository at this point in the history
  • Loading branch information
czgdp1807 authored and certik committed Mar 5, 2021
1 parent 9f7ee3f commit 5913fa5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
7 changes: 4 additions & 3 deletions integration_tests/real_dp.f90
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
program real_dp

real(4) :: zero
real(8) :: v
real(8) :: v, u
real :: x
zero = 0.0
v = 1.05
u = 1.05
v = 1.05_8
x = 1.05
print *, zero, v, x
print *, zero, v, x, u

end program
14 changes: 0 additions & 14 deletions src/lfortran/semantics/ast_to_asr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,20 +616,6 @@ class SymbolTableVisitor : public AST::BaseVisitor<SymbolTableVisitor>
asr = ASR::make_ConstantInteger_t(al, x.base.base.loc, x.m_n, type);
}

ASR::asr_t* resolve_variable(const Location &loc, const char* id) {
SymbolTable *scope = current_scope;
std::string var_name = id;
ASR::symbol_t *v = scope->resolve_symbol(var_name);
if (!v) {
throw SemanticError("Variable '" + var_name + "' not declared", loc);
}
return ASR::make_Var_t(al, loc, v);
}

void visit_Name(const AST::Name_t &x) {
asr = resolve_variable(x.base.base.loc, x.m_id);
}

};

class BodyVisitor : public AST::BaseVisitor<BodyVisitor>
Expand Down

0 comments on commit 5913fa5

Please sign in to comment.