[flang] Fix bugs detecting impure calls
authorTim Keith <tkeith@nvidia.com>
Sat, 25 Jan 2020 16:15:17 +0000 (08:15 -0800)
committerTim Keith <tkeith@nvidia.com>
Sat, 25 Jan 2020 16:15:17 +0000 (08:15 -0800)
commitea5b1efd8fcbf9fa3b0f5cd872ae89d227275eac
treedefaea16869d642f94730a652d53b7b7ee07c96f
parent60e47323158515d1b6c7ef6c2d657f4dd1a0364e
[flang] Fix bugs detecting impure calls

Change Traverse to visit the actual arguments of structure constructors.

Change FindImpureCallHelper to visit the actual arguments of a call to a
pure procedure in case one of them makes a call to an impure function.

Original-commit: flang-compiler/f18@81a5488ee62b4324d002c348464712c930095a32
Reviewed-on: https://github.com/flang-compiler/f18/pull/951
flang/lib/evaluate/tools.cc
flang/lib/evaluate/traverse.h
flang/test/semantics/call11.f90