aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Semantics/pointer-assignment.cpp
AgeCommit message (Collapse)AuthorFilesLines
2025-08-26[flang] Consolidate copy-in/copy-out determination in evaluate framework ↵Eugene Epshteyn1-1/+1
(#151408) New implementation of `MayNeedCopy()` is used to consolidate copy-in/copy-out checks. `IsAssumedShape()` and `IsAssumedRank()` were simplified and are both now in `Fortran::semantics` workspace. `preparePresentUserCallActualArgument()` in lowering was modified to use `MayNeedCopyInOut()` Fixes https://github.com/llvm/llvm-project/issues/138471
2025-07-30[flang][near NFC] Fix English in an error message (#151029)Peter Klausler1-8/+8
Correct "is a not a pointer" to "is not a pointer" in an error message. While here, also unsplit nearby error messages so that their contents are more searchable. Fixes https://github.com/llvm/llvm-project/issues/150864.
2025-05-12[flang] Require contiguous actual pointer for contiguous dummy pointer (#139298)Peter Klausler1-1/+14
When the actual argument associated with an explicitly CONTIGUOUS pointer dummy argument is itself a pointer, it must also be contiguous. (A non-pointer actual argument can associate with a CONTIGUOUS pointer dummy argument if it's INTENT(IN), and in that case it's still just a warning if we can't prove at compilation time that the actual is contiguous.) Fixes https://github.com/llvm/llvm-project/issues/138899.
2025-05-09[flang][volatile] Get volatility of designators from base instead of ↵Andre Kuhlenschmidt1-1/+6
component symbol (#138611) The standard says in [8.5.20 VOLATILE attribute]: If an object has the VOLATILE attribute, then all of its sub-objects also have the VOLATILE attribute. This code takes this into account and uses the volatility of the base of the designator instead of that of the component. In fact, fields in a structure are not allowed to have the volatile attribute. So given the code, `A%B => t`, symbol `B` could never directly have the volatile attribute, and the volatility of `A` indicates the volatility of `B`. This PR should address [the comments](https://github.com/llvm/llvm-project/pull/132486#issuecomment-2851313119) on this PR #132486
2025-05-01[flang][frontend] warn when a volatile target is pointer associated with an ↵Andre Kuhlenschmidt1-0/+14
non-volatile pointer (#136778) closes #135805
2025-03-19[flang] Catch C15104(4) violations when coindexing is present (#130677)Peter Klausler1-1/+1
The value of a structure constructor component can't have a pointer ultimate component if it is a coindexed designator.
2025-03-10[flang] Enforce C1027 (F'2023) (#129617)Peter Klausler1-1/+4
The LHS of a pointer assignment statement may not be coindexed.
2025-03-03[flang] Further work on NULL(MOLD=allocatable) (#129345)Peter Klausler1-1/+1
Refine handling of NULL(...) in semantics to properly distinguish NULL(), NULL(objectPointer), NULL(procPointer), and NULL(allocatable) from each other in relevant contexts. Add IsNullAllocatable() and IsNullPointerOrAllocatable() utility functions. IsNullAllocatable() is true only for NULL(allocatable); it is false for a bare NULL(), which can be detected independently with IsBareNullPointer(). IsNullPointer() now returns false for NULL(allocatable). ALLOCATED(NULL(allocatable)) now works, and folds to .FALSE. These utilities were modified to accept const pointer arguments rather than const references; I usually prefer this style when the result should clearly be false for a null argument (in the C sense), and it helped me find all of their use sites in the code.
2025-01-08[flang] Better handling of weird pointer assignment case (#120628)Peter Klausler1-20/+35
F'2023 C1017 permits the assignment of an unlimited polymorphic data target to a monomorphic LHS pointer when the LHS pointer has a sequence derived type (BIND(C) or SEQUENCE attribute). We allowed for this in pointer assignments that don't have a function reference as their RHS. Extend this support to function references, and also ensure that rank compatibility is still checked.
2024-10-02[flang] Tag warnings with LanguageFeature or UsageWarning (#110304)Peter Klausler1-23/+40
(This is a big patch, but it's nearly an NFC. No test results have changed and all Fortran tests in the LLVM test suites work as expected.) Allow a parser::Message for a warning to be marked with the common::LanguageFeature or common::UsageWarning that controls it. This will allow a later patch to add hooks whereby a driver will be able to decorate warning messages with the names of its options that enable each particular warning, and to add hooks whereby a driver can map those enumerators by name to command-line options that enable/disable the language feature and enable/disable the messages. The default settings in the constructor for LanguageFeatureControl were moved from its header file into its C++ source file. Hooks for a driver to use to map the name of a feature or warning to its enumerator were also added. To simplify the tagging of warnings with their corresponding language feature or usage warning, to ensure that they are properly controlled by ShouldWarn(), and to ensure that warnings never issue at code sites in module files, two new Warn() member function templates were added to SemanticsContext and other contextual frameworks. Warn() can't be used before source locations can be mapped to scopes, but the bulk of existing code blocks testing ShouldWarn() and FindModuleFile() before calling Say() were convertible into calls to Warn(). The ones that were not convertible were extended with explicit calls to Message::set_languageFeature() and set_usageWarning().
2024-09-17[flang] Tidy uses of raw_string_ostream (NFC)Youngsuk Kim1-1/+1
As specified in the docs, 1) raw_string_ostream is always unbuffered and 2) the underlying buffer may be used directly ( 65b13610a5226b84889b923bae884ba395ad084d for further reference ) Avoid unneeded calls to raw_string_ostream::str(), to avoid excess indirection.
2024-07-30[flang] Warn about undefined function results (#99533)Peter Klausler1-1/+3
When the result of a function never appears in a variable definition context, emit a warning. If the function has multiple result variables due to alternate ENTRY statements, any definition will suffice. The implementation of this check is tied to the general variable definability checking utility in semantics. Every variable definition context uses it to ensure that no undefinable variable is being defined. A set of defined variables is maintained in the SemanticsContext and, when the warning is enabled and no fatal error has been reported, the scope tree is traversed and all the function subprograms' results are tested for membership in that set.
2024-07-11[flang] Downgrade error message to a portability warning (#98368)Peter Klausler1-2/+3
f18 current emits an error when an assignment is made to an array section with a vector subscript, and the array is finalized with a non-elemental final subroutine. Some other compilers emit this error because (I think) they want variables to only be finalized in place, not by a subroutine call involving copy-in & copy-out of the finalized elements. Since many other Fortran compilers can handle this case, and there's nothing in the standards to preclude it, let's downgrade this error message to a portability warning. This patch got complicated because the API for the WhyNotDefinable() utility routine was such that it would return a message only in error cases, and there was no provision for returning non-fatal messages. It now returns either nothing, a fatal message, or a non-fatal warning message, and all of its call sites have been modified to cope.
2024-06-24[flang] Add/fix some semantic checks for assumed-rank (#96194)Peter Klausler1-0/+3
Catch some cases where assumed rank dummy arguments are not allowed.
2024-06-24[flang] harden TypeAndShape for assumed-ranks (#96234)jeanPerier1-2/+2
SIZEOF and C_SIZEOF were broken for assumed-ranks because `TypeAndShape::MeasureSizeInBytes` behaved as a scalar because the `TypeAndShape::shape_` member was the same for scalar and assumed-ranks. The easy fix would have been to add special handling in `MeasureSizeInBytes` for assumed-ranks using the TypeAndShape attributes, but I think this solution would leave `TypeAndShape::shape_` manipulation fragile to future developers. Hence, I went for the solution that turn shape_ into a `std::optional<Shape>`.
2024-05-01[flang] Ensure all warning/portability messages are guarded by Should… ↵Peter Klausler1-2/+5
(#90518) …Warn() Many warning messages were being emitted unconditionally. Ensure that all warnings are conditional on a true result from a call to common::LanguageFeatureControl::ShouldWarn() so that it is easy for a driver to disable them all, or, in the future, to provide per-warning control over them.
2024-04-22[flang] Make proc characterization error conditional for generics (#89429)Peter Klausler1-2/+4
When the characteristics of a procedure depend on a procedure that hasn't yet been defined, the compiler currently emits an unconditional error message. This includes the case of a procedure whose characteristics depend, perhaps indirectly, on itself. However, in the case where the characteristics of a procedure are needed to resolve a generic, we should not emit an error for a hitherto undefined procedure -- either the call will resolve to another specific procedure, in which case the error is spurious, or it won't, and then an error will issue anyway. Fixes https://github.com/llvm/llvm-project/issues/88677.
2024-04-01[Flang] Relaxing an error when contiguous pointer is assigned to a ↵harishch41-1/+1
non-contig… (#86781) …uous function. Fix from [thtsikas](https://github.com/thtsikas) based on a discussion in [slack](https://flang-compiler.slack.com/archives/C5C58TT32/p1711124374836079). Example: ``` Program test Integer, Pointer, Contiguous :: cont(:) Interface Function f() Integer, Pointer :: f(:) End Function End Interface cont => f() Print *, cont(3) End Program Function f() Integer, Pointer :: f(:) Allocate (f(4),Source=[1,1,42,1]) ! f => f(4:1:-1) !! not contiguous, runtime error End Function f ``` Understanding is that the standard intended to allow this pattern. The restriction 10.2.2.3 p6 Data pointer assignment "If the pointer object has the CONTIGUOUS attribute, the pointer target shall be contiguous." is not associated with a numbered constraint. If there is a mechanism for injecting runtime checks, this would be a place to do it. Absent that, a warning is the best we can do. No other compiler treats contigPtr => func() as an error when func() is not CONTIGUOUS, so a warning would probably be better for consistency. https://godbolt.org/z/5cM6roeEE
2024-03-01[flang] Whether a procedure's interface is explicit or not is not a d… ↵Peter Klausler1-1/+2
(#82796) …istinguishing characteristic We note whether a procedure's interface is explicit or implicit as an attribute of its characteristics, so that other semantics can be checked appropriately, but this internal attribute should not be used as a distinguishing characteristic in itself. Fixes https://github.com/llvm/llvm-project/issues/81876.
2023-11-30[flang] Improve procedure interface compatibility checking for dummy … ↵Peter Klausler1-1/+7
(#72704) …arrays When comparing dummy array extents, cope with references to symbols better (including references to other dummy arguments), and emit warnings in dubious cases that are not equivalent but not provably incompatible.
2023-11-13[flang] Ensure that portability warnings are conditional (#71857)Peter Klausler1-1/+1
Before emitting a warning message, code should check that the usage in question should be diagnosed by calling ShouldWarn(). A fair number of sites in the code do not, and can emit portability warnings unconditionally, which can confuse a user that hasn't asked for them (-pedantic) and isn't terribly concerned about portability *to* other compilers. Add calls to ShouldWarn() or IsEnabled() around messages that need them, and add -pedantic to tests that now require it to test their portability messages, and add more expected message lines to those tests when -pedantic causes other diagnostics to fire.
2023-09-18[flang] Fix characterization of result of function returning procedur… ↵Peter Klausler1-10/+3
(#66248) …e pointer The procedure characterization package correctly characterizes the result of a reference to a function that returns a procedure pointer. In the event of a result that is a pointer to a function that itself is a procedure pointer, the code in pointer assignment semantics checking was mistakenly using that result's procedure characteristics as the characteristics of the original function reference. This is just wrong; delete it.
2023-09-13[flang] Don't check dummy vs. actual result rank for assumed-rank poi… ↵Peter Klausler1-5/+19
(#66237) …nters When associating a function result pointer as an actual argument with a dummy pointer that is assumed-rank, don't emit a bogus error.
2023-08-29[flang] Check procedure pointer initializations; clean up ELEMENTALPeter Klausler1-3/+8
Implements compatibility checking for initializers in procedure pointer declarations. This work exposed some inconsistency in how ELEMENTAL interfaces were handled and checked, from both unrestricted intrinsic functions and others, and some refinements needed for function result compatbility checking; these have also been ironed out. Some new warnings are now emitted, and this affected a dozen or so tests. Differential Revision: https://reviews.llvm.org/D159026
2023-05-16[flang] Finer control over warningsPeter Klausler1-38/+42
Establish a set of optional usage warnings, and enable some only in "-pedantic" mode that, in our subjective experience with application codes, seem to issue frequently without indicating usage that really needs to be corrected. By default, with this patch the compiler should appear to be somewhat less persnickety but not less informative. Differential Revision: https://reviews.llvm.org/D150710
2023-03-28[flang] Fix checking of pointer passed to assumed-rankPeter Klausler1-1/+2
Don't check ranks when a pointer actual argument is associated with a pointer assumed-rank dummy argument. Differential Revision: https://reviews.llvm.org/D147052
2023-03-27[flang] Consolidate and enhance pointer assignment checksPeter Klausler1-7/+66
Consolidate aspects of pointer assignment & structure constructor pointer component checking from Semantics/assignment.cpp and /expression.cpp into /pointer-assignment.cpp, and add a warning about data targets that are not definable objects but not hard errors. Specifically, a structure component pointer component data target is not allowed to be a USE-associated object in a pure context by a numbered constraint, but the right-hand side data target of a pointer assignment statement has no such constraint, and that's the new warning. Differential Revision: https://reviews.llvm.org/D146581
2023-02-01[flang] Catch character length errors in pointer associationsPeter Klausler1-1/+1
When character lengths are known at compilation time, report an error when a data target with a known length does not match the explicit length of a pointer that is being associated with it; see 10.2.2.3 paragraph 5. Differential Revision: https://reviews.llvm.org/D142755
2022-12-03[flang] Document and warn about an extensionPeter Klausler1-0/+4
Standard Fortran allows type-bound procedure bindings to only be called, and disallows them from being used in other contexts where a procedure name can be: as the target of a procedure pointer assignment statement, and as an actual argument that corresponds to a dummy procedure. So long as the interfaces match, there's no good reason for these uses to be errors, and there some obvious use cases in polymorphic programming. So emit portability warnings rather than errors, and document this usage as an extension. Differential Revision: https://reviews.llvm.org/D139127
2022-10-31[flang] Rework line of code to dodge clang 16 warningPeter Klausler1-1/+3
Recode a non-short-circuiting conjunction of two Boolean function calls into separate statements to avoid a warning from clang 16.
2022-10-31[flang] Fix pointer definition semantic checking via refactoringPeter Klausler1-28/+38
The infrastructure in semantics that is used to check that the left-hand sides of normal assignment statements are really definable variables was not being used to check whether the LHSs of pointer assignments are modifiable, and so most cases of unmodifiable pointers are left undiagnosed. Rework the semantics checking for pointer assignments, NULLIFY statements, pointer dummy arguments, &c. so that cases of unmodifiable pointers are properly caught. This has been done by extracting all the various definability checking code that has been implemented for different contexts in Fortran into one new facility. The new consolidated definability checking code returns messages meant to be attached as "because: " explanations to context-dependent errors like "left-hand side of assignment is not definable". These new error message texts and their attached explanations affect many existing tests, which have been updated. The testing infrastructure was extended by another patch to properly compare warnings and explanatory messages, which had been ignored until recently. Differential Revision: https://reviews.llvm.org/D136979
2022-10-30[flang] Catch attempts to do anything with statement functions other than ↵Peter Klausler1-0/+11
call them A statement function in Fortran may be called, but it may not be the target of a procedure pointer or passed as an actual argument.
2022-08-08[flang] Don't compute pointer component procedure characteristics when not ↵Peter Klausler1-5/+15
needed When a procedure pointer component has an interface that is a forward reference to a procedure, syntax errors can be emitted if there is a structure constructor that tries to initialize that component, since its characteristics are not yet known; however, when the initializer is a bare NULL(with no mold), those characteristics don't matter. Make the characterization of the procedure pointer component take place only when needed. Differential Revision: https://reviews.llvm.org/D131100
2022-07-25[flang] Allow restricted specific intrinsic functions as ↵Peter Klausler1-12/+13
implicitly-interfaced procedure pointer targets The predicate "CanBeCalledViaImplicitInterface()" was returning false for restricted specific intrinsic functions (e.g., SIN) because their procedure characteristics have the elemental attribute; this leads to a bogus semantic error when one attempts to use them as proc-targets in procedure pointer assignment statements when the left-hand side of the assignment is a procedure pointer with an implicit interface. However, these restricted specific intrinsic functions have always been allowed as special cases for such usage -- it is as if they are elemental when it is necessary for them to be so, but not when it's a problem. Differential Revision: https://reviews.llvm.org/D130386
2022-07-13[flang] Refine semantic checks for procedure pointer assignmentPeter Klausler1-3/+4
Some procedure pointers and EXTERNAL procedures have neither explicit interfaces nor result types; these procedures are obviously not known to be functions, but they could be, so semantics must not assume that they are necessarily subroutines. Refine the procedure pointer / dummy procedure compatibility check to handle these more ambiguous cases and not elicit inappropriate error messages. Differential Revision: https://reviews.llvm.org/D129674
2022-04-16[flang] Add & use a better visit() (take 2)Peter Klausler1-3/+3
Adds flang/include/flang/Common/log2-visit.h, which defines a Fortran::common::visit() template function that is a drop-in replacement for std::visit(). Modifies most use sites in the front-end and runtime to use common::visit(). The C++ standard mandates that std::visit() have O(1) execution time, which forces implementations to build dispatch tables. This new common::visit() is O(log2 N) in the number of alternatives in a variant<>, but that N tends to be small and so this change produces a fairly significant improvement in compiler build memory requirements, a 5-10% improvement in compiler build time, and a small improvement in compiler execution time. Building with -DFLANG_USE_STD_VISIT causes common::visit() to be an alias for std::visit(). Calls to common::visit() with multiple variant arguments are referred to std::visit(), pending further work. This change is enabled only for GCC builds with GCC >= 9; an earlier attempt (D122441) ran into bugs in some versions of clang and was reverted rather than simply disabled; and it is not well tested with MSVC. In non-GCC and older GCC builds, common::visit() is simply an alias for std::visit().
2022-03-28Revert "[flang] Add & use a better visit()"Andrzej Warzynski1-3/+3
This reverts commit 2ab9990c9eb79682a4d4b183dfbc7612d3e55328. It has caused multiple build failures: * https://lab.llvm.org/buildbot/#/builders/177/builds/4346 * https://lab.llvm.org/buildbot/#/builders/180/builds/3803 * https://lab.llvm.org/buildbot/#/builders/175/builds/10419 * https://lab.llvm.org/buildbot/#/builders/191/builds/4318 * https://lab.llvm.org/buildbot/#/builders/173/builds/4274 * https://lab.llvm.org/buildbot/#/builders/181/builds/4297 All these bots failed with a time-out: ``` command timed out: 1200 seconds without output running [b'ninja', b'-j', b'32'], attempting to kill ``` I'm guessing that that's due to template instantiations failing at some point (https://reviews.llvm.org/D122441 introduced a custom implementation of std::visit). Everything seems fine when either: * building on X86 with GCC or Clang (tested with GCC 9.3 and Clang 12) * building on AArch64 with GCC (tested with GCC 11)
2022-03-25[flang] Add & use a better visit()Peter Klausler1-3/+3
Adds flang/include/flang/Common/visit.h, which defines a Fortran::common::visit() template function that is a drop-in replacement for std::visit(). Modifies most use sites in the front-end and runtime to use common::visit(). The C++ standard mandates that std::visit() have O(1) execution time, which forces implementations to build dispatch tables. This new common::visit() is O(log2 N) in the number of alternatives in a variant<>, but that N tends to be small and so this change produces a fairly significant improvement in compiler build memory requirements, a 5-10% improvement in compiler build time, and a small improvement in compiler execution time. Building with -DFLANG_USE_STD_VISIT causes common::visit() to be an alias for std::visit(). Calls to common::visit() with multiple variant arguments are referred to std::visit(), pending further work. Differential Revision: https://reviews.llvm.org/D122441
2022-02-15[flang] Accept pointer assignment w/ remapping to function resultPeter Klausler1-1/+2
When a pointer assignment with bounds remapping has a function reference as its right-hand side, don't check for array conformance. Differential Revision: https://reviews.llvm.org/D119845
2021-11-04[Flang][OpenMP] Use the ultimate symbol in a call to the IsPointer functionKiran Chandramohan1-1/+1
The IsPointer check currently fails for host-associated symbols in OpenMP regions. This causes some failures in semantic checks for pointer association in an OpenMP region. Fix is to use the ultimate symbol in the call to the IsPointer function in CheckPointerAssignment function in lib/Semantics/pointer-assignment.cpp. Reviewed By: klausler, peixin Differential Revision: https://reviews.llvm.org/D112876
2021-09-17[flang] More checking of NULL pointer actual argumentspeter klausler1-2/+1
Catch additional missing error cases for typed and untyped NULL actual arguments to non-intrinsic procedures in cases of explicit and implicit interfaces. Differential Revision: https://reviews.llvm.org/D110003
2021-06-16[flang] Complain about more cases of calls to insufficiently defined procedurespeter klausler1-2/+4
When a function is called in a specification expression, it must be sufficiently defined, and cannot be a recursive call (10.1.11(5)). The best fix for this is to change the contract for the procedure characterization infrastructure to catch and report such errors, and to guarantee that it does emit errors on failed characterizations. Some call sites were adjusted to avoid cascades. Differential Revision: https://reviews.llvm.org/D104330
2021-06-04[flang] CheckConformance: tristate-ify resultpeter klausler1-1/+1
To ensure that errors are emitted by CheckConformance and its callers in all situations, it's necessary for the returned result of that function to distinguish between three possible outcomes: the arrays are known to conform at compilation time, the arrays are known to not conform (and a message has been produced), and an indeterminate result in which is not possible to determine conformance. So convert CheckConformance's result into an optional<bool>, and convert its confusing Boolean flag arguments into a bit-set of named flags too. Differential Revision: https://reviews.llvm.org/D103654
2020-12-15[flang] Fix false error message for "ptr => func()" array conformancepeter klausler1-1/+3
Pointers must have deferred shapes, so CheckConformance must be extended to allow for them. Differential Revision: https://reviews.llvm.org/D93320
2020-12-07[flang] Improve initializer semantics, esp. for component default valuespeter klausler1-9/+12
This patch plugs many holes in static initializer semantics, improves error messages for default initial values and other component properties in parameterized derived type instantiations, and cleans up several small issues noticed during development. We now do proper scalar expansion, folding, and type, rank, and shape conformance checking for component default initializers in derived types and PDT instantiations. The initial values of named constants are now guaranteed to have been folded when installed in the symbol table, and are no longer folded or scalar-expanded at each use in expression folding. Semantics documentation was extended with information about the various kinds of initializations in Fortran and when each of them are processed in the compiler. Some necessary concomitant changes have bulked this patch out a bit: * contextual messages attachments, which are now produced for parameterized derived type instantiations so that the user can figure out which instance caused a problem with a component, have been added as part of ContextualMessages, and their implementation was debugged * several APIs in evaluate::characteristics was changed so that a FoldingContext is passed as an argument rather than just its intrinsic procedure table; this affected client call sites in many files * new tools in Evaluate/check-expression.cpp to determine when an Expr actually is a single constant value and to validate a non-pointer variable initializer or object component default value * shape conformance checking has additional arguments that control whether scalar expansion is allowed * several now-unused functions and data members noticed and removed * several crashes and bogus errors exposed by testing this new code were fixed * a -fdebug-stack-trace option to enable LLVM's stack tracing on a crash, which might be useful in the future TL;DR: Initialization processing does more and takes place at the right times for all of the various kinds of things that can be initialized. Differential Review: https://reviews.llvm.org/D92783
2020-10-16[flang] Failed call to CHECK() for call to ASSOCIATED(NULL())Peter Steinfeld1-50/+2
Calling "ASSOCATED(NULL()) was causing an internal check of the compiler to fail. I fixed this by changing the entry for "ASSOCIATED" in the intrinsics table to accept "AnyPointer" which contains a new "KindCode" of "pointerType". I also changed the function "FromActual()" to return a typeless intrinsic when called on a pointer, which duplicates its behavior for BOZ literals. This required changing the analysis of procedure arguments. While testing processing for procedure arguments, I found another bad call to `CHECK()` which I fixed. I made several other changes: -- I implemented constant folding for ASSOCIATED(). -- I fixed handling of NULL() in relational operations. -- I implemented semantic analysis for ASSOCIATED(). -- I noticed that the semantics for ASSOCIATED() are similar to those for pointer assignment. So I extracted the code that pointer assignment uses for procedure pointer compatibility to a place where it could be used by the semantic analysis for ASSOCIATED(). -- I couldn't figure out how to make the general semantic analysis for procedure arguments work with ASSOCIATED()'s second argument, which can be either a pointer or a target. So I stopped using normal semantic analysis for arguments for ASSOCIATED(). -- I added tests for all of this. Differential Revision: https://reviews.llvm.org/D88313
2020-09-30[flang] Semantic analysis for FINAL subroutinespeter klausler1-1/+1
Represent FINAL subroutines in the symbol table entries of derived types. Enforce constraints. Update tests that have inadvertent violations or modified messages. Added a test. The specific procedure distinguishability checking code for generics was used to enforce distinguishability of FINAL procedures. (Also cleaned up some confusion and redundancy noticed in the type compatibility infrastructure while digging into that area.) Differential revision: https://reviews.llvm.org/D88613
2020-08-31[flang] Check shape conformance on initializerspeter klausler1-2/+2
Specifically, ensure that initializers conform with their objects according to 8.2 para 4. Differential Revision: https://reviews.llvm.org/D86886
2020-08-07[flang][NFC] Reformat files with current clang-formatpeter klausler1-1/+1
Differential Revision: https://reviews.llvm.org/D85489
2020-06-19[flang] DATA stmt processing (part 3/4): Remaining prep workpeter klausler1-38/+56
Rolls up small changes across the frontend to prepare for the large forthcoming patch (part 4/4) that completes DATA statement processing via conversion to initializers. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D82137