Skip to content

Commit

Permalink
Bugfix for unpromoted ddt-type scalar variables (#626)
Browse files Browse the repository at this point in the history
Fixes a bug where a ddt used in only one phase (thereby not promoted to
the group level) does not get the necessary "use" statement added at the
subroutine level in the suite cap.
  • Loading branch information
peverwhee authored Jan 27, 2025
1 parent fca3a9e commit 3d4e455
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/suite_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -2485,7 +2485,9 @@ def write(self, outfile, host_arglist, indent, const_mod,
call_vars = self.call_list.variable_list()
self._ddt_library.write_ddt_use_statements(call_vars, outfile,
indent+1, pad=modmax)
decl_vars = [x[0] for x in subpart_allocate_vars.values()]
decl_vars = ([x[0] for x in subpart_allocate_vars.values()] +
[x[0] for x in subpart_scalar_vars.values()] +
[x[0] for x in subpart_optional_vars.values()])
self._ddt_library.write_ddt_use_statements(decl_vars, outfile,
indent+1, pad=modmax)
outfile.write('', 0)
Expand Down

0 comments on commit 3d4e455

Please sign in to comment.