> The problem here seems to be that Ada constructs an variable that is > DECL_EXTERNAL, passes const_value_known_p and has DECL_INITIAL, yet its > TREE_STATIC is not set. C++ always output those variables with TREE_STATIC > set and to be honest, I am unsure what is intended semantics of this flag > in this case.
Ada used to do that (set both DECL_EXTERNAL and TREE_STATIC) but was fixed. > Is folding through these variables desirable in Ada? If not, i would > suggest clear DECL_INITIAL (it is useless), if it is, we can either relatex > the varpool_finalize_decl check or arrange TREE_STATIC to not be set. Yes, this is desirable. -- Eric Botcazou