Hi Thomas,

On 11/11/19 10:55 PM, Thomas König wrote:
the attached patch loads scalar INTENT(IN) variables to a local
variable at the start of a procedure, as suggested in PR 67202, in
order to aid optimization.  This is controlled by front-end
optimization so it is easier to catch if any bugs should turn up :-)

+      if (f->sym == NULL || f->sym->attr.dimension || f->sym->attr.allocatable
+         || f->sym->attr.optional || f->sym->attr.pointer
+         || f->sym->attr.codimension || f->sym->attr.value
+         || f->sym->attr.proc_pointer || f->sym->attr.target
+         || f->sym->attr.asynchronous
+         || f->sym->ts.type == BT_CHARACTER || f->sym->ts.type == BT_DERIVED
+         || f->sym->ts.type == BT_CLASS)
+       continue;
I think you need to add at least VOLATILE to this list – otherwise, I have not thought much about corner cases nor have studied the patch, sorry.

Cheers,

Tobias

Reply via email to