Skip to content
Snippets Groups Projects
Commit 5327c828 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Fortran: support both length and kind

parent 5fd4f06f
No related branches found
No related tags found
No related merge requests found
......@@ -312,7 +312,16 @@ class F2LoopyTranslator(FTreeWalkerBase):
def dtype_from_stmt(self, stmt):
length, kind = stmt.selector
assert not kind
if kind and not length:
length = kind
elif length and not kind:
pass
elif not length and not kind:
pass
else:
raise RuntimeError("both length and kind specified")
return np.dtype(self.TYPE_MAP[(type(stmt).__name__.lower(), length)])
def map_type_decl(self, node):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment