Skip to content

Commit

Permalink
Fix handling of non-dimensional attributes in Fortran frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
mcopik committed Aug 14, 2023
1 parent 37fa580 commit b9e9f61
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dace/frontend/fortran/ast_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,9 +610,13 @@ def type_declaration_stmt(self, node: FASTNode):

if isinstance(i, Fortran2008.Attr_Spec_List):

dimension_spec = get_children(i, "Dimension_Attr_Spec")
if len(dimension_spec) == 0:
continue

attr_size = []
attr_offset = []
sizes = get_child(get_child(i, ["Dimension_Attr_Spec"]), ["Explicit_Shape_Spec_List"])
sizes = get_child(dimension_spec[0], ["Explicit_Shape_Spec_List"])

for shape_spec in get_children(sizes, [f03.Explicit_Shape_Spec]):
self.parse_shape_specification(shape_spec, attr_size, attr_offset)
Expand Down

0 comments on commit b9e9f61

Please sign in to comment.