[flang] Fix bug handling function prefix type
authorTim Keith <tkeith@nvidia.com>
Thu, 28 Feb 2019 17:53:49 +0000 (09:53 -0800)
committerGitHub <noreply@github.com>
Thu, 28 Feb 2019 18:38:17 +0000 (10:38 -0800)
commitfe588aff566fde9a8fbc7a9a89ab4205999a8c53
tree9323f1755b066a5830c98ca3ac1d4a408f793d60
parentebcfd01ae37e240380911fd184946cabfa520464
[flang] Fix bug handling function prefix type

This showed up in procinterface01. A function can have more than one
PrefixSpec (e.g. `real elemental f()`). We need to ignore that ones
that aren't types.

Also, process the type after the ImplicitPart rather than after the
SpecificationPart. The type of the function result variable could
be accessed between those places.

Original-commit: flang-compiler/f18@df85eedb925b6f8739d6f6ccd9820ff5d9e4f4c5
Reviewed-on: https://github.com/flang-compiler/f18/pull/305
flang/lib/semantics/resolve-names.cc