[flang] Change handling of BIND attributes
authorTim Keith <tkeith@nvidia.com>
Fri, 15 Feb 2019 18:16:25 +0000 (10:16 -0800)
committerTim Keith <tkeith@nvidia.com>
Thu, 21 Feb 2019 16:47:12 +0000 (08:47 -0800)
commit8a03a67cb044f357db30576d9d0d80bc679c052c
treeae5dfe696d69f48c41e3937d4657c41edf086796
parent46fc7df132485729117b1694c58e0df418d66f3b
[flang] Change handling of BIND attributes

Previously `BIND(C, NAME="...")` caused `bindName` to be set but not
the `BIND` attribute. This made writing the `.mod` file easier, but it
makes it hard to ask: does this symbol have a C binding.

This change causes the `BIND` attribute to be set whenever there is
`BIND(C)` in the source, regardless of whether there is a name or not.
`bindName` is only set when the `BIND` attribute is also set.

Original-commit: flang-compiler/f18@5a6706ffcbb96c4439a6af5a1f739ad4e7b8c00a
Reviewed-on: https://github.com/flang-compiler/f18/pull/298
Tree-same-pre-rewrite: false
flang/lib/semantics/mod-file.cc
flang/lib/semantics/resolve-names.cc
flang/test/semantics/modfile16.f90