[flang] Fix bug for forward referenced type
A type name in an IMPLICIT declaration that was later used in a PARAMETER statement caused problems because the default symbol scope had not yet been initialized. I avoided dereferencing in the situation where the default scope was uninitialized and added a test that triggers the problem. Also, once I corrected the bad dereference, the compiler was putting out misleading error messages. The underlying error us due to violating section 7.5.10, paragraph 4, which states: A structure constructor shall not appear before the referenced type is defined. I fixed this by testing to see if a type that is used in a structure constructor is forward referenced. Differential Revision: https://reviews.llvm.org/D87535
Loading
Please sign in to comment