| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[flang][Semantics] Ensure deterministic mod file output (#129669) This PR is a follow-up to #128655. It adds another test to ensure deterministic ordering in .mod files and includes related changes to prevent non-deterministic ordering caused by iterating over a set ordered by heap pointers. This issue is particularly noticeable when using Flang as a library and compiling the same files multiple times. The reduced test case is as minimal as possible. We were unable to reproduce the issue with a smaller set of files. | 1 年前 | |
[flang][OpenACC] Relax COMMON block usage restriction in OpenACC directives (#162659) Unlike OpenMP, OpenACC doesn't require that the COMMON block be defined in the same scope as the directive. | 9 个月前 | |
[flang][OpenMP] Tolerate compiler directives in loop constructs (#169346) PR168884 flagged compiler directives (!dir$ ...) inside OpenMP loop constructs as errors. This caused some customer applications to fail to compile (issue 169229). Downgrade the error to a warning, and gracefully ignore compiler directives when lowering loop constructs to MLIR. Fixes https://github.com/llvm/llvm-project/issues/169229 | 8 个月前 | |
[flang] convert program name to upper case (NFC) (#149508) | 1 年前 | |
[flang] Enforce constraint C911 Diagnose attempts to use an non-polymorphic instance of an abstract derived type. Differential Revision: https://reviews.llvm.org/D136902 | 3 年前 | |
[flang] Enforce C1503 (#128962) Enforce an obscure constraint from the standard: an abstract interface is not allowed to have the same name as an intrinsic type keyword. I suspect this is meant to prevent a declaration like "PROCEDURE(REAL), POINTER :: P" from being ambiguous. Fixes https://github.com/llvm/llvm-project/issues/128744. | 1 年前 | |
[flang] Catch deferred type parameters in ALLOCATE(type-spec::) (#139334) The type-spec in ALLOCATE may not have any deferred type parameters. Fixes https://github.com/llvm/llvm-project/issues/138979. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Fix name of dummy argument to intrinsic NEW_LINE(A='') It should be A= but I misspelled it in the intrinsics table as X=. Differential Revision: https://reviews.llvm.org/D130382 | 3 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Tune handling of LEN type parameter discrepancies on ALLOCATE Presently, semantics doesn't check for discrepancies between known constant corresponding LEN type parameters between the declared type of an allocatable/pointer and either the type-spec or the SOURCE=/MOLD= on an ALLOCATE statement. This allows discrepancies between character lengths to go unchecked. Some compilers accept mismatched character lengths on SOURCE=/MOLD= and the allocate object, and that's useful and unambiguous feature that already works in f18 via truncation or padding. A portability warning should issue, however. But for mismatched character lengths between an allocate object and an explicit type-spec, and for any mismatch between derived type LEN type parameters, an error is appropriate. Differential Revision: https://reviews.llvm.org/D146583 | 3 年前 | |
[flang] Fix derived type compatibility checking in ALLOCATE (#102035) The derived type compatibility checking for ALLOCATE statements with SOURCE= or MOLD= was only checking for the same derived type name. That is a necessary but not sufficient check, and it can produce bogus errors as well as miss valid errors. Fixes https://github.com/llvm/llvm-project/issues/101909. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Diagnose known out-of-range subscripts in more circumstances Semantics can catch out-of-range subscript values already when they appear in DATA statement objects and constant folding of name constant array indexing; this patch fills the gap by checking known constant subscript values in other contexts. Differential Revision: https://reviews.llvm.org/D142764 | 3 年前 | |
[flang][runtime] Check SOURCE= conformability on ALLOCATE (#144113) The SOURCE= expression of an ALLOCATE statement, when present and not scalar, must conform to the shape of the allocated objects. Check this at runtime, and return a recoverable error, or crash, when appropriate. Fixes https://github.com/llvm/llvm-project/issues/143900. | 1 年前 | |
[flang] Static checking for empty coarrays (#129610) A coarray must not have a zero extent on a codimension; that would yield an empty coarray. When cobounds are constants, verify them. | 1 年前 | |
[flang] Apply definability checks in ALLOCATE/DEALLOCATE statements The pointers and allocatables that appear in ALLOCATE and DEALLOCATE statements need to be subject to the general definability checks so that problems with e.g. PROTECTED objects can be caught. (Also: regularize the capitalization of the DEALLOCATE error messages while I'm in here so that they're consistent with the messages that can come out for ALLOCATE.) Differential Revision: https://reviews.llvm.org/D140149 | 3 年前 | |
[flang][semantics] add semantic check that STAT and ERRMSG are not (de)allocated by same statement (#164529) Almost all compilers statically error on the following case even though it isn't a numbered constraint. Now we do to instead segfaulting at runtime. fortran integer,pointer:: i allocate(i,stat=i) end | 9 个月前 | |
[flang] Accept ALLOCATED(ARRAY=assumedRank) (#66233) The definitions of the ALLOCATED intrinsic in the intrinsics table did not allow for an assumed-rank array. | 2 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Fix semantics check for RETURN statement The RETURN statement is allowed in functions and subroutines, but not in main programs. It is however a common extension, which we also implement, to allow RETURN from main programs -- we only issue a portability warning when -pedantic or -std=f2018 are set. This patch fixes false positives for this portability warning, where it was triggered also when RETURN was present in functions or subroutines. Fixexs #55080 Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D124732 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang][NFC] Allow whitespaces before ERROR This change allows to write whitespaces before the ERROR keyword in semantic tests for consistency with other testing infrastructure. Also, one test is changed in order to test if the change works correctly. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D125884 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Fixed a number of typos I went over the output of the following mess of a command: (ulimit -m 2000000; ulimit -v 2000000; git ls-files -z | parallel --xargs -0 cat | aspell list --mode=none --ignore-case | grep -E '^[A-Za-z][a-z]*$' | sort | uniq -c | sort -n | grep -vE '.{25}' | aspell pipe -W3 | grep : | cut -d' ' -f2 | less) and proceeded to spend a few days looking at it to find probable typos and fixed a few hundred of them in all of the llvm project (note, the ones I found are not anywhere near all of them, but it seems like a good start). Reviewed By: awarzynski, clementval Differential Revision: https://reviews.llvm.org/D130844 | 3 年前 | |
[flang] Fix semantics check for RETURN statement The RETURN statement is allowed in functions and subroutines, but not in main programs. It is however a common extension, which we also implement, to allow RETURN from main programs -- we only issue a portability warning when -pedantic or -std=f2018 are set. This patch fixes false positives for this portability warning, where it was triggered also when RETURN was present in functions or subroutines. Fixexs #55080 Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D124732 | 4 年前 | |
[flang] Don't convert actual arguments when interface is implicit (#89795) When the interface of a procedure is implicit at the point of call, don't perform actual argument type conversion to the types of the dummy arguments. This was inadvertently taking place in a case where the procedure has an implicit interface but was also defined in the same source file, so that its characteristics were known. | 2 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Stricter "implicit continuation" in preprocessing The prescanner performs implicit line continuation when it looks like the parenthesized arguments of a call to a function-like macro may span multiple lines. In an attempt to work more like a Fortran-oblivious C preprocessor, the prescanner will act as if the following lines had been continuations so that the function-like macro could be invoked. This still seems like a good idea, but a recent bug report on LLVM's GitHub issue tracker shows one way in which it could trigger inadvertently and mess up a program. So this patch makes the conditions for implicit line continuation much more strict. First, the leading parenthesis has to have been preceded by an identifier that's known to be a macro name. (It doesn't have to be a function-like macro, since it's possible for a keyword-like macro to expand to the name of a function-like macro.) Second, no macro definition can ever have had unbalanced parentheses in its replacement text. Also cleans up some parenthesis recognition code to fix some issues found in testing, so that a token with leading or trailing spaces can still be recognized as a parenthesis or comma. Fixes https://github.com/llvm/llvm-project/issues/63844. Differential Revision: https://reviews.llvm.org/D155499 | 2 年前 | |
[flang] Don't crash on bad inherited implied DO type (#91073) Fortran has an ambiguously defined rule about the typing of index variables of implied DO loops in DATA statements and array constructors that omit an explicit type specification. Such indices have the type that they would have "if they were variables" in the innermost enclosing scope. Although this could, and perhaps should, be read to mean that implicit typing rules active in that innermost enclosing scope should be applied, every other Fortran compiler interprets that language to mean that if there is a type declaration for that name that is visible from the enclosing scope, it is applied, and it is an error if that type is not integer. Fixes https://github.com/llvm/llvm-project/issues/91053. | 2 年前 | |
[flang] Catch usage of : and * lengths in array c'tors (#128974) The definition of an array constructor doesn't preclude the use of [character(:)::] or [character(*)::] directly, but there is language elsewhere in the standard that restricts their use to specific contexts, neither of which include explicitly typed array constructors. Fixes https://github.com/llvm/llvm-project/issues/128755. | 1 年前 | |
[flang] Catch bad usage case of whole assumed-size array (#132052) Whole assumed-size arrays are generally not allowed outside specific contexts, where expression analysis notes that they can appear. But contexts can nest, and in the case of an actual argument that turns out to be an array constructor, the permission to use a whole assumed-size array must be rescinded. Fixes https://github.com/llvm/llvm-project/issues/131909. | 1 年前 | |
[flang] Add one semantic check for masked array assignment As Fortran 2018 states, in each where-assignment-stmt, the mask-expr and the variable being defined shall be arrays of the same shape. The previous check does not consider checking if it is an array. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D125022 | 4 年前 | |
[flang][near NFC] Fix English in an error message (#151029) 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. | 1 年前 | |
[flang] Don't set Subroutine flag on PROCEDURE() pointers (#102011) External procedures about which no characteristics are known -- from EXTERNAL and PROCEDURE() statements of entities that are never called -- are marked as subroutines. This shouldn't be done for procedure pointers, however. Fixes https://github.com/llvm/llvm-project/issues/101908. | 1 年前 | |
[flang] Catch whole assumed-size array as RHS (#132819) The right-hand side expression of an intrinsic assignment statement may not be the name of an assumed-size array dummy argument. | 1 年前 | |
[flang] Support for character array formats A character array can be used as a format in an I/O data transfer statement, with the interpretation that its elements are concatenated in element order to constitute the format. Support in the runtime with an extra optional descriptor argument to six I/O API calls; support in semantics by removing an earlier check for a simply contiguous array presented as a format. Some work needs to be done in lowering to pass a character array descriptor to the I/O runtime API when present Differential Revision: https://reviews.llvm.org/D132167 | 3 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Intrinsic assignment of distinct but "same" derived types Subclause 7.5.2.4 lists conditions under which two distinct derived types are to be considered the same type for purposes of argument association, assignment, and so on. These conditions are implemented in evaluate::IsTkCompatibleWith(), but assignment semantics doesn't use it for testing for intrinsic assignment compatibility. Fix that. Differential Revision: https://reviews.llvm.org/D117621 | 4 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Check assignment conformance for derived types (#99059) Derived type assignment checking needs to account for the possibility of derived assignment. The implementation was checking compile-time conformance errors only on the path for assignments of intrinsic types. Add a static array conformance check in the derived type flow once it has been established that no defined assignment exists. Fixes https://github.com/llvm/llvm-project/issues/98981. | 2 年前 | |
[flang] Fix spurious error on defined assignment in PURE (#139186) An assignment to a whole polymorphic object in a PURE subprogram that is implemented by means of a defined assignment procedure shouldn't be subjected to the same definability checks as it would be for an intrinsic assignment (which would also require it to be allocatable). Fixes https://github.com/llvm/llvm-project/issues/139129. | 1 年前 | |
[flang] Strengthen procedure compatibility checking Add more checks to procedure compatibility testing for procedure pointer assignments, actual procedure arguments, &c. Specifically, don't allow corresponding dummy data objects to differ in their use of polymorphism, assumed size arrays, or assumed shape arrays. Differential Revision: https://reviews.llvm.org/D155974 | 3 年前 | |
[flang] Catch character length errors in pointer associations 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 | 3 年前 | |
[flang] Consolidate and enhance pointer assignment checks 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 | 3 年前 | |
[flang] Get ProvenanceRange from CharBlock starting with expanded macro (#77791) When a CharBlock starts with an expanded macro but does not end in this macro expansion, GetProvenanceRange fails to return a ProvenanceRange which may cause error message to be emitted without location or lowering to emit code without source location (which is problematic if this code contains calls to procedures defined in the same file since LLVM will later crash with the error: "inlinable function call in a function with a DISubprogram location must have a debug location" Fix this situation by returning the ProvenanceRange starting at the replaced macro reference. | 2 年前 | |
[flang] Better handling of weird pointer assignment case (#120628) 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. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Correct handling of non-default lower bounds in ASSOCIATE with named constants Work through several issues with LBOUND() and UBOUND() of ASSOCIATE construct entities that have been associated with named constants or subobjects of named constants that are sporting non-default lower bounds. Sometimes the non-default lower bounds matter, sometimes they don't. Add a fairly exhaustive test to work through the possibilities. Differential Revision: https://reviews.llvm.org/D156756 | 2 年前 | |
[flang] ASSOCIATE/SELECT TYPE entities aren't pointer/allocatable (#99364) Fix what seems to be a regression in semantics in definability checking: the construct entities of ASSOCIATE and SELECT TYPE constructs are never pointers or allocatables, even when their selectors are so. SELECT RANK construct entities, however, can be pointers or allocatables. | 2 年前 | |
[flang] Catch ASSOCIATE(x=>assumed_rank) (#100626) An assumed-rank dummy argument cannot be the variable or expression in the selector of an ASSOCIATE construct. (SELECT TYPE/RANK are fine.) | 2 年前 | |
[flang] remove sequences of duplicate messages (#161916) Fixes bug exposed by https://github.com/llvm/llvm-project/pull/161915 by keeping a cache of messages printed at a given location. | 10 个月前 | |
[flang] Define ATOMIC_ADD as an intrinsic procedure (#122993) This one appears to have been omitted when other ATOMIC_xxx intrinsic procedures were defined. There's already tests for it, but they apparently work even when ATOMIC_ADD must be interpreted as an external procedure with an implicit interface. Extend the tests with INTRINSIC NONE(EXTERNAL, TYPE) statements to ensure that they require the intrinsic interpretation. | 1 年前 | |
[flang] Revamp evaluate::CoarrayRef (#136628) Bring the typed expression representation of a coindexed reference up to F'2023, which removed some restrictions that had allowed the current representation to suffice for older revisions of the language. This new representation is somewhat more simple -- it uses a DataRef as its base, so any subscripts in a part-ref can be represented as an ArrayRef there. Update the code that creates the CoarrayRef, and add more checking to it, as well as actually capturing any STAT=, TEAM=, & TEAM_NUMBER= specifiers that might appear. Enforce the constraint that the part-ref must have subscripts if it is an array. (And update a pile of copied-and-pasted test code that lacked such subscripts.) | 1 年前 | |
[flang] Revamp evaluate::CoarrayRef (#136628) Bring the typed expression representation of a coindexed reference up to F'2023, which removed some restrictions that had allowed the current representation to suffice for older revisions of the language. This new representation is somewhat more simple -- it uses a DataRef as its base, so any subscripts in a part-ref can be represented as an ArrayRef there. Update the code that creates the CoarrayRef, and add more checking to it, as well as actually capturing any STAT=, TEAM=, & TEAM_NUMBER= specifiers that might appear. Enforce the constraint that the part-ref must have subscripts if it is an array. (And update a pile of copied-and-pasted test code that lacked such subscripts.) | 1 年前 | |
[flang] Revamp evaluate::CoarrayRef (#136628) Bring the typed expression representation of a coindexed reference up to F'2023, which removed some restrictions that had allowed the current representation to suffice for older revisions of the language. This new representation is somewhat more simple -- it uses a DataRef as its base, so any subscripts in a part-ref can be represented as an ArrayRef there. Update the code that creates the CoarrayRef, and add more checking to it, as well as actually capturing any STAT=, TEAM=, & TEAM_NUMBER= specifiers that might appear. Enforce the constraint that the part-ref must have subscripts if it is an array. (And update a pile of copied-and-pasted test code that lacked such subscripts.) | 1 年前 | |
[flang] Revamp evaluate::CoarrayRef (#136628) Bring the typed expression representation of a coindexed reference up to F'2023, which removed some restrictions that had allowed the current representation to suffice for older revisions of the language. This new representation is somewhat more simple -- it uses a DataRef as its base, so any subscripts in a part-ref can be represented as an ArrayRef there. Update the code that creates the CoarrayRef, and add more checking to it, as well as actually capturing any STAT=, TEAM=, & TEAM_NUMBER= specifiers that might appear. Enforce the constraint that the part-ref must have subscripts if it is an array. (And update a pile of copied-and-pasted test code that lacked such subscripts.) | 1 年前 | |
[flang] Revamp evaluate::CoarrayRef (#136628) Bring the typed expression representation of a coindexed reference up to F'2023, which removed some restrictions that had allowed the current representation to suffice for older revisions of the language. This new representation is somewhat more simple -- it uses a DataRef as its base, so any subscripts in a part-ref can be represented as an ArrayRef there. Update the code that creates the CoarrayRef, and add more checking to it, as well as actually capturing any STAT=, TEAM=, & TEAM_NUMBER= specifiers that might appear. Enforce the constraint that the part-ref must have subscripts if it is an array. (And update a pile of copied-and-pasted test code that lacked such subscripts.) | 1 年前 | |
[flang] Revamp evaluate::CoarrayRef (#136628) Bring the typed expression representation of a coindexed reference up to F'2023, which removed some restrictions that had allowed the current representation to suffice for older revisions of the language. This new representation is somewhat more simple -- it uses a DataRef as its base, so any subscripts in a part-ref can be represented as an ArrayRef there. Update the code that creates the CoarrayRef, and add more checking to it, as well as actually capturing any STAT=, TEAM=, & TEAM_NUMBER= specifiers that might appear. Enforce the constraint that the part-ref must have subscripts if it is an array. (And update a pile of copied-and-pasted test code that lacked such subscripts.) | 1 年前 | |
[flang] Revamp evaluate::CoarrayRef (#136628) Bring the typed expression representation of a coindexed reference up to F'2023, which removed some restrictions that had allowed the current representation to suffice for older revisions of the language. This new representation is somewhat more simple -- it uses a DataRef as its base, so any subscripts in a part-ref can be represented as an ArrayRef there. Update the code that creates the CoarrayRef, and add more checking to it, as well as actually capturing any STAT=, TEAM=, & TEAM_NUMBER= specifiers that might appear. Enforce the constraint that the part-ref must have subscripts if it is an array. (And update a pile of copied-and-pasted test code that lacked such subscripts.) | 1 年前 | |
[flang] Revamp evaluate::CoarrayRef (#136628) Bring the typed expression representation of a coindexed reference up to F'2023, which removed some restrictions that had allowed the current representation to suffice for older revisions of the language. This new representation is somewhat more simple -- it uses a DataRef as its base, so any subscripts in a part-ref can be represented as an ArrayRef there. Update the code that creates the CoarrayRef, and add more checking to it, as well as actually capturing any STAT=, TEAM=, & TEAM_NUMBER= specifiers that might appear. Enforce the constraint that the part-ref must have subscripts if it is an array. (And update a pile of copied-and-pasted test code that lacked such subscripts.) | 1 年前 | |
[flang] Revamp evaluate::CoarrayRef (#136628) Bring the typed expression representation of a coindexed reference up to F'2023, which removed some restrictions that had allowed the current representation to suffice for older revisions of the language. This new representation is somewhat more simple -- it uses a DataRef as its base, so any subscripts in a part-ref can be represented as an ArrayRef there. Update the code that creates the CoarrayRef, and add more checking to it, as well as actually capturing any STAT=, TEAM=, & TEAM_NUMBER= specifiers that might appear. Enforce the constraint that the part-ref must have subscripts if it is an array. (And update a pile of copied-and-pasted test code that lacked such subscripts.) | 1 年前 | |
[flang] Revamp evaluate::CoarrayRef (#136628) Bring the typed expression representation of a coindexed reference up to F'2023, which removed some restrictions that had allowed the current representation to suffice for older revisions of the language. This new representation is somewhat more simple -- it uses a DataRef as its base, so any subscripts in a part-ref can be represented as an ArrayRef there. Update the code that creates the CoarrayRef, and add more checking to it, as well as actually capturing any STAT=, TEAM=, & TEAM_NUMBER= specifiers that might appear. Enforce the constraint that the part-ref must have subscripts if it is an array. (And update a pile of copied-and-pasted test code that lacked such subscripts.) | 1 年前 | |
[flang] Avoid crash in name resolution on erroneous type extension (#109312) Don't crash when a bad Fortran program tries to extend a derived type with previous legitimate forward references but no prior definition. Fixes https://github.com/llvm/llvm-project/issues/109268. | 1 年前 | |
[flang] Update the regression tests to use the new driver when enabled This patch updates most of the remaining regression tests (~400) to use flang-new rather then f18 when FLANG_BUILD_NEW_DRIVER is set. This allows us to share more Flang regression tests between f18 and flang-new. A handful of tests have not been ported yet - these are currently either failing or not supported by the new driver. Summary of changes: * RUN lines in tests are updated to use %flang_fc1 instead of %f18 * option spellings in tests are updated to forms accepted by both f18 and flang-new * variables in Bash scripts are renamed (e.g. F18 --> FLANG_FC1) The updated tests will now be run with the new driver, flang-new, whenever it is enabled (i.e when FLANG_BUILD_NEW_DRIVER is set). Although this patch touches many files, vast majority of the changes are automatic: grep -IEZlr "%f18" flang/test/ | xargs -0 -l sed -i 's/%f18/%flang_fc1/g Differential Revision: https://reviews.llvm.org/D100309 | 5 年前 | |
[flang] Check for BIND(C) name conflicts with alternate entries (#156563) Added IsAlternateEntry() and modified IsExternalProcedureDefinition() to also check for alternate entries. (IsExternalProcedureDefinition() is called from CheckHelper::CheckGlobalName(), which checks for duplicate global symbols.) Fixes #62778 | 11 个月前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Relax checking of dummy procedures under BIND(C) (#92474) As was done recently to allow derived types that are not explicitly BIND(C), but meet the requirements of BIND(C), to be acceptable for use in contexts nominally requiring BIND(C), this patch allows procedures that are not explicitly BIND(C) to be used in contexts that nominally require BIND(C) so long as (1) they meet the requirements of BIND(C), and (2) don't use dummy arguments whose implementations may vary under BIND(C), such as VALUE. | 2 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] BIND(C,NAME=...) corrections The Fortran standard's various restrictions on the use of BIND(C) often depend more on the presence or absence of an explicit NAME= specification rather than on its value, but semantics and module file generation aren't making distinctions between explicit NAME= specifications that happen to match the default name and declarations that don't have NAME=. Tweak semantics and module file generation to conform, and also complain when named BIND(C) attributes are erroneously applied to entities that can't support them, like ABSTRACT interfaces. Differential Revision: https://reviews.llvm.org/D145107 | 3 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Add bind(C) to buitlin C_PTR D131585 Adds couple of semantics check for the components of BIND(C) derived-type. This would raise an error when a component is of C_PTR type. Add bind(c) to the __builtin_c_ptr type so the wrong error is not triggered. Reviewed By: peixin, jeanPerier Differential Revision: https://reviews.llvm.org/D132350 | 3 年前 | |
[flang] Add two semantic checks about BIND(C) attribute As Fortran 2018 C1546, an elemental procedure shall not have the BIND attribute. As 18.3.6, it does not mention that an array with VALUE can be interoperable. It is not reasonable to pass an array by value when the array is too large. Forbid it to be consistent with gfortran/ifort. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D136420 | 3 年前 | |
[flang] Catch more semantic errors with coarrays (#125536) Detect and report a bunch of uncaught semantic errors with coarray declarations. Add more tests, and clean up bad usage in existing tests. | 1 年前 | |
[flang] Check for invalid BIND(C) names Require BIND(C) interoperable names to be valid C identifiers. Differential Revision: https://reviews.llvm.org/D143833 | 3 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Revert two new interoperability semantic checks (#93112) Two checks related to BIND(C) vs non-BIND(C) entry points with the same dummy argument added by https://github.com/llvm/llvm-project/pull/92474 have turned out to be unnecessary. Revert them and adjust the tests. | 2 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Prevent IR name clashes between BIND(C) and external procedures (#66777) Defining a procedure with a BIND(C, NAME="...") where the binding label matches the assembly name of a non BIND(C) external procedure in the same file causes a failure when generating the LLVM IR because of the assembly symbol name clash. Prevent this crash with a clearer semantic error. | 2 年前 | |
[flang] Relax BIND(C) derived type component check (#94392) Allow an explicit BIND(C) derived type to have a non-BIND(C) component so long as the component's type is interoperable and it satisfies all other constraints. | 2 年前 | |
[flang] Support BIND(C, NAME="...", CDEFINED) extension (#94402) This CDEFINED keyword extension to a language-binding-spec signifies that static storage for an interoperable variable will be allocated outside of Fortran, probably by a C/C++ external object definition. | 2 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Catch bad members of BIND(C) COMMON block (#148971) Variables that can't be BIND(C), like pointers, can't be in a BIND(C) common block, either. Fixes https://github.com/llvm/llvm-project/issues/148922. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Stricter interface compatibility checking for TBP overrides The compiler currently ignores attributes for PASS dummy arguments that are incompatible between a type-bound procedure in an extended type and the binding of the same name that it overrides in an ancestor type, if any. Strengthen this checking so that discrepancies between attributes and intents are caught, and add some tests. Differential Revision: https://reviews.llvm.org/D145110 | 3 年前 | |
[flang] Correct overriding (or not) of inaccessible bindings Fortran doesn't allow inaccessible procedure bindings to be overridden, and this needs to apply to generic resolution. When resolving a type-bound generic procedure from another module, ensure only that the most extended override from its module is used if it is PRIVATE, not a later apparent override from another module. Differential Revision: https://reviews.llvm.org/D150721 | 3 年前 | |
[flang] Correct overriding (or not) of inaccessible bindings Fortran doesn't allow inaccessible procedure bindings to be overridden, and this needs to apply to generic resolution. When resolving a type-bound generic procedure from another module, ensure only that the most extended override from its module is used if it is PRIVATE, not a later apparent override from another module. Differential Revision: https://reviews.llvm.org/D150721 | 3 年前 | |
[flang] Correct overriding (or not) of inaccessible bindings Fortran doesn't allow inaccessible procedure bindings to be overridden, and this needs to apply to generic resolution. When resolving a type-bound generic procedure from another module, ensure only that the most extended override from its module is used if it is PRIVATE, not a later apparent override from another module. Differential Revision: https://reviews.llvm.org/D150721 | 3 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Identify misparsed statement function in BLOCK in ASSOCIATE (#72148) When a BLOCK construct is within an ASSOCIATE or related construct, don't misinterpret an assignment to an array element of a construct entity as being an impermissible definition of a local statement function. | 2 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang][CUDA] Downgrade error to warning (#161570) The compiler currently emit an error about the lack of an explicit procedure interface when an external procedure that is called via an implicit interface is known to have an dummy argument with a CUDA data attribute, even when the corresponding actual argument does have a CUDA data attribute. This behavior is inconsistent with what happens when such a call is to an external in another source file and its definition is not visible -- the compiler silently accepts an actual argument with a CUDA data attribute across the implicit interface. Harmonize this situation so that an actual argument with a CUDA data attribute in a reference to a procedure with an implicit interface elicits a usage warning encouraging the use of explicit interfaces. Only when the procedure's definition is visible, and incompatible, will an error message appear. | 10 个月前 | |
[flang] Use LHS type for RHS BOZ on assignment (#139626) F'2023 allows the right-hand side of an assignment to an integer or real scalar to be a BOZ literal constant; this has already been supported in some compilers. The type of the left-hand side variable is used to convert the value of the BOZ. | 1 年前 | |
[flang] Add optional portability warning for upcoming Fortran 202X/3 breaking change The soon-to-be-published next revision of the ISO Fortran language standard contains a couple of breaking changes to previous specifications that may cause existing programs to silently change their behavior. For the change that introduces automatic reallocation of deferred length allocatable character scalar variables when they appear as the targets of internal WRITE statements, as IOMSG=/ERRMSG= variables, as outputs of INQUIRE specifiers, or as INTENT(OUT) arguments to intrinsic procedures, this patch adds an optional portability warning. Differential Revision: https://reviews.llvm.org/D154242 | 3 年前 | |
[flang] Add new hints to expected warnings (#146399) I added a new test with warnings, but warnings are now emitted with hints. Add them to the new test. | 1 年前 | |
[flang] Process pointer component default initializers sooner (#145601) Name resolution defers the analysis of all object pointer initializers to the end of a specification part, including the default initializers of derived type data pointer components. This deferment allows object pointer initializers to contain forward references to objects whose declarations appear later. However, this deferment has the unfortunate effect of causing NULL default initialization of such object pointer components when they do not appear in structure constructors that are used as default initializers, and their default initializers are required. So handle object pointer default initializers of components as they appear, as before. | 1 年前 | |
[flang] Unify derived types in distinct module files (#146759) When using -fhermetic-module-files it's possible for a derived type to have multiple distinct definition sites that are being compared for being the same type, as in argument association. Accept them as being the same type so long as they have the same names, the same module names, and identical definitions. | 1 年前 | |
[flang] Fix spurious error messages due to INTRINSIC nested in BLOCK (#115889) When skimmming executable parts to collect names used in procedure calls, it is important to exclude names that have local declarations in nested BLOCK constructs. The mechanism for handling these nested declarations was catching only names whose declarations include an "entity-decl", and so names appearing in other declaration statements (like INTRINSIC and EXTERNAL statements) were not hidden from the scan, leading to absurd error messages when such names turn out to be procedures in the nested BLOCK construct but to not be procedures outside it. This patch fixes the code that detects local declarations in BLOCK for all of the missed cases that don't use entity-decls; only INTRINSIC and EXTERNAL could affect the procedures whose names are of interest to the executable part skimmer, but perhaps future work will want to collect non-procedures as well, so I plugged all of the holes that I could find. Fixes https://github.com/llvm/llvm-project/issues/115674. | 1 年前 | |
[flang][CUDA] Apply intrinsic operator overrides (#151018) Fortran's intrinsic numeric and relational operators can be overridden with explicit interfaces so long as one or more of the dummy arguments have the DEVICE attribute. Semantics already allows this without complaint, but fails to replace the operations with the defined specific procedure calls when analyzing expressions. | 1 年前 | |
[flang] Fix crash when handling benign USE conflict (#121977) When the same name is used for distinct derived types in two modules, and at least one of those modules also defines a generic interface of the same name, name resolution crashes when both modules are USE'd into the same scope. The crash is due to some pointers into the symbol table becoming invalid when a symbol is replaced with a UseErrorDetails; set them to null. Also allow for extending a UseErrorDetails in place rather than emitting a spurious error message. Fixes https://github.com/llvm/llvm-project/issues/121718. | 1 年前 | |
[flang] Fix crash in fuzzed input program (#122193) Fixes https://github.com/llvm/llvm-project/issues/121971. | 1 年前 | |
[flang] Fix crash in fuzzing test (#122189) Fixes https://github.com/llvm/llvm-project/issues/121972. | 1 年前 | |
[flang] Fix crash in fuzzer-generated error test. (#122199) Fixes https://github.com/llvm/llvm-project/issues/121973. | 1 年前 | |
[flang] Fix crash from fuzzy test. (#122364) Fixes https://github.com/llvm/llvm-project/issues/122002. | 1 年前 | |
[flang] Fix crash from fuzzy test. (#122364) Fixes https://github.com/llvm/llvm-project/issues/122002. | 1 年前 | |
[flang] Fix another crash from another fuzzer test. (#122562) Fixes https://github.com/llvm/llvm-project/issues/122045. | 1 年前 | |
[flang] Better messages and error recovery for a bad RESHAPE (#122604) Add tests for negative array extents where necessary, motivated by a compiler crash exposed by yet another fuzzer test, and improve overall error message quality for RESHAPE(). Fixes https://github.com/llvm/llvm-project/issues/122060. | 1 年前 | |
[flang] Fix crash in module file generation (#123859) An assertion in module file generation didn't allow for a case that has arisen in a test; remove it, extend commentary, and add a regression test. Fixes https://github.com/llvm/llvm-project/issues/123534. | 1 年前 | |
[flang] Fix crash on erroneous program (#123843) Catch and report multiple initializations of the same procedure pointer rather than assuming that control wouldn't reach a given point in name resolution in that case. Fixes https://github.com/llvm/llvm-project/issues/123538. | 1 年前 | |
[flang] Fix crash on SMP with dummy procedure (#124663) When a separate module procedure is defined with MODULE PROCEDURE, the compiler crashes if there is a dummy procedure in the interface defined with only a result type. This is due to the type already having been defined on the ProcEntityDetails symbol as part of earlier wholesale symbol duplication. Adjust the code to not define the result type of the ProcEntityDetails if it is already present, but to verify that it is the same type instead. Fixes https://github.com/llvm/llvm-project/issues/124487. | 1 年前 | |
[flang] Allow defined assignment to CLASS(*) (#124817) An unlimited polymorphic left-hand side variable is acceptable in the definition of a defined assignment subroutine. Fixes https://github.com/llvm/llvm-project/issues/124621. | 1 年前 | |
[flang] Suppress USEs of non-USE'able names in module files (#124980) When harvesting and formatting symbols USE'd from other modules, don't emit USE statements to module files for names unless they come from the topmost scope of the module. There was a check to prevent names from derived type scopes from escaping in this way, but it must be made more general to prevent other cases like dummy arguments in interfaces. Fixes https://github.com/llvm/llvm-project/issues/124716. | 1 年前 | |
[flang] Handle indirect USE of ancestor module into submodule (#124969) A USE statement within a submodule (possibly in a nested scope) is not allowed to USE the submodule's ancestor module directly, but it is permissible to USE that ancestor module indirectly via another unrelated module. Don't emit "already present in scope" errors for this case. Fixes https://github.com/llvm/llvm-project/issues/124731. | 1 年前 | |
[flang] Prefer non-elemental to elemental defined operator resolution (#124941) A non-elemental specific procedure must take precedence over an elemental specific procedure in defined operator generic resolution. Fixes https://github.com/llvm/llvm-project/issues/124777. | 1 年前 | |
[flang] Refine "same type" testing for intrinsic arguments (#125133) Some errors aren't being caught, such as the case in the linked bug where the PAD= argument to RESHAPE() didn't have the same declared type as the ARRAY=; this led to a crash in lowering. Refine the "same type" testing logic for intrinsic procedures, and add a better test. Fixes https://github.com/llvm/llvm-project/issues/124976. | 1 年前 | |
[flang] Don't flag CLASS(*) ASSOCIATED() pointer or target as error (#125890) As I read the standard, an unlimited polymorphic pointer or target should be viewed as compatible with any data target or data pointer when used in the two-argument form of the intrinsic function ASSOCIATED(). Fixes https://github.com/llvm/llvm-project/issues/125774. | 1 年前 | |
[flang] Use local name for structure constructor (#132047) When reinterpreting an ambiguously parsed function reference as a structure constructor, use the original symbol of the type in the representation of the derived type spec of the structure constructor, not its ultimate resolution. The distinction turns out to matter when generating module files containing derived type constants as initializers when the derived types' names have undergone USE association renaming. Fixes https://github.com/llvm/llvm-project/issues/131579. | 1 年前 | |
[flang] Fix missed case of symbol renaming in module file generation (#132475) The map of symbols requiring new local aliases for USE association needs to use the symbols' ultimate resolutions to avoid missing cases that can arise in convoluted codes with lots of confusing renamings. Fixes https://github.com/llvm/llvm-project/issues/132435. | 1 年前 | |
[flang] Emit error on impossible-to-implement construct (#160384) An assignment to a whole polymorphic allocatable changes its dynamic type to the type of the right-hand side expression. But when the assignment is under control of a WHERE statement, or a FORALL / DO CONCURRENT with a mask expression, there is no interpretation of the assignment, as the type of a variable must be the same for all of its elements. There is no restriction in the standard against this usage, and no other Fortran compiler complains about it. But it is not possible to implement it in general, and the behavior produced by other compilers is not reasonable, much less worthy of emulating. It's best to simply disallow it with an error message. Fixes https://github.com/llvm/llvm-project/issues/133669, or more accurately, resolves it. | 10 个月前 | |
[flang] Emit error when DEFERRED binding overrides non-DEFERRED (#139325) Fixes https://github.com/llvm/llvm-project/issues/138915. | 1 年前 | |
[flang] Fix spurious error on defined assignment in PURE (#139186) An assignment to a whole polymorphic object in a PURE subprogram that is implemented by means of a defined assignment procedure shouldn't be subjected to the same definability checks as it would be for an intrinsic assignment (which would also require it to be allocatable). Fixes https://github.com/llvm/llvm-project/issues/139129. | 1 年前 | |
[flang] Correct defined assignment case (#142020) When a generic ASSIGNMENT(=) has elemental and non-elemental specific procedures that match the actual arguments, the non-elemental procedure must take precedence. We get this right for generics defined with interface blocks, but the type-bound case fails if the non-elemental specific takes a non-default PASS argument. Fixes https://github.com/llvm/llvm-project/issues/141807. | 1 年前 | |
[flang] Check definability for logical INQUIRE specifiers (#144797) check-io.cpp was missing checks for the definability of logical-valued specifiers in INQUIRE statements (e.g. EXIST=), and therefore also not noting the definitions of those variables. This could lead to bogus warnings about undefined function result variables, and also to missed errors about immutable objects appearing in those specifiers. Fixes https://github.com/llvm/llvm-project/issues/144453. | 1 年前 | |
[flang] Fix crash in Semantics (#148706) Allow for renaming in USE association of Cray pointers. Fixes https://github.com/llvm/llvm-project/issues/148559. | 1 年前 | |
[flang] Better error message for ambiguous ASSIGNMENT(=) (#148720) When a type-bound generic ASSIGNMENT(=) procedure is ambiguous for a particular reference, say so, rather than claiming that no specific procedure matched the types and ranks of the LHS and RHS. Fixes https://github.com/llvm/llvm-project/issues/148675. | 1 年前 | |
[flang] Adjust needless warning (#164500) When an external procedure has an explicit interface in one scope, and an implicit interface in another, and there's at least one call to it from which dummy argument information can be inferred, don't emit a warning about potential incompatibility if the only difference in their characteristics is that one of their interfaces was implicit. | 9 个月前 | |
[flang] Catch calls to impure intrinsics from PURE subprograms (#160947) The code in expression semantics that catches a call to an impure procedure in a PURE context misses calls to impure intrinsics, since their designators have a SpecificIntrinsic rather than a Symbol. Replace the current check with a new one that uses the characteristics of the called procedure, which works for both intrinsic and non-intrinsic cases. Testing this change revealed that an explicit INTRINSIC statement wasn't doing the right thing for extension "dual" intrinsics that can be called as either a function or as a subroutine; the use of an INTRINSIC statement would disallow its use as a subroutine. I've fixed that here as well. Fixes https://github.com/llvm/llvm-project/issues/157124. | 10 个月前 | |
[flang] Fix crash in error recovery (#158750) Code to attach a procedure's declaration to an error message did not allow for ENTRY names, which can be in the global scope. Fixes https://github.com/llvm/llvm-project/issues/158405. | 10 个月前 | |
[flang] Fix crash from undetected program error. (#159847) When a function or subroutine interface block conflicts with a name already in scope, emit an error and avoid a crash. Fixes https://github.com/llvm/llvm-project/issues/159554. | 10 个月前 | |
[flang] Silence bogus error (#160173) One of the checks for implicitly-typed names under IMPLICIT NONE has a false positive case for USE-associated items in COMMON blocks. Fixes https://github.com/llvm/llvm-project/issues/159977. | 10 个月前 | |
[flang] Process legacy DATA-style /initializers/ sooner (#162722) The compiler can't defer the conversion of legacy DATA-style /initializers/ in component declarations to their init() expressions to the general DATA statement conversion pass, since default component values must be present during structure constructor analysis. So move their conversions into name resolution and handle them at the same times as standard '=' initializers are processed. Avoid any potential problems with type parameters being used as repetition counts or values by disallowing legacy DATA-style initializers in PDTs. Fixes https://github.com/llvm/llvm-project/issues/161989. | 9 个月前 | |
[flang] Fix character length checking in ALLOCATE (#163657) The known character length compatibility check for ALLOCATE statements needs to allow for negative lengths, which are effectively zero. Fixes https://github.com/llvm/llvm-project/issues/163242. | 9 个月前 | |
[flang] Refine checks for NULL() in expressions (#163655) Fix a false positive "NULL can't be an operand here" error message arising in a defined generic interface for an intrinsic operator (==) with multiple spellings. Fixes https://github.com/llvm/llvm-project/issues/163255. | 9 个月前 | |
[flang] Non-generic interface must shadow outer generic (#164469) A procedure defined in non-generic INTERFACE block must completely shadow any generic interface of the same name in an outer scope. Fixes https://github.com/llvm/llvm-project/issues/164303. | 9 个月前 | |
[flang] Fix crash in UseErrorDetails construction case (#168126) When a derived type has the same name as a generic function, and is use-associated into a scope along with other distinct derived types of the same name, we crash. Don't crash. Fixes https://github.com/llvm/llvm-project/issues/168099. | 8 个月前 | |
[flang] Fix crash in CO_REDUCE semantics (#131211) A std::optional<> value was being accessed without first ensuring its presence. | 1 年前 | |
[flang] Fix crash in error recovery (#140768) When a TYPE(*) dummy argument is erroneously used as a component value in a structure constructor, semantics crashes if the structure constructor had been initially parsed as a potential function reference. Clean out stale typed expressions when reanalyzing the reconstructed parse subtree to ensure that errors are caught the next time around. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Disable some warnings with ineluctable false positives (#167714) There are a few well-meaning warnings for some cases of the FPTR= argument to C_F_POINTER() that can be false positives, since the restrictions in the standard are dependent on the source of the CPTR= argument. Further, there is no way to alter a program to avoid these warnings, so one cannot compile a correct and conforming program with -pedantic -Werror. Disable these warnings. Fixes https://github.com/llvm/llvm-project/issues/167470. | 8 个月前 | |
[flang] Downgrade an error to a warning for specific circumstances (#155675) We emit an error on the component name in the structure constructor "__builtin_c_ptr(__address=0)", which is the value of "c_ptr_null()", because the component name "__address" is PRIVATE to an intrinsic module. The error is specifically omitted, however, when the name appears in a module file, since it's what we emit for "c_ptr_null()" in initializers. This patch carves out another exception -- downgrading the error to a warning -- for the case of a PRIVATE component name in a structure constructor from an intrinsic module when the structure constructor appears in a module. This case arises when module files are being reprocessed as Fortran source in order to convert them to hermetic module files. | 11 个月前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][semantic] update semantic checks for ansychronous and volatility attributes to use MayNeedCopy (#159477) Ties the semantic checks for overwriting a asynchronous or volatile value with a copy-out operation to the function evaluate::MayNeedCopy(..., /*forCopyOut=*/false). This should make the checks more accurate and consistent with the lowering. The PR also adds a default check that looks for the undesired behavior directly, in case extension later modify what is possible. A couple portability warnings are added where other compilers are over restrictive. Closes https://github.com/llvm/llvm-project/issues/137369 $ build/bin/flang -c ~/work/llvm-test-suite/Fortran/gfortran/regression/volatile8.f90 -pedantic /home/akuhlenschmi/work/llvm-test-suite/Fortran/gfortran/regression/volatile8.f90:21:16: warning: The array section 'a(1_8:5_8:2_8)' should not be associated with dummy argument 'dummy8=' with VOLATILE attribute, unless the dummy is assumed-shape or assumed-rank [-Wvolatile-or-asynchronous-temporary] call sub8 (a(1:5:2)) ! { dg-error "Array-section actual argument" } ^^^^^^^^ /home/akuhlenschmi/work/llvm-test-suite/Fortran/gfortran/regression/volatile8.f90:37:16: portability: The actual argument 's9dummy' should not be associated with dummy argument 'dummy9=' with VOLATILE attribute, because a temporary copy is required during the call [-Wportability] call sub9 (s9dummy) ! { dg-error "Assumed-shape actual argument" } ^^^^^^^ /home/akuhlenschmi/work/llvm-test-suite/Fortran/gfortran/regression/volatile8.f90:55:17: portability: The actual argument 'a' should not be associated with dummy argument 'dummy10=' with VOLATILE attribute, because a temporary copy is required during the call [-Wportability] call sub10 (a) ! { dg-error "Pointer-array actual argument" } ^ | 10 个月前 | |
[flang] Check actual/dummy coranks in more cases (#130167) The check for equality of actual and dummy argument coranks was taking place only for ALLOCATABLE coarrays; perform the check for all cases, and refine the ALLOCATABLE check to apply only to cases that don't fail the new more general check. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Check actual/dummy coranks in more cases (#130167) The check for equality of actual and dummy argument coranks was taking place only for ALLOCATABLE coarrays; perform the check for all cases, and refine the ALLOCATABLE check to apply only to cases that don't fail the new more general check. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Don't take corank from actual intrinsic argument (#124029) When constructing the characteristics of a particular reference to an intrinsic procedure that was passed a non-coindexed reference to local coarray data as an actual argument, don't add the corank of the actual argument to those characteristics. Also clean up the TypeAndShape characteristics class a little; the Attr::Coarray is redundant since the corank() accessor can be used to the same effect. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Warn about impure calls in concurrent headers (#108436) Emit a warning when an impure function is referenced from a DO CONCURRENT or FORALL concurrent-header that is not nested within another such construct. (That nested case is already an error.) | 1 年前 | |
[flang] Enforce C15104(5) for coindexed values (#130203) A object's value can't be copied from another image by means of an intrinsic assignment statement if it has a derived type that contains a pointer subobject ultimate component. | 1 年前 | |
[flang][CUDA] Downgrade error to warning (#161570) The compiler currently emit an error about the lack of an explicit procedure interface when an external procedure that is called via an implicit interface is known to have an dummy argument with a CUDA data attribute, even when the corresponding actual argument does have a CUDA data attribute. This behavior is inconsistent with what happens when such a call is to an external in another source file and its definition is not visible -- the compiler silently accepts an actual argument with a CUDA data attribute across the implicit interface. Harmonize this situation so that an actual argument with a CUDA data attribute in a reference to a procedure with an implicit interface elicits a usage warning encouraging the use of explicit interfaces. Only when the procedure's definition is visible, and incompatible, will an error message appear. | 10 个月前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Check constraint C711 correctly An assumed-type actual argument that corresponds to an assumed-rank dummy argument shall be assumed-shape or assumed-rank. Differential Revision: https://reviews.llvm.org/D120750 | 4 年前 | |
[flang] Extension: unrestricted intrinsics as specifics in generics At least one other Fortran compiler supports the use of unrestricted intrinsic functions as specific procedures in generic interfaces, and the usage seems to be both useful and unambiguous. Support it with a portability warning. Fixes llvm-test-suite/Fortran/gfortran/regression/pr95500.f90. Differential Revision: https://reviews.llvm.org/D157333 | 2 年前 | |
[flang] Update the regression tests to use the new driver when enabled This patch updates most of the remaining regression tests (~400) to use flang-new rather then f18 when FLANG_BUILD_NEW_DRIVER is set. This allows us to share more Flang regression tests between f18 and flang-new. A handful of tests have not been ported yet - these are currently either failing or not supported by the new driver. Summary of changes: * RUN lines in tests are updated to use %flang_fc1 instead of %f18 * option spellings in tests are updated to forms accepted by both f18 and flang-new * variables in Bash scripts are renamed (e.g. F18 --> FLANG_FC1) The updated tests will now be run with the new driver, flang-new, whenever it is enabled (i.e when FLANG_BUILD_NEW_DRIVER is set). Although this patch touches many files, vast majority of the changes are automatic: grep -IEZlr "%f18" flang/test/ | xargs -0 -l sed -i 's/%f18/%flang_fc1/g Differential Revision: https://reviews.llvm.org/D100309 | 5 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Defer NAMELIST group item name resolution Items in NAMELIST groups might be host-associated implicitly-typed variables, but name resolution can't know that when the NAMELIST appears in a specification part and the host's execution part has not yet been analyzed. So defer NAMELIST group item name resolution to the end of the execution part. This is safe because nothing else in name resolution depends on whether a variable is in a NAMELIST group or not. Differential Revision: https://reviews.llvm.org/D123723 | 4 年前 | |
[flang] Refine procedure compatibility checking The test for compatible function results needs to be nearly strict equality of their types, not the usual actual/dummy type compatibility test used in other situations. The exceptional case is that assumed length CHARACTER function results are compatible with explicit length results of the same kind. In particular, a function returning a polymorphic pointer is not compatible with a function returning a monomorphic pointer even of the same declared type. Differential Revision: https://reviews.llvm.org/D145094 | 3 年前 | |
[flang] Finer control over warnings 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 | 3 年前 | |
[flang] Enforce array conformance in actual arguments to ELEMENTALs When the shapes of actual arguments to ELEMENTAL procedures are sufficiently well known during semantics, require them to conform. Differential Revision: https://reviews.llvm.org/D109909 | 4 年前 | |
[flang] Place MIN/MAX A1/A2 first in semantic analysis (#69722) Intrinsic analysis in semantics reorder the actual arguments so that they match the dummy order. This was not done for MIN/MAX because they are special: these are the only intrinsics with a variadic number of arguments. This caused bugs in lowering that only check the optionality of actual arguments from the third position (since A1 and A2 are mandatory). Update semantics to place A1/A2 first. This also allow removing some checks that were specific to MIN/MAX. There is no point in sorting/placing the rest of the arguments which would be tedious and tricky because of the variadic aspect. | 2 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Catch name resolution error due to global scoping (#77683) In CALL FOO PRINT *, ABS(FOO) we currently resolve the first FOO to a global external subprogram, but then the second FOO is treated as an implicitly typed local variable. This happens because the name FOO is not present in the local scope. Fix by adding FOO to the local scope using a place-holding HostAssocDetails symbol whose existence prevents the creation of another FOO in the local scope. The symbol stored in the parser::Name parse tree nodes or used in typed expressions will all continue to point to the global external subprogram. Resolves llvm-test-suite/Fortran/gfortran/regression/pr71859.f90. | 2 年前 | |
[flang] Fix ICE for passing a label for non alternate return arguments When we pass an alternate return specifier to a regular (not an asterisk) dummy argument, flang would throw an internal compiler error of derefencing a null pointer. To avoid the ICE, a check was added. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D123947 | 4 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Fix spurious error on defined assignment in PURE (#139186) An assignment to a whole polymorphic object in a PURE subprogram that is implemented by means of a defined assignment procedure shouldn't be subjected to the same definability checks as it would be for an intrinsic assignment (which would also require it to be allocatable). Fixes https://github.com/llvm/llvm-project/issues/139129. | 1 年前 | |
[flang] Check constraint C834 on INTENT(OUT) assumed-size dummy arrays An assumed-size dummy array argument with INTENT(OUT) can't have a type that might require any runtime (re)initialization, since the size of the array is not known. Differential Revision: https://reviews.llvm.org/D139149 | 3 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] If it's got an argument keyword, it can't become an array reference Array references like A(1) are commonly misparsed as function references, since the parser has almost no semantic context, and the parse tree is fixed up later by semantics once it can be disambiguated. In a case like A(I=1), however, the presence of an argument keyword must prevent conversion into an array reference. (It might still also be a structure constructor.) Differential Revision: https://reviews.llvm.org/D142765 | 3 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Silence bogus error about NULL() actual for assumed-rank dummy (#93225) A NULL(without MOLD=) actual argument can be associated with an OPTIONAL assumed-rank non-allocatable non-pointer dummy argument; it simply signifies that the corresponding actual argument is absent, and thus none of its dynamic attributes, including rank, are meaningful. | 2 年前 | |
[flang] Adjust %REF/%VAL semantic checking (#93718) In accordance with other compilers, don't require that a %REF() actual argument be a modifiable variable. And move the %REF/%VAL semantic checks to Semantics/check-call.cpp, where one would expect to find them. Fixes https://github.com/llvm/llvm-project/issues/93489. | 2 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][semantic] update semantic checks for ansychronous and volatility attributes to use MayNeedCopy (#159477) Ties the semantic checks for overwriting a asynchronous or volatile value with a copy-out operation to the function evaluate::MayNeedCopy(..., /*forCopyOut=*/false). This should make the checks more accurate and consistent with the lowering. The PR also adds a default check that looks for the undesired behavior directly, in case extension later modify what is possible. A couple portability warnings are added where other compilers are over restrictive. Closes https://github.com/llvm/llvm-project/issues/137369 $ build/bin/flang -c ~/work/llvm-test-suite/Fortran/gfortran/regression/volatile8.f90 -pedantic /home/akuhlenschmi/work/llvm-test-suite/Fortran/gfortran/regression/volatile8.f90:21:16: warning: The array section 'a(1_8:5_8:2_8)' should not be associated with dummy argument 'dummy8=' with VOLATILE attribute, unless the dummy is assumed-shape or assumed-rank [-Wvolatile-or-asynchronous-temporary] call sub8 (a(1:5:2)) ! { dg-error "Array-section actual argument" } ^^^^^^^^ /home/akuhlenschmi/work/llvm-test-suite/Fortran/gfortran/regression/volatile8.f90:37:16: portability: The actual argument 's9dummy' should not be associated with dummy argument 'dummy9=' with VOLATILE attribute, because a temporary copy is required during the call [-Wportability] call sub9 (s9dummy) ! { dg-error "Assumed-shape actual argument" } ^^^^^^^ /home/akuhlenschmi/work/llvm-test-suite/Fortran/gfortran/regression/volatile8.f90:55:17: portability: The actual argument 'a' should not be associated with dummy argument 'dummy10=' with VOLATILE attribute, because a temporary copy is required during the call [-Wportability] call sub10 (a) ! { dg-error "Pointer-array actual argument" } ^ | 10 个月前 | |
[flang][semantic] update semantic checks for ansychronous and volatility attributes to use MayNeedCopy (#159477) Ties the semantic checks for overwriting a asynchronous or volatile value with a copy-out operation to the function evaluate::MayNeedCopy(..., /*forCopyOut=*/false). This should make the checks more accurate and consistent with the lowering. The PR also adds a default check that looks for the undesired behavior directly, in case extension later modify what is possible. A couple portability warnings are added where other compilers are over restrictive. Closes https://github.com/llvm/llvm-project/issues/137369 $ build/bin/flang -c ~/work/llvm-test-suite/Fortran/gfortran/regression/volatile8.f90 -pedantic /home/akuhlenschmi/work/llvm-test-suite/Fortran/gfortran/regression/volatile8.f90:21:16: warning: The array section 'a(1_8:5_8:2_8)' should not be associated with dummy argument 'dummy8=' with VOLATILE attribute, unless the dummy is assumed-shape or assumed-rank [-Wvolatile-or-asynchronous-temporary] call sub8 (a(1:5:2)) ! { dg-error "Array-section actual argument" } ^^^^^^^^ /home/akuhlenschmi/work/llvm-test-suite/Fortran/gfortran/regression/volatile8.f90:37:16: portability: The actual argument 's9dummy' should not be associated with dummy argument 'dummy9=' with VOLATILE attribute, because a temporary copy is required during the call [-Wportability] call sub9 (s9dummy) ! { dg-error "Assumed-shape actual argument" } ^^^^^^^ /home/akuhlenschmi/work/llvm-test-suite/Fortran/gfortran/regression/volatile8.f90:55:17: portability: The actual argument 'a' should not be associated with dummy argument 'dummy10=' with VOLATILE attribute, because a temporary copy is required during the call [-Wportability] call sub10 (a) ! { dg-error "Pointer-array actual argument" } ^ | 10 个月前 | |
[flang][runtime] Initialize uninitialized pointer components Pointer components without default initialization pose some difficult (or impossible) problems when they appear as right-hand side targets in pointer assignment statements; they may contain garbage or stale data that looks enough like a valid descriptor to cause a crash. Solve the problem by avoiding it -- ensure that pointers' descriptors are at least minimally established. Differential Revision: https://reviews.llvm.org/D149979 | 3 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[NFC] Move flang OpenMP semantic tests under one single directory To be consistent with OpenACC and will find the tests in one single directory for OpenMP. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D127529 | 4 年前 | |
[NFC] Move flang OpenMP semantic tests under one single directory To be consistent with OpenACC and will find the tests in one single directory for OpenMP. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D127529 | 4 年前 | |
[flang][driver] Modify the existing test cases that use -Mstandard in f18, to use -pedantic and %flang_fc1 to share with the new driver Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D99518 | 5 年前 | |
[flang][driver] Modify the existing test cases that use -Mstandard in f18, to use -pedantic and %flang_fc1 to share with the new driver Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D99518 | 5 年前 | |
[flang][driver] Modify the existing test cases that use -Mstandard in f18, to use -pedantic and %flang_fc1 to share with the new driver Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D99518 | 5 年前 | |
[flang][driver] Modify the existing test cases that use -Mstandard in f18, to use -pedantic and %flang_fc1 to share with the new driver Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D99518 | 5 年前 | |
[flang][driver] Modify the existing test cases that use -Mstandard in f18, to use -pedantic and %flang_fc1 to share with the new driver Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D99518 | 5 年前 | |
[flang][driver] Modify the existing test cases that use -Mstandard in f18, to use -pedantic and %flang_fc1 to share with the new driver Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D99518 | 5 年前 | |
[flang][driver] Modify the existing test cases that use -Mstandard in f18, to use -pedantic and %flang_fc1 to share with the new driver Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D99518 | 5 年前 | |
[flang][driver] Modify the existing test cases that use -Mstandard in f18, to use -pedantic and %flang_fc1 to share with the new driver Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D99518 | 5 年前 | |
[flang][driver] Modify the existing test cases that use -Mstandard in f18, to use -pedantic and %flang_fc1 to share with the new driver Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D99518 | 5 年前 | |
[flang][driver] Modify the existing test cases that use -Mstandard in f18, to use -pedantic and %flang_fc1 to share with the new driver Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D99518 | 5 年前 | |
[flang][driver] Modify the existing test cases that use -Mstandard in f18, to use -pedantic and %flang_fc1 to share with the new driver Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D99518 | 5 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Fixed regression with CDEFINED linkage (#164616) https://github.com/llvm/llvm-project/pull/162722 introduced a regression that started creating initializers for CDEFINED variables. CDEFINED variables cannot have initializers, because their storage is expected come from elsewhere, likely outside of Fortran. Fixed the regression and improved the regression test to catch the incorrect initialization case. Also, based on the code review feedback, made CDEFINED variable initialization a hard error and updated tests accordingly. | 9 个月前 | |
[flang] Catch more semantic errors with coarrays (#125536) Detect and report a bunch of uncaught semantic errors with coarray declarations. Add more tests, and clean up bad usage in existing tests. | 1 年前 | |
write semantics tests for CHANGE TEAM statement. Added semantics tests for aspects of CHANGE TEAM statements which are not duplicates from FORM TEAM statements. Reviewed By: ktras Differential Revision: https://reviews.llvm.org/D137908 | 3 年前 | |
write semantics tests for CHANGE TEAM statement. Added semantics tests for aspects of CHANGE TEAM statements which are not duplicates from FORM TEAM statements. Reviewed By: ktras Differential Revision: https://reviews.llvm.org/D137908 | 3 年前 | |
[flang] Enforce control flow restrictions on CHANGE TEAM (#131013) Like DO CONCURRENT and CRITICAL constructs, control flow into and out of a CHANGE TEAM construct is disallowed. | 1 年前 | |
[flang] Catch more semantic errors with coarrays (#125536) Detect and report a bunch of uncaught semantic errors with coarray declarations. Add more tests, and clean up bad usage in existing tests. | 1 年前 | |
[flang] Adding NOTIFY specifier in image selector and add notify type checks (#148810) This PR adds support for the NOTIFY specifier in the image selector as described in the 2023 standard, and add checks for the NOTIFY_TYPE type. | 9 个月前 | |
[flang] Emit error when a positional actual argument follows an argument with a keyword A positional (non-keyword) actual argument or alternate return label is not allowed to follow an actual argument with a keyword. Differential Revision: https://reviews.llvm.org/D146575 | 3 年前 | |
[flang] Emit error when a positional actual argument follows an argument with a keyword A positional (non-keyword) actual argument or alternate return label is not allowed to follow an actual argument with a keyword. Differential Revision: https://reviews.llvm.org/D146575 | 3 年前 | |
[flang] Emit error when a positional actual argument follows an argument with a keyword A positional (non-keyword) actual argument or alternate return label is not allowed to follow an actual argument with a keyword. Differential Revision: https://reviews.llvm.org/D146575 | 3 年前 | |
[flang] Emit error when a positional actual argument follows an argument with a keyword A positional (non-keyword) actual argument or alternate return label is not allowed to follow an actual argument with a keyword. Differential Revision: https://reviews.llvm.org/D146575 | 3 年前 | |
[flang] Define CO_REDUCE intrinsic procedure (#125115) Define the intrinsic CO_REDUCE and add semantic checks. A test was already present but was at XFAIL. It has been modified to take new messages into the output. | 1 年前 | |
[flang][intrinsic] restrict kind of get_command(_argument) to >= 2 (#139291) Previously the following program would have failed with a runtime assertion violation. This PR restricts the type information such that this assertion failure isn't reachable. The example below demonstrates the change. bash $ cat error.f90 integer (kind=1) :: i call get_command(length=i) print *, i end $ cat good.f90 integer (kind=2) :: i call get_command(length=i) print *, i end $ prior/flang error.f90 && ./a.out fatal Fortran runtime error(/home/akuhlenschmi/work/lorado/src/llvm-project/t.f90:2): Internal error: RUNTIME_CHECK(IsValidIntDescriptor(length)) failed at /home/akuhlenschmi/work/lorado/src/llvm-project/flang-rt/lib/runtime/command.cpp(154) Aborted (core dumped) $ prior/flang good.f90 && ./a.out 7 $ current/flang error.f90 && ./a.out error: Semantic errors in t.f90 ./t.f90:2:25: error: Actual argument for 'length=' has bad type or kind 'INTEGER(1)' call get_command(length=i) ^ $ current/flang good.f90 && ./a.out 7 Also while making the change, I noticed that "get_command_argument" suffers from the same issue, so I made a similar change for it. | 1 年前 | |
[flang] Ensure that portability warnings are conditional (#71857) 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. | 2 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[NFC][Py Reformat] Reformat python files in the rest of the dirs This is an ongoing series of commits that are reformatting our Python code. This catches the last of the python files to reformat. Since they where so few I bunched them together. Reformatting is done with black. If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run git checkout --ours <yourfile> and then reformat it with black. If you run into any problems, post to discourse about it and we will try to help. RFC Thread below: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Reviewed By: jhenderson, #libc, Mordante, sivachandra Differential Revision: https://reviews.llvm.org/D150784 | 3 年前 | |
[flang] Update the regression tests to use the new driver when enabled This patch updates most of the remaining regression tests (~400) to use flang-new rather then f18 when FLANG_BUILD_NEW_DRIVER is set. This allows us to share more Flang regression tests between f18 and flang-new. A handful of tests have not been ported yet - these are currently either failing or not supported by the new driver. Summary of changes: * RUN lines in tests are updated to use %flang_fc1 instead of %f18 * option spellings in tests are updated to forms accepted by both f18 and flang-new * variables in Bash scripts are renamed (e.g. F18 --> FLANG_FC1) The updated tests will now be run with the new driver, flang-new, whenever it is enabled (i.e when FLANG_BUILD_NEW_DRIVER is set). Although this patch touches many files, vast majority of the changes are automatic: grep -IEZlr "%f18" flang/test/ | xargs -0 -l sed -i 's/%f18/%flang_fc1/g Differential Revision: https://reviews.llvm.org/D100309 | 5 年前 | |
[flang] Improve error message on bad complex literal. (#124331) A complex literal constant can have one BOZ component, since the type and value of the literal can be determined by converting the BOZ value to the type of the other component. But a complex literal constant with two BOZ components doesn't have a well-defined type. The error message was confusing in the case; emit a better one. Fixes https://github.com/llvm/llvm-project/issues/124201. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Implemented a warning about contiguity of compile time constant values (#161084) Implemented common::UsageWarning::ConstantIsContiguous to warn about the following case: integer, parameter :: num = 3 integer, parameter :: arr(num)=[(i, i=1,num)] logical, parameter :: result=is_contiguous(arr(num:1:-1)) end Here, while array section is discontiguous, arr is a compile time constant, so array section created at compile time will end up being contiguous and result will be "true". If arr wasn't a constant, the result at runtime would have been "false". | 10 个月前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Improve contiguity checker for component references (#153222) Component references to array values had a couple of TODOs in the contiguity checker; implement them so that contiguity errors/warnings and code generation are more accurate. Specifically, "a(1:1)%b" is contiguous because there's a single element; "a(1:2)%b" is contiguous when the type of "a" has but a single component. The case of multiple components in the type is discontiguous when the array is known to have multiple elements. | 10 个月前 | |
[flang] Revamp evaluate::CoarrayRef (#136628) Bring the typed expression representation of a coindexed reference up to F'2023, which removed some restrictions that had allowed the current representation to suffice for older revisions of the language. This new representation is somewhat more simple -- it uses a DataRef as its base, so any subscripts in a part-ref can be represented as an ArrayRef there. Update the code that creates the CoarrayRef, and add more checking to it, as well as actually capturing any STAT=, TEAM=, & TEAM_NUMBER= specifiers that might appear. Enforce the constraint that the part-ref must have subscripts if it is an array. (And update a pile of copied-and-pasted test code that lacked such subscripts.) | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Catch more semantic errors with coarrays (#125536) Detect and report a bunch of uncaught semantic errors with coarray declarations. Add more tests, and clean up bad usage in existing tests. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[flang] Add two new semantics tests for critical-construct Add two new semantics tests for critical-construct that test addition standard conforming and non stardard conforming statements Reviewed By: ktras Differential Revision: https://reviews.llvm.org/D157521 | 2 年前 | |
[flang] Add two new semantics tests for critical-construct Add two new semantics tests for critical-construct that test addition standard conforming and non stardard conforming statements Reviewed By: ktras Differential Revision: https://reviews.llvm.org/D157521 | 2 年前 | |
[flang][OpenMP] Fix offsets for EQUIVALENCE in firstprivate(/block/) (#156492) When a common block appears in firstprivate, its contents become host associations, which the symbol offset computation code for equivalences wasn't expecting. Add a GetUltimate() call, and extend symbol dumping for HostAssocDetails. | 11 个月前 | |
[flang][cuda] Implicitly load cudadevice in host,device and grid_global procedures (#134905) | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
| 2 年前 | ||
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] CUDA Fortran - part 5/5: statement semantics Canonicalize !$CUF KERNEL DO loop nests, similar to OpenACC/OpenMP canonicalization. Check statements and expressions in device contexts for usage that isn't supported. Add more tests, and include some tweaks to standard modules needed to build CUDA Fortran modules. Depends on https://reviews.llvm.org/D150159, https://reviews.llvm.org/D150161, https://reviews.llvm.org/D150162, & https://reviews.llvm.org/D150163. Differential Revision: https://reviews.llvm.org/D150164 | 3 年前 | |
[flang] CUDA Fortran - part 5/5: statement semantics Canonicalize !$CUF KERNEL DO loop nests, similar to OpenACC/OpenMP canonicalization. Check statements and expressions in device contexts for usage that isn't supported. Add more tests, and include some tweaks to standard modules needed to build CUDA Fortran modules. Depends on https://reviews.llvm.org/D150159, https://reviews.llvm.org/D150161, https://reviews.llvm.org/D150162, & https://reviews.llvm.org/D150163. Differential Revision: https://reviews.llvm.org/D150164 | 3 年前 | |
[flang][cuda] Downgrade allocate pinned error to a warning (#121589) To be in accordance with the reference compiler. | 1 年前 | |
[flang] CUDA Fortran - part 3/5: declarations checking Implements checks for CUDA Fortran attributes on objects, types, and subprograms. Includes a couple downgrades of existing errors into warnings that were exposed during testing. Depends on https://reviews.llvm.org/D150159 & https://reviews.llvm.org/D150161. Differential Revision: https://reviews.llvm.org/D150162 | 3 年前 | |
[flang][cuda] Do not consider function result as host array (#164669) The function result in a device function is not a host array. Avoid triggering the error Host array 'res' cannot be present in device context for this. | 9 个月前 | |
[flang][cuda] Relax compatibility rules when host,device procedure is involved (#134926) Relax too restrictive rule for host, device procedure. | 1 年前 | |
[flang][CUDA] Apply intrinsic operator overrides (#151018) Fortran's intrinsic numeric and relational operators can be overridden with explicit interfaces so long as one or more of the dummy arguments have the DEVICE attribute. Semantics already allows this without complaint, but fails to replace the operations with the defined specific procedure calls when analyzing expressions. | 1 年前 | |
[flang][cuda] Relax semantic for device variable in block construct (#89330) | 2 年前 | |
[flang][cuda] Check for ignore_tkr(d) when resolving generic call (#131923) | 1 年前 | |
[flang][cuda] Extends matching distance computation (#91810) Extends the computation of the matching distance in the generic resolution to support options described in the table: https://docs.nvidia.com/hpc-sdk/archive/24.3/compilers/cuda-fortran-prog-guide/index.html#cfref-var-attr-unified-data Options are added as language features in the SemanticsContext and a flag is added in bbc for testing purpose. | 2 年前 | |
[flang][cuda] Extends matching distance computation (#91810) Extends the computation of the matching distance in the generic resolution to support options described in the table: https://docs.nvidia.com/hpc-sdk/archive/24.3/compilers/cuda-fortran-prog-guide/index.html#cfref-var-attr-unified-data Options are added as language features in the SemanticsContext and a flag is added in bbc for testing purpose. | 2 年前 | |
[flang] Refine checks for intrinsic operator conflicts with CUDA defi… (#94389) …ned operators The checks for conflicts between defined operators/assignments and the intrinsic operators/assignment need to take CUDA procedure and data attributes into account to avoid false positive error messages. | 2 年前 | |
[flang][cuda] Relax semanctic check in cuf kernel and openacc compute constructs (#125750) Previous patch was too restrictive and didn't take into account cuf kernels and openacc compute constructs as being device context. | 1 年前 | |
[flang][CUDA] Add error & warning for device argument first dimension… (#136058) … discontiguity For dummy assumed-shape/-rank device arrays, test the associated actual argument for stride-1 contiguity, and report an error when the actual argument is known to not be stride-1 contiguous and nonempty, or a warning when when the actual argument is not known to be empty or stride-1 contiguous. | 1 年前 | |
Skip contiguous check when ignore_tkr(c) is used (#138762) The point of ignore_tkr(c) is to ignore both contiguous warnings and errors for arguments of all attribute types. | 1 年前 | |
[flang] [cuda] Move SetImplicityCUDADevice after symbols in block construct are converted to objects (#143791) SetImplicitCUDADevice looks for symbol.has<ObjectEntityDetails>() to set the device attribute before symbols inside block constructs are converted to ObjectEntity. Fix is to move the call to SetImplicitCUDADevice after those symbols are converted. | 1 年前 | |
[flang][cuda] Add option to disable warp function in semantic (#143640) These functions are not available in some lower compute capabilities. Add option in the language feature to enforce the semantic check on these. | 1 年前 | |
[flang][cuda] Avoid I/O error in block inside a kernel (#160599) Make sure we get the program unit to check the device context. The scope would be the block otherwise. | 10 个月前 | |
[flang][CUDA] Downgrade error to warning (#161570) The compiler currently emit an error about the lack of an explicit procedure interface when an external procedure that is called via an implicit interface is known to have an dummy argument with a CUDA data attribute, even when the corresponding actual argument does have a CUDA data attribute. This behavior is inconsistent with what happens when such a call is to an external in another source file and its definition is not visible -- the compiler silently accepts an actual argument with a CUDA data attribute across the implicit interface. Harmonize this situation so that an actual argument with a CUDA data attribute in a reference to a procedure with an implicit interface elicits a usage warning encouraging the use of explicit interfaces. Only when the procedure's definition is visible, and incompatible, will an error message appear. | 10 个月前 | |
[flang] Ensure that DATA converter can cope with proc ptr error (#90973) Multiple definitions of a procedure pointer with DATA statements should elicit an error message, not a compiler crash. Fixes https://github.com/llvm/llvm-project/issues/90944. | 2 年前 | |
[flang] Accept structure constructor value for polymorphic component Semantic analysis was emitting a bogus error message when a structure constructor contains a monomorphic value for a (limited) polymorphic component of a derived type. The type compatibility test was too strict; this patch relaxes it a little to allow values that could be assigned or passed to a variable or dummy argument with that type. Also add some quotes to an error message that was sometimes confusing without them, and remove a repeated space character from another. Differential Revision: https://reviews.llvm.org/D119744 | 4 年前 | |
[flang] Catch more bad DATA statement objects The data statement variable checker is missing some cases, like expressions that are not variables. Run the checker first to enjoy its very specific error messages, but when it finds no problems, still apply a general check that an expression is a "variable" and also not a constant expression at the top level as a backstop. Differential Revision: https://reviews.llvm.org/D146580 | 3 年前 | |
[flang] Diagnose known out-of-range subscripts in more circumstances Semantics can catch out-of-range subscript values already when they appear in DATA statement objects and constant folding of name constant array indexing; this patch fills the gap by checking known constant subscript values in other contexts. Differential Revision: https://reviews.llvm.org/D142764 | 3 年前 | |
[flang] Disabling REAL kinds must also disable their COMPLEX (#131353) When disabling kinds of REAL in the TargetCharacteristics, one must also disable the corresponding kinds of COMPLEX. Fixes https://github.com/llvm/llvm-project/issues/131088. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Add target=sparc check for big endian (NFC) (#105854) | 1 年前 | |
[flang] Make the frontend driver error out when requesting multiple actions With this change, the following invocations will be treated as errors (multiple actions are specified): $ flang-new -fc1 -E -fsyntax-only file.95 $ flang-new -fc1 -fsyntax-only -fdebug-dump-symbols file.95 In the examples above it is not clear whether it is -fsyntax-only or the other action that is run (i.e. -E or -fdebug-dump-symbols). It makes sense to disallow such usage. This should also lead to cleaner and clearer tests (the RUN lines using %flang_fc1 will only allow one action). This change means that flang-new -fc1 and clang -cc1 will behave differently when multiple action options are specified. As frontend drivers are mostly used by compiler developers, this shouldn't affect or confuse the compiler end-users. Also, flang-new and clang remain consistent. Tests are updated accordingly. More specifically, I've made sure that every test specifies only one action. I've also taken the opportunity to simplify "multiple-input-files.f90" a bit. Differential Revision: https://reviews.llvm.org/D111781 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Ensure that portability warnings are conditional (#71857) 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. | 2 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Set SAVE attribute for EQUIVALENCEd symbols consistently. (#67078) Example: subroutine global_sub() integer, dimension(4) :: iarr4=(/1,2,3,4/) integer, dimension(4) :: jarr4 equivalence(iarr4,jarr4) call sub1 print *, iarr4 contains subroutine sub1 iarr4=jarr4((/4:1:-1/)) end subroutine sub1 end subroutine global_sub iarr4 and jarr4 are equivalenced via a global aggregate storage, but the references inside sub1 are lowered differently. iarr4 is accessed via the global aggregate storage, while jarr4 is accessed via the argument tuple. This confuses the FIR alias analysis, that claims that a host associated entity cannot alias with a global (if they have different source and do not have Target/Pointer attributes deduced by the alias analysis). I am not convinced that there is an issue in the alias analysis yet. I think we'd better lower the accesses uniformly, i.e. if one variable from an equivalence is lowered via the global aggregate storage, then any other variable from this equivalence should be lowered the same way (even if they are used via host association). This patch makes sure that all symbols from an EQUIVALENCE get and implicit SAVE attribute, if they do not have it already and any symbol from the EQUIVALENCE is SAVEd (explicitly or implicitly). This makes the further lowering consistent. | 2 年前 | |
[flang] Ensure that portability warnings are conditional (#71857) 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. | 2 年前 | |
[flang] Extension: initialization of LOGICAL with INTEGER & vice versa We already accept assignments of INTEGER to LOGICAL (& vice versa) as an extension, but not initialization. Extend initialization to cover those cases. (Also fix misspelling in nearby comment as suggested by code reviewer.) Decouple an inadvertent dependence cycle by moving two one-line function definitions into a header file. Differential Revision: https://reviews.llvm.org/D117159 | 4 年前 | |
[flang] Correct IsHostAssociated() to be true for BLOCK constructs The predicate IsHostAssocited() was implemented in a way that would return true only for cases of host association into a module or inner subprogram. Technically, the use of a name in a BLOCK construct that is not declared therein is considered in the Fortran standard to also be a form of host association, and this matters when doing error checking on DATA statements. Differential Revision: https://reviews.llvm.org/D130388 | 3 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Prioritize DATA object error messages a little better (#66258) When a DATA statement object is not valid, there's a number of possible reasons. Emit an error message for the most egregious violation, so that an unlucky user doesn't fix something easy (due to a less-severe error message masking one that is worse) and then run into something that might be more serious. | 2 年前 | |
[flang] Make NULL() initializers explicit for allocatables in DATA co… (#69753) …nversion As requested by people working on lowering: when semantics converts the contents of DATA statements into explicit object initializers, ensure that structure constructors for derived types contain explicit NULL() values for their allocatable components. | 2 年前 | |
[flang] Make NULL() initializers explicit for allocatables in DATA co… (#69753) …nversion As requested by people working on lowering: when semantics converts the contents of DATA statements into explicit object initializers, ensure that structure constructors for derived types contain explicit NULL() values for their allocatable components. | 2 年前 | |
[flang] Process legacy DATA-style /initializers/ sooner (#162722) The compiler can't defer the conversion of legacy DATA-style /initializers/ in component declarations to their init() expressions to the general DATA statement conversion pass, since default component values must be present during structure constructor analysis. So move their conversions into name resolution and handle them at the same times as standard '=' initializers are processed. Avoid any potential problems with type parameters being used as repetition counts or values by disallowing legacy DATA-style initializers in PDTs. Fixes https://github.com/llvm/llvm-project/issues/161989. | 9 个月前 | |
[flang] Ensure names resolve in DATA statement objects (#82825) When DATA statement objects have derived types obtained by implicit typing rules, their types aren't known until specification part processing is complete. In the case of a derived type, any component name in a designator may still be in need of name resolution. Take care of it in the deferred check visitor that runs at the end of name resolution in each specification and execution part. Fixes https://github.com/llvm/llvm-project/issues/82069. | 2 年前 | |
[flang] Ensure that DATA converter can cope with proc ptr error (#90973) Multiple definitions of a procedure pointer with DATA statements should elicit an error message, not a compiler crash. Fixes https://github.com/llvm/llvm-project/issues/90944. | 2 年前 | |
[flang] Handle DATA-style default component /inits/ in time (#159469) DEC-style default component initializers that use DATA statement syntax aren't processed until DATA statement values are converted into init() expressions in the symbol table. Part of that conversion process involves combining storage-associated (EQUIVALENCE) symbols with compiler-generated symbols with initialization when the associated symbols have initialization, and part of that process involves the application of default component initializers; so we need to make sure that they've already been processed. (Fixes Fujitsu Fortran test 0633_0004.f.) | 10 个月前 | |
[flang] Enforce rest of semantic constraint C919 A reference to an allocatable or pointer component must be applied to a scalar base object. (This is the second part of constraint C919; the first part is already checked.) Differential Revision: https://reviews.llvm.org/D112241 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Enforce C955 on DEALLOCATE (#129788) Constraint C955 in F'2023 prohibits an allocate-object from being coindexed. We catch this on ALLOCATE statements but missed it on DEALLOCATE. | 1 年前 | |
[flang] Apply definability checks in ALLOCATE/DEALLOCATE statements The pointers and allocatables that appear in ALLOCATE and DEALLOCATE statements need to be subject to the general definability checks so that problems with e.g. PROTECTED objects can be caught. (Also: regularize the capitalization of the DEALLOCATE error messages while I'm in here so that they're consistent with the messages that can come out for ALLOCATE.) Differential Revision: https://reviews.llvm.org/D140149 | 3 年前 | |
[flang] Fix spurious error on defined assignment in PURE (#139186) An assignment to a whole polymorphic object in a PURE subprogram that is implemented by means of a defined assignment procedure shouldn't be subjected to the same definability checks as it would be for an intrinsic assignment (which would also require it to be allocatable). Fixes https://github.com/llvm/llvm-project/issues/139129. | 1 年前 | |
[flang] Consolidate & clean up COMMON block checks (#161286) COMMON block checks are split between name resolution and declaration checking. We generally want declaration checks to take place after name resolution, and the COMMON block checks that are currently in name resolution have some derived type analyses that are redundant with the derived type component iteration framework used elsewhere in semantics. So move as much as possible into declaration checking, use the component iteration framework, and cope with the missing COMMON block name case that arises with blank COMMON when placing the error messages. | 10 个月前 | |
[flang] Allow interoperable object to have interoperable derived type… (#94768) … that's not BIND(C) An interoperable BIND(C) object with a derived type should have a BIND(C) derived type, but will now work with a derived type that satisfies all of the requirements of a BIND(C) derived type. | 2 年前 | |
[flang] Silence spurious error (#106086) Don't attempt to give an object a default binding label when it shows up in a declaration after it has already been given an explicit binding label in an earlier declaration. Fixes https://github.com/llvm/llvm-project/issues/106019. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Fix bogus error message about invalid polymorphic entity (#83733) The check for declarations of polymorphic entities was emitting a bogus error for one (or more) layers of pointers to procedures returning pointers to polymorphic types. Fixes https://github.com/llvm/llvm-project/issues/83292. | 2 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Consolidate & clean up COMMON block checks (#161286) COMMON block checks are split between name resolution and declaration checking. We generally want declaration checks to take place after name resolution, and the COMMON block checks that are currently in name resolution have some derived type analyses that are redundant with the derived type component iteration framework used elsewhere in semantics. So move as much as possible into declaration checking, use the component iteration framework, and cope with the missing COMMON block name case that arises with blank COMMON when placing the error messages. | 10 个月前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Accept proc ptr function result as actual argument without IN… (#128771) …TENT A dummy procedure pointer with no INTENT attribute may associate with an actual argument that is the result of a reference to a function that returns a procedure pointer, we think. Fixes https://github.com/llvm/llvm-project/issues/126950. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Check that DO index variables are definable We're letting immutable objects appear as DO index variables; catch and diagnose this error. Differential Revision: https://reviews.llvm.org/D142767 | 3 年前 | |
[flang] Pointers returned from functions are not definable as pointers A reference to a pointer-valued function is a "variable" in the argot of the Fortran standard, and can be the left-hand side of an assignment statement or passed as a definable actual argument -- but it is not a definable pointer, and cannot be associated with a pointer dummy argument that is not INTENT(IN). Differential Revision: https://reviews.llvm.org/D143827 | 3 年前 | |
[flang] CUDA Fortran - part 4/5: definability and characteristics Extend the definability and procedure characteristics checking infrastructure in semantics to check for context-dependent CUDA object definability violations and problems with CUDA attribute incompatibility in procedure interfaces. Depends on https://reviews.llvm.org/D150159, https://reviews.llvm.org/D150161, & https://reviews.llvm.org/D150162. Differential Revision: https://reviews.llvm.org/D150163 | 3 年前 | |
[flang] Emit errors on vector subscripts with duplicated elements when object must be definable When the left-hand side of an assignment, or any other context demanding definability, comprises a designator with a vector subscript that is known at compilation time to have one or more duplicated elements, emit an error message. Differential Revision: https://reviews.llvm.org/D155492 | 3 年前 | |
[flang] Check I/O implied DO indices better (#159150) We're not checking READ statement implied DO index variables at all, and we're not checking them for definability. | 10 个月前 | |
[flang] Parenthesize RHS arguments to defined assignments (bug #62599) The right-hand sides of assignment statements are always expressions, never variables. When an assignment statement is converted into a call to a defined assignment subroutine, and the actual argument being associated with the second dummy argument is a variable, and the dummy argument does not have the VALUE attribute, wrap it with parentheses so that lowering will pass it by means of a temporary. Fixes https://github.com/llvm/llvm-project/issues/62599. Differential Revision: https://reviews.llvm.org/D150331 | 3 年前 | |
[flang] Support DFLOAT legacy extension intrinsic function Like the similar legacy extension FLOAT(), DFLOAT() represents a conversion from default integer to DOUBLE PRECISION. Rewrite into a conversion operation. Differential Revision: https://reviews.llvm.org/D107489 | 4 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Catch more semantic errors with coarrays (#125536) Detect and report a bunch of uncaught semantic errors with coarray declarations. Add more tests, and clean up bad usage in existing tests. | 1 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[flang] Refine handling of SELECT TYPE associations in analyses (#128935) A few bits of semantic checking need a variant of the ResolveAssociations utility function that stops when hitting a construct entity for a type or class guard. This is necessary for cases like the bug below where the analysis is concerned with the type of the name in context, rather than its shape or storage or whatever. So add a flag to ResolveAssociations and GetAssociationRoot to make this happen, and use it at the appropriate call sites. Fixes https://github.com/llvm/llvm-project/issues/128608. | 1 年前 | |
[flang] Catch impure specifics called in DO CONCURRENT Rework the code used to check for calls to impure procedures in DO CONCURRENT constructs. The current code wasn't checking the representation of the procedure references in the strongly typed expressions, so it was missing calls to impure subprograms made via generic interfaces. While here, improve error messages, and fix some minor issues exposed by testing the improved checks. Differential Revision: https://reviews.llvm.org/D155489 | 3 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Fix construct names on labeled DO (#67622) Fortran requires that a DO construct with a construct name end with an END DO statement bearing the same name. This is true even if the DO construct begins with a label DO statement; e.g., "constrName: do 10 j=1,10" must end with "10 end do constrName". The compiler presently basically ignores construct names that appear on label DO statements, because only non-label DO statements can be parsed as DO constructs. This causes us to miss some errors, and (worse) breaks the usage of the construct name on CYCLE and EXIT statements. To fix this, this patch changes the parse tree and parser so that a DO construct name on a putative label DO statement causes it to be parsed as a "non-label" DO statement... with a label. Only true old-style labeled DO statements without construct names are now parsed as such. I did not change the class name NonLabelDoStmt -- it's widely used across the front-end, and is the name of a production in the standard's grammar. But now it basically means DoConstructDoStmt. Fixes https://github.com/llvm/llvm-project/issues/67283. | 2 年前 | |
[flang] Fix construct names on labeled DO (#67622) Fortran requires that a DO construct with a construct name end with an END DO statement bearing the same name. This is true even if the DO construct begins with a label DO statement; e.g., "constrName: do 10 j=1,10" must end with "10 end do constrName". The compiler presently basically ignores construct names that appear on label DO statements, because only non-label DO statements can be parsed as DO constructs. This causes us to miss some errors, and (worse) breaks the usage of the construct name on CYCLE and EXIT statements. To fix this, this patch changes the parse tree and parser so that a DO construct name on a putative label DO statement causes it to be parsed as a "non-label" DO statement... with a label. Only true old-style labeled DO statements without construct names are now parsed as such. I did not change the class name NonLabelDoStmt -- it's widely used across the front-end, and is the name of a production in the standard's grammar. But now it basically means DoConstructDoStmt. Fixes https://github.com/llvm/llvm-project/issues/67283. | 2 年前 | |
[flang][semantics] make sure dynamic type inquiry functions take extensible or unlimited polymorphic types (#162931) Adds error message when type is derived but not extensible and more detailed error message when the type doesn't match. fixes [#162712](https://github.com/llvm/llvm-project/issues/162712) | 9 个月前 | |
[flang] Enforce F'2023 C15121 (#94418) No specification expression in the declaration of the result variable of an elemental function may depend on the value of a dummy argument. This ensures that all of the results have the same type when the elemental function is applied to the elements of an array. | 2 年前 | |
[flang] Catch whole assumed-size array passed to elemental (#108239) A whole assumed-size array is not a valid argument to an elemental procedure (intrinsic or otherwise). | 1 年前 | |
[flang] Catch attempts to use assumed-rank as elemental argument (#159852) An assumed-rank array may not be used as an argument to an elemental procedure. Fixes https://github.com/llvm/llvm-project/issues/159555. | 10 个月前 | |
[flang] Update the regression tests to use the new driver when enabled This patch updates most of the remaining regression tests (~400) to use flang-new rather then f18 when FLANG_BUILD_NEW_DRIVER is set. This allows us to share more Flang regression tests between f18 and flang-new. A handful of tests have not been ported yet - these are currently either failing or not supported by the new driver. Summary of changes: * RUN lines in tests are updated to use %flang_fc1 instead of %f18 * option spellings in tests are updated to forms accepted by both f18 and flang-new * variables in Bash scripts are renamed (e.g. F18 --> FLANG_FC1) The updated tests will now be run with the new driver, flang-new, whenever it is enabled (i.e when FLANG_BUILD_NEW_DRIVER is set). Although this patch touches many files, vast majority of the changes are automatic: grep -IEZlr "%f18" flang/test/ | xargs -0 -l sed -i 's/%f18/%flang_fc1/g Differential Revision: https://reviews.llvm.org/D100309 | 5 年前 | |
[flang] Always check procedure characterizability (#92008) When a procedure is defined with a subprogram but never referenced in a compilation unit, it may not be characterized until lowering, and any errors in characterization then may crash the compiler. So always ensure that procedure definitions are characterizable in declaration checking. Fixes https://github.com/llvm/llvm-project/issues/91845. | 2 年前 | |
[flang] Move EQUIVALENCE object checking to check-declarations.cpp (#91259) Move EQUIVALENCE object checking from resolve-names-utils.cpp to check-declarations.cpp, where it can work on fully resolved symbols and reduce clutter in name resolution. Add a check for EQUIVALENCE objects that are not ObjectEntityDetails symbols so that attempts to equivalence a procedure are caught. | 2 年前 | |
[flang] Define ERF, ERFC and ERFC_SCALED intrinsics with Q and D prefix (#125217) ERF, ERFC and ERFC_SCALED intrinsics prefixed by Q and D are missing. Codes such as CP2K(https://github.com/cp2k/cp2k) and TurboRVB(https://github.com/sissaschool/turborvb) use these intrinsics just like defined in the GNU standard and here: https://www.ibm.com/docs/fr/xl-fortran-aix/16.1.0?topic=reference-intrinsic-procedures These intrinsics are based on the existing intrinsics but apply a restriction on the type kind. - DERF, DERFC and DERFC_SCALED are for double précision only. - QERF, QERFC and QERFC_SCALED are for quad précision only. | 1 年前 | |
[flang] Define ERF, ERFC and ERFC_SCALED intrinsics with Q and D prefix (#125217) ERF, ERFC and ERFC_SCALED intrinsics prefixed by Q and D are missing. Codes such as CP2K(https://github.com/cp2k/cp2k) and TurboRVB(https://github.com/sissaschool/turborvb) use these intrinsics just like defined in the GNU standard and here: https://www.ibm.com/docs/fr/xl-fortran-aix/16.1.0?topic=reference-intrinsic-procedures These intrinsics are based on the existing intrinsics but apply a restriction on the type kind. - DERF, DERFC and DERFC_SCALED are for double précision only. - QERF, QERFC and QERFC_SCALED are for quad précision only. | 1 年前 | |
[flang] Define ERF, ERFC and ERFC_SCALED intrinsics with Q and D prefix (#125217) ERF, ERFC and ERFC_SCALED intrinsics prefixed by Q and D are missing. Codes such as CP2K(https://github.com/cp2k/cp2k) and TurboRVB(https://github.com/sissaschool/turborvb) use these intrinsics just like defined in the GNU standard and here: https://www.ibm.com/docs/fr/xl-fortran-aix/16.1.0?topic=reference-intrinsic-procedures These intrinsics are based on the existing intrinsics but apply a restriction on the type kind. - DERF, DERFC and DERFC_SCALED are for double précision only. - QERF, QERFC and QERFC_SCALED are for quad précision only. | 1 年前 | |
[flang] Improve syntax error messages by fixing withMessage() parser combinator The parser combinator withMessage("error message"_err_en_US, PARSER) is meant to run the parser PARSER and, if it fails, override its error messages if it failed silently or it was unable to recognize any tokens at all. This gives the parser a way to avoid emitting some confusing or missing error messages. Unfortunately, the implementation could sometimes lose track of whether any tokens had been recognized, leading to problems with outer usage of withMessage() and also -- more seriously -- with ParseState::CombineFailedParses(). That's a utility that determines which error messages to retain when two or more parsers have been attempted at the same starting point and none of them succceed. Its policy is to retain the state from the parser that consumed the most input text before failing, so long as it had recognized at least one token. So anyway, fix up withMessage(), adjust the tests, and add a test of the original motivating confusing error situation, in which a syntax error in a COMMON statement was being diagnosed as a problem with a statement function definition because withMessage() had lost the fact that the parse of the COMMON statement had recognized some tokens, and the last attempted parse later was a failed attempt to parse a statement function. Differential Revision: https://reviews.llvm.org/D135216 | 3 年前 | |
[flang] Revamp evaluate::CoarrayRef (#136628) Bring the typed expression representation of a coindexed reference up to F'2023, which removed some restrictions that had allowed the current representation to suffice for older revisions of the language. This new representation is somewhat more simple -- it uses a DataRef as its base, so any subscripts in a part-ref can be represented as an ArrayRef there. Update the code that creates the CoarrayRef, and add more checking to it, as well as actually capturing any STAT=, TEAM=, & TEAM_NUMBER= specifiers that might appear. Enforce the constraint that the part-ref must have subscripts if it is an array. (And update a pile of copied-and-pasted test code that lacked such subscripts.) | 1 年前 | |
[reland][flang] Add ETIME runtime and lowering intrinsics implementation (#92571) This is same as https://github.com/llvm/llvm-project/pull/90578 with an added fix. This PR updated tests of etime intrinsic due to Lowering changes for assigning dummy_scope to hlfir.declare. Referring to https://github.com/llvm/llvm-project/pull/92472 and https://github.com/llvm/llvm-project/pull/90989 | 2 年前 | |
[flang] Split up synchronization, event, and error stop stmt tests Splitting up the tests for the synchronization statements, event statements, and error stop statement allow for some of the errors which are hidden by other errors, to be caught in the test. This then reveals which invalid code does produce errors and which does not produce errors. | 3 年前 | |
[flang] Revamp evaluate::CoarrayRef (#136628) Bring the typed expression representation of a coindexed reference up to F'2023, which removed some restrictions that had allowed the current representation to suffice for older revisions of the language. This new representation is somewhat more simple -- it uses a DataRef as its base, so any subscripts in a part-ref can be represented as an ArrayRef there. Update the code that creates the CoarrayRef, and add more checking to it, as well as actually capturing any STAT=, TEAM=, & TEAM_NUMBER= specifiers that might appear. Enforce the constraint that the part-ref must have subscripts if it is an array. (And update a pile of copied-and-pasted test code that lacked such subscripts.) | 1 年前 | |
[flang] Split up synchronization, event, and error stop stmt tests Splitting up the tests for the synchronization statements, event statements, and error stop statement allow for some of the errors which are hidden by other errors, to be caught in the test. This then reveals which invalid code does produce errors and which does not produce errors. | 3 年前 | |
[flang] Dig deeper to find more EVENT_TYPE/LOCK_TYPE misuse (#130687) Only objects may have these types, or have potential subobject components with these types. | 1 年前 | |
[flang] Recognize and check EVENT_QUERY (#123429) Recognize the intrinsic subroutine EVENT_QUERY and enforce semantic requirements on calls to it. | 1 年前 | |
Apply kind code check on exitstat and cmdstat (#78286) When testing on gcc, both exitstat and cmdstat must be a kind=4 integer, e.g. DefaultInt. This patch changes the input arg requirement from AnyInt to TypePattern{IntType, KindCode::greaterOrEqualToKind, n}. The standard stated in 16.9.73 - EXITSTAT (optional) shall be a scalar of type integer with a decimal exponent range of at least nine. - CMDSTAT (optional) shall be a scalar of type integer with a decimal exponent range of at least four. fortran program bug implicit none integer(kind = 2) :: exitstatvar integer(kind = 4) :: cmdstatvar character(len=256) :: msg character(len=:), allocatable :: command command='echo hello' call execute_command_line(command, exitstat=exitstatvar, cmdstat=cmdstatvar) end program When testing the above program with exitstatvar kind<4, an error would occur: $ ../build-release/bin/flang-new test.f90 error: Semantic errors in test.f90 ./test.f90:8:47: error: Actual argument for 'exitstat=' has bad type or kind 'INTEGER(2)' call execute_command_line(command, exitstat=exitstatvar) When testing the above program with exitstatvar kind<2, an error would occur: $ ../build-release/bin/flang-new test.f90 error: Semantic errors in test.f90 ./test.f90:8:47: error: Actual argument for 'cmdstat=' has bad type or kind 'INTEGER(1)' call execute_command_line(command, cmdstat=cmdstatvar) Test file for this semantics has been added to flang/test/Semantic Fixes: https://github.com/llvm/llvm-project/issues/77990 | 2 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Enforce specification function rules on callee, not call A function can't be a specification function if it has a dummy procedure argument, even if it's optional and unused. So don't check the reference for actual procedure arguments, but rather the characteristics of the function. Differential Revision: https://reviews.llvm.org/D109935 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Add semantic check for multiple part-ref with non-zero rank This patch is to diagnose the case when a type bound procedure is passed as an actual procedure argument. call sub0(t%t3%t2%t%info1) Fix: https://github.com/llvm/llvm-project/issues/55826 Committed on behalf of DanielCChen Differential Revision: https://reviews.llvm.org/D141506 | 3 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Add failed_images to list of intrinsics and add test Add failed_images to the list of intrinsic functions. Add a semantics test for failed_images. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D126805 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Fix bogus warning about missing FINAL on assumed-rank (#66250) The warning message about a derived type not having a FINAL subroutine for a particular object's rank should not issue for an assumed-rank dummy argument. | 2 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Catch more semantic errors with coarrays (#125536) Detect and report a bunch of uncaught semantic errors with coarray declarations. Add more tests, and clean up bad usage in existing tests. | 1 年前 | |
[flang] Complete semantic checks for FORM TEAM (#131022) Add remaining checking for the FORM TEAM statement, complete and enable a test. | 1 年前 | |
[flang] Complete semantic checks for FORM TEAM (#131022) Add remaining checking for the FORM TEAM statement, complete and enable a test. | 1 年前 | |
[flang] Add MALLOC and FREE intrinsics for Cray pointers (#110018) MALLOC and FREE are extensions provided by gfortran, Intel Fortran and classic flang to allocate memory for Cray pointers. These are used in some legacy codes such as libexodus. All the above compilers accept using MALLOC and FREE with integers as well, despite that this will often signify a bug in user code. We should accept the same as the other compilers for compatibility. | 1 年前 | |
[flang] Catch function result that is non-pointer procedure (#164664) A function result that is a procedure must be a procedure pointer. | 9 个月前 | |
[flang][semantics] fix issue with equality of min/max in module files (#145824) Convert all binary calls of min/max to extremum operations, so that extremums generated by the compiler compare equal, and user min/max calls also compare equal. Fixes #133646 Originally opened as #144162 but I accidentally pushed a merge in such a way that a bunch of code owners got added to the review. This is just rebasing the original work on main and fixing the failing tests. | 1 年前 | |
[flang] More information on generic resolution failures (#164738) When a generic procedure reference does not match any of its specific procedures, run through them and emit the errors for each attempted match, so that the user has more information to resolve the problem by adjusting the actual arguments. | 9 个月前 | |
[flang] Clarify edge case of host association and generic interfaces Name resolution was mishandling cases of generic interfaces and specific procedures (sometimes complicatd by use of the same name for each) when the specific procedure was accessed by means of host association; only the scope of the generic interface definition was searched for the specific procedure. Also search enclosing scopes in the usual way. Differential Revision: https://reviews.llvm.org/D135213 | 3 年前 | |
[flang] Catch attempt to misuse an abstract procedure in a generic interface A procedure defined in an ABSTRACT INTERFACE may not appear as a specific procedure in a generic interface. Differential Revision: https://reviews.llvm.org/D145102 | 3 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Warn about defined operator with too few/many dummy arguments A function in a defined operator generic interface will syntactically have one or two arguments. If a defined operator includes a specific function with 0 or more than 2 dummy arguments, there's no way that it could be invoked by way of the interface. Emit a warning. Differential Revision: https://reviews.llvm.org/D142762 | 3 年前 | |
[flang] Restore error status for many indistinguishable specifics (#79927) A recent patch to allow pFUnit to compile softened the diagnostic about indistinguishable specific procedures to a portability warning. It turns out that this was overkill -- for specific procedures containing no optional or unlimited polymorphic dummy data arguments, a diagnosis of "indistinguishable" can still be a hard error. So adjust the analysis to be tri-state: two procedures are either definitely distinguishable, definitely indistinguishable without optionals or unlimited polymorphics, or indeterminate. Emit errors as before for the definitely indistinguishable cases; continue to emit portability warnings for the indeterminate cases. When this patch is merged, all but one of the dozen or so tests that I disabled in llvm-test-suite can be re-enabled. | 2 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Catch type-bound generic with inherited indistinguishable spe… (#128980) …cific When checking generic procedures for indistinguishable specific procedures, don't neglect to include specific procedures from any accessible instance of the generic procedure inherited from its parent type.. Fixes https://github.com/llvm/llvm-project/issues/128760. | 1 年前 | |
[flang] Prevent bad expression rewrite 0*ARR -> 0 (#79853) Don't rewrite 0*X to 0 if X is not scalar. Up until now this hasn't shown up as a bug because a scalar 0 works in nearly all expressions where an array would be expected. But not in all cases -- this bad rewrite can cause generic procedure resolution to fail when it causes an actual argument to have an unsupported rank. | 2 年前 | |
[flang] Acknowledge non-enforcement of C7108 (#139169) Fortran 2023 constraint C7108 prohibits the use of a structure constructor in a way that is ambiguous with a generic function reference (intrinsic or user-defined). Sadly, no Fortran compiler implements this constraint, and the common portable interpretation seems to be the generic resolution, not the structure constructor. Restructure the processing of structure constructors in expression analysis so that it can be driven both from the parse tree as well as from generic resolution, and then use it to detect ambigous structure constructor / generic function cases, so that a portability warning can be issued. And document this as a new intentional violation of the standard in Extensions.md. Fixes https://github.com/llvm/llvm-project/issues/138807. | 1 年前 | |
[flang] Fix error from semantics on use associated procedure pointer (#107928) Use associated procedure pointers were eliciting bogus errors from semantics if their modules also contained generic procedure interfaces of the same name. (The compiler handles this case correctly when the specific procedure of the same name is not a pointer.) With this fix, the test case in https://github.com/llvm/llvm-project/issues/107784 no longer experiences semantic errors; however, it now crashes unexpectedly in lowering. | 1 年前 | |
[flang] Fix generic resolution with actual/dummy procedure incompatib… (#120105) …ility We generally allow any legal procedure pointer target as an actual argument for association with a dummy procedure, since many actual procedures are underspecified EXTERNALs. But for proper generic resolution, it is necessary to disallow incompatible functions with explicit result types. Fixes https://github.com/llvm/llvm-project/issues/119151. | 1 年前 | |
[flang] Fix spurious error message due to inaccessible generic binding (#122810) Generic operator/assignment checks for distinguishable specific procedures must ignore inaccessible generic bindings. Fixes https://github.com/llvm/llvm-project/issues/122764. | 1 年前 | |
[flang] Refine checking of type-bound generics (#129292) I merged a patch yesterday (https://github.com/llvm/llvm-project/pull/128980) that strengthened error detection of indistinguishable specific procedures in a type-bound generic procedure, and broke a couple of tests. Refine the check so that it doesn't flag valid cases of overridden bindings, and add a thorough test with all of the boundary cases that I can think of. | 1 年前 | |
[flang] Add default component initialization to some built-in types (#121416) The standard requires EVENT_TYPE, LOCK_TYPE, NOTIFY_TYPE, and TEAM_TYPE to have full default initialization for their nonallocatable private components. | 1 年前 | |
[flang] Add GETCWD runtime and lowering intrinsics implementation (#92746) This patch add support of intrinsics GNU extension GETCWD https://github.com/llvm/llvm-project/issues/84203. Some usage info and example has been added to flang/docs/Intrinsics.md. The patch contains both the lowering and the runtime code and works on both Windows and Linux. | System | Implmentation | |-----------|--------------------| | Windows | _getcwd | | Linux |getcwd | | 2 年前 | |
[flang] Make the frontend driver error out when requesting multiple actions With this change, the following invocations will be treated as errors (multiple actions are specified): $ flang-new -fc1 -E -fsyntax-only file.95 $ flang-new -fc1 -fsyntax-only -fdebug-dump-symbols file.95 In the examples above it is not clear whether it is -fsyntax-only or the other action that is run (i.e. -E or -fdebug-dump-symbols). It makes sense to disallow such usage. This should also lead to cleaner and clearer tests (the RUN lines using %flang_fc1 will only allow one action). This change means that flang-new -fc1 and clang -cc1 will behave differently when multiple action options are specified. As frontend drivers are mostly used by compiler developers, this shouldn't affect or confuse the compiler end-users. Also, flang-new and clang remain consistent. Tests are updated accordingly. More specifically, I've made sure that every test specifies only one action. I've also taken the opportunity to simplify "multiple-input-files.f90" a bit. Differential Revision: https://reviews.llvm.org/D111781 | 4 年前 | |
[flang] Make the frontend driver error out when requesting multiple actions With this change, the following invocations will be treated as errors (multiple actions are specified): $ flang-new -fc1 -E -fsyntax-only file.95 $ flang-new -fc1 -fsyntax-only -fdebug-dump-symbols file.95 In the examples above it is not clear whether it is -fsyntax-only or the other action that is run (i.e. -E or -fdebug-dump-symbols). It makes sense to disallow such usage. This should also lead to cleaner and clearer tests (the RUN lines using %flang_fc1 will only allow one action). This change means that flang-new -fc1 and clang -cc1 will behave differently when multiple action options are specified. As frontend drivers are mostly used by compiler developers, this shouldn't affect or confuse the compiler end-users. Also, flang-new and clang remain consistent. Tests are updated accordingly. More specifically, I've made sure that every test specifies only one action. I've also taken the opportunity to simplify "multiple-input-files.f90" a bit. Differential Revision: https://reviews.llvm.org/D111781 | 4 年前 | |
[flang] Make the frontend driver error out when requesting multiple actions With this change, the following invocations will be treated as errors (multiple actions are specified): $ flang-new -fc1 -E -fsyntax-only file.95 $ flang-new -fc1 -fsyntax-only -fdebug-dump-symbols file.95 In the examples above it is not clear whether it is -fsyntax-only or the other action that is run (i.e. -E or -fdebug-dump-symbols). It makes sense to disallow such usage. This should also lead to cleaner and clearer tests (the RUN lines using %flang_fc1 will only allow one action). This change means that flang-new -fc1 and clang -cc1 will behave differently when multiple action options are specified. As frontend drivers are mostly used by compiler developers, this shouldn't affect or confuse the compiler end-users. Also, flang-new and clang remain consistent. Tests are updated accordingly. More specifically, I've made sure that every test specifies only one action. I've also taken the opportunity to simplify "multiple-input-files.f90" a bit. Differential Revision: https://reviews.llvm.org/D111781 | 4 年前 | |
[flang] Make the frontend driver error out when requesting multiple actions With this change, the following invocations will be treated as errors (multiple actions are specified): $ flang-new -fc1 -E -fsyntax-only file.95 $ flang-new -fc1 -fsyntax-only -fdebug-dump-symbols file.95 In the examples above it is not clear whether it is -fsyntax-only or the other action that is run (i.e. -E or -fdebug-dump-symbols). It makes sense to disallow such usage. This should also lead to cleaner and clearer tests (the RUN lines using %flang_fc1 will only allow one action). This change means that flang-new -fc1 and clang -cc1 will behave differently when multiple action options are specified. As frontend drivers are mostly used by compiler developers, this shouldn't affect or confuse the compiler end-users. Also, flang-new and clang remain consistent. Tests are updated accordingly. More specifically, I've made sure that every test specifies only one action. I've also taken the opportunity to simplify "multiple-input-files.f90" a bit. Differential Revision: https://reviews.llvm.org/D111781 | 4 年前 | |
[flang] Make the frontend driver error out when requesting multiple actions With this change, the following invocations will be treated as errors (multiple actions are specified): $ flang-new -fc1 -E -fsyntax-only file.95 $ flang-new -fc1 -fsyntax-only -fdebug-dump-symbols file.95 In the examples above it is not clear whether it is -fsyntax-only or the other action that is run (i.e. -E or -fdebug-dump-symbols). It makes sense to disallow such usage. This should also lead to cleaner and clearer tests (the RUN lines using %flang_fc1 will only allow one action). This change means that flang-new -fc1 and clang -cc1 will behave differently when multiple action options are specified. As frontend drivers are mostly used by compiler developers, this shouldn't affect or confuse the compiler end-users. Also, flang-new and clang remain consistent. Tests are updated accordingly. More specifically, I've made sure that every test specifies only one action. I've also taken the opportunity to simplify "multiple-input-files.f90" a bit. Differential Revision: https://reviews.llvm.org/D111781 | 4 年前 | |
[flang] Make the frontend driver error out when requesting multiple actions With this change, the following invocations will be treated as errors (multiple actions are specified): $ flang-new -fc1 -E -fsyntax-only file.95 $ flang-new -fc1 -fsyntax-only -fdebug-dump-symbols file.95 In the examples above it is not clear whether it is -fsyntax-only or the other action that is run (i.e. -E or -fdebug-dump-symbols). It makes sense to disallow such usage. This should also lead to cleaner and clearer tests (the RUN lines using %flang_fc1 will only allow one action). This change means that flang-new -fc1 and clang -cc1 will behave differently when multiple action options are specified. As frontend drivers are mostly used by compiler developers, this shouldn't affect or confuse the compiler end-users. Also, flang-new and clang remain consistent. Tests are updated accordingly. More specifically, I've made sure that every test specifies only one action. I've also taken the opportunity to simplify "multiple-input-files.f90" a bit. Differential Revision: https://reviews.llvm.org/D111781 | 4 年前 | |
[flang] Use module file hashes for more checking and disambiguation (#80354) f18's module files are Fortran with a leading header comment containing the module file format version and a hash of the following contents. This hash is currently used only to protect module files against corruption and truncation. Extend the use of these hashes to catch or avoid some error cases. When one module file depends upon another, note its hash in additional module file header comments. This allows the compiler to detect when the module dependency is on a module file that has been updated. Further, it allows the compiler to find the right module file dependency when the same module file name appears in multiple directories on the module search path. The order in which module files are written, when multiple modules appear in a source file, is such that every dependency is written before the module(s) that depend upon it, so that their hashes are known. A warning is emitted when a module file is not the first hit on the module file search path. Further work is needed to add a compiler option that emits (larger) stand-alone module files that incorporate copies of their dependencies rather than relying on search paths. This will be desirable for application libraries that want to ship only "top-level" module files without needing to include their dependencies. Another future work item would be to admit multiple modules in the same compilation with the same name if they have distinct hashes. | 2 年前 | |
[flang] Main program symbol no longer conflicts with the other symbols (#149169) The following code is now accepted: module m end program m use m end The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name. | 1 年前 | |
[flang] Make the frontend driver error out when requesting multiple actions With this change, the following invocations will be treated as errors (multiple actions are specified): $ flang-new -fc1 -E -fsyntax-only file.95 $ flang-new -fc1 -fsyntax-only -fdebug-dump-symbols file.95 In the examples above it is not clear whether it is -fsyntax-only or the other action that is run (i.e. -E or -fdebug-dump-symbols). It makes sense to disallow such usage. This should also lead to cleaner and clearer tests (the RUN lines using %flang_fc1 will only allow one action). This change means that flang-new -fc1 and clang -cc1 will behave differently when multiple action options are specified. As frontend drivers are mostly used by compiler developers, this shouldn't affect or confuse the compiler end-users. Also, flang-new and clang remain consistent. Tests are updated accordingly. More specifically, I've made sure that every test specifies only one action. I've also taken the opportunity to simplify "multiple-input-files.f90" a bit. Differential Revision: https://reviews.llvm.org/D111781 | 4 年前 | |
[flang] Make the frontend driver error out when requesting multiple actions With this change, the following invocations will be treated as errors (multiple actions are specified): $ flang-new -fc1 -E -fsyntax-only file.95 $ flang-new -fc1 -fsyntax-only -fdebug-dump-symbols file.95 In the examples above it is not clear whether it is -fsyntax-only or the other action that is run (i.e. -E or -fdebug-dump-symbols). It makes sense to disallow such usage. This should also lead to cleaner and clearer tests (the RUN lines using %flang_fc1 will only allow one action). This change means that flang-new -fc1 and clang -cc1 will behave differently when multiple action options are specified. As frontend drivers are mostly used by compiler developers, this shouldn't affect or confuse the compiler end-users. Also, flang-new and clang remain consistent. Tests are updated accordingly. More specifically, I've made sure that every test specifies only one action. I've also taken the opportunity to simplify "multiple-input-files.f90" a bit. Differential Revision: https://reviews.llvm.org/D111781 | 4 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Extend error checking for implicit interfaces (#155473) When an external procedure is called by means of an implicit interface that turns out to be different in a significant way from the actual interface in its definition elsewhere in the source file, we emit an error message. This works for differences in actual vs dummy arguments, and for the result types of previously declared functions. This patch adds checking for differences between implicitly typed external function references and their actual declared types when the function's definition appears later. | 11 个月前 | |
[flang] Fix false errors in function result derived type checking (#156509) When checking function result types that are implicitly declared at their pointer of use against the actual definitions of those functions (when available), be sure to use the type equivalence checker that allows for USE association and sequence type equivalence. | 11 个月前 | |
[flang] Add HOSTNM runtime and lowering intrinsics implementation (#131910) Implement GNU extension intrinsic HOSTNM, both function and subroutine forms. Add HOSTNM documentation to flang/docs/Intrinsics.md. Add lowering and semantic unit tests. (This change is modeled after GETCWD implementation.) | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Make IEEE_INT and IEEE_REAL into builtin intrinsic functions (#109191) For proper error detection of bad KIND= arguments, make IEEE_INT and IEEE_REAL actual intrinsic functions. Lowering will have to check for the new __builtin_ names. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Don't convert actual argument if IGNORE_TKR is present for the corresponding dummy This patch is to remove the conversion of the actual argument that is associated with the dummy argument specified with the IGNORE_TKR directive. Commit on behalf of @danielcchen Differential Revision: https://reviews.llvm.org/D151401 | 3 年前 | |
[flang] Allow assumed-shape element pass to dummy arg with ignore_tkr (#78196) This is allowed by gfortran and ifort with ![GCC|DEC]$ ATTRIBUTES NO_ARG_CHECK | 2 年前 | |
[flang] Implement IGNORE_TKR(P) (#165469) Implemented IGNORE_TKR(P), which allows ignoring pointer and allocatable matching (can pass an allocatable array to routine with pointer array argument and vice versa). Updated documentation. | 9 个月前 | |
[flang] Add image_index to list of intrinsics and add tests (#79519) Add image_index to the list of intrinsic functions and add additional check on its args in check-call.cpp. Add two semantics tests for image_index. | 2 年前 | |
[flang] Add image_index to list of intrinsics and add tests (#79519) Add image_index to the list of intrinsic functions and add additional check on its args in check-call.cpp. Add two semantics tests for image_index. | 2 年前 | |
[flang] Add semantics test for image_status and add a check Add a semantics test for the intrinsic function image_status. Add a check and restriction on the image argument in image_status, ensuring that it is a positive value. Add same check on the size argument of the intrinsic ishftc. Add another check on the shift argument of ishftc, ensuring that it is less than or equal to the size argument. Add a short semantics test checking these restrictions in ishftc function calls. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D128009 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Fix bogus error under IMPLICIT NONE(EXTERNAL) Don't emit an error message for a possible implicit use of an external procedure when it is known that the symbol is not a procedure (e.g., an array). Fixes https://github.com/llvm/llvm-project/issues/62047 Differential Revision: https://reviews.llvm.org/D150789 | 3 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Forward references to COMMON from specification expr under IMPLICIT NONE As a near-universal extension, Fortran compilers permit forward references to dummy arguments and variables in COMMON blocks from specification expressions before an explicit type-declaration-stmt appears for those variables under IMPLICIT NONE, so long as those variables are later explicitly typed with the types that regular implicit typing rules would have given them (usually default INTEGER). F18 implemented this extension for dummy arguments, but not variables in COMMON blocks. Extend the extension to also accept variables in COMMON. Differential Revision: https://reviews.llvm.org/D145743 | 3 年前 | |
[flang] Allow IMPLICIT NONE(EXTERNAL) with GenericDetails Restrictions of IMPLICIT NONE(EXTERNAL) prohibits usage of c_associated from iso_c_binding (with explicit interface) without external definiton - relax associated check. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D120971 | 4 年前 | |
[flang] Don't complain about dummy subroutine under IMPLICIT NONE The compiler emits a bogus 'No explicit type declared for...' error when a dummy procedure turns out to be a subroutine (or at least not a function or object) under control of IMPLICIT NONE. Fixes https://github.com/llvm/llvm-project/issues/60224 Differential Revision: https://reviews.llvm.org/D150814 | 3 年前 | |
[flang] Whether a procedure's interface is explicit or not is not a d… (#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. | 2 年前 | |
[flang] Fix inheritance of IMPLICIT typing rules (#102692) Interfaces don't inherit the IMPLICIT typing rules of their enclosing scope, and separate MODULE PROCEDUREs inherit the IMPLICIT typing rules of submodule in which they are defined, not the rules from their interface. Fixes https://github.com/llvm/llvm-project/issues/102558. | 1 年前 | |
[flang] Catch untyped entities in interfaces with IMPLICIT NONE (#109018) The order of operations in name resolution wasn't converting named entities to objects by the time that they were subjected to the implicit typing rules in the case of interface blocks. This led to entities remaining untyped without error, leading to a crash in module file generation. Fixes https://github.com/llvm/llvm-project/issues/108975. | 1 年前 | |
[flang] Add support for -fimplicit-none-ext option (#125248) When -fimplicit-none-ext is passed, flang behaves as if "implicit none(external)" was specified for all relevant constructs in Fortran source file. Note: implicit17.f90 was based on implicit07.f90 with implicit none(external) removed and -fimplicit-none-ext added. | 1 年前 | |
[NFC][flang] Replace use of flang -fc1 with %flang_fc1 in few test case (#168830) Replace use of flang -fc1 with %flang_fc1 in few test case | 8 个月前 | |
[NFC][flang] Replace use of flang -fc1 with %flang_fc1 in few test case (#168830) Replace use of flang -fc1 with %flang_fc1 in few test case | 8 个月前 | |
[flang] Improve two coarray error messages (#129597) Two messages that complain about local variables mention that they don't have the SAVE attribute; in both cases, it would be okay if they were ALLOCATABLE instead. Clarify the messages. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Disabling REAL kinds must also disable their COMPLEX (#131353) When disabling kinds of REAL in the TargetCharacteristics, one must also disable the corresponding kinds of COMPLEX. Fixes https://github.com/llvm/llvm-project/issues/131088. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][semantics] fix IsConstantExpr for intrinsic with optional argument (#161915) fixes https://github.com/llvm/llvm-project/issues/161694 Exposes that some sequences of duplicate messages are being printed, which is fixed in https://github.com/llvm/llvm-project/pull/161916 . | 10 个月前 | |
[flang][semantics] fix IsConstantExpr for intrinsic with optional argument (#161915) fixes https://github.com/llvm/llvm-project/issues/161694 Exposes that some sequences of duplicate messages are being printed, which is fixed in https://github.com/llvm/llvm-project/pull/161916 . | 10 个月前 | |
[flang] Fix pointer definition semantic checking via refactoring 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 | 3 年前 | |
[flang] Fix pointer definition semantic checking via refactoring 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 | 3 年前 | |
[Flang] Give a more specific error message for expressions where an IO Unit is expected (#126970) This PR fixes #125446 by specializing the error message that is generated when an arbitrary expression is used as an IO Unit. See the tests for specific examples, but the general gist is that if you use a non-variable expression as the IO unit argument to a read or write, you now get a more specific error message indicating the the expression could have been a scalar integer expression or character variable. | 1 年前 | |
[Flang] Give a more specific error message for expressions where an IO Unit is expected (#126970) This PR fixes #125446 by specializing the error message that is generated when an arbitrary expression is used as an IO Unit. See the tests for specific examples, but the general gist is that if you use a non-variable expression as the IO unit argument to a read or write, you now get a more specific error message indicating the the expression could have been a scalar integer expression or character variable. | 1 年前 | |
[flang] Warn on useless IOMSG= (#102250) An I/O statement with IOMSG= but neither ERR= nor IOSTAT= deserves a warning to the effect that it's not useful. | 1 年前 | |
[flang] Fix pointer definition semantic checking via refactoring 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 | 3 年前 | |
[flang] Accept L0 (#121998) Accept a zero field width for formatted logical output (L0), interpreting it as if it had been L1. | 1 年前 | |
[flang] Accept L0 (#121998) Accept a zero field width for formatted logical output (L0), interpreting it as if it had been L1. | 1 年前 | |
[flang] Extension: allow char string edit descriptors in input formats (#140624) FORMAT("J=",I3) is accepted by a few other Fortran compilers as a valid format for input as well as for output. The character string edit descriptor "J=" is interpreted as if it had been 2X on input, causing two characters to be skipped over. The skipped characters don't have to match the characters in the literal string. An optional warning is emitted under control of the -pedantic option. | 1 年前 | |
[flang] Extend test_errors.py to test warnings and explanatory messages flang/test/Semantics/test_errors,py only compares actual error messages with expected error messages. Many tests have expected warning messages in them, but they are not checked. A forthcoming change adds several new warning and explanatory messages to the compiler, and these messages must be testable. So (re-?) enable non-error message checking in test_errors.py and adjust some existing tests to get them to pass. Warning messages related to host-specific folding conditions will not be emitted on all platforms, so they will continue to be ignored. Differential Revision: https://reviews.llvm.org/D136479 | 3 年前 | |
[flang][semantics] ensure defined io dummies are not arrays. (#162744) fixes [#162709](https://github.com/llvm/llvm-project/issues/162709) | 9 个月前 | |
[flang] Enforce more restrictions on I/O data list items 12.6.3p5 requires an I/O data list item to have a defined I/O procedure if it is polymorphic. (We could defer this checking to the runtime, but no other Fortran compiler does so, and we would also have to be able to catch the case of an allocatable or pointer direct component in the absence of a defined I/O subroutine.) Also includes a patch to name resolution that ensures that a SELECT TYPE construct entity is polymorphic in the domain of a CLASS IS guard. Also ensures that non-defined I/O of types with PRIVATE components is caught. Differential Revision: https://reviews.llvm.org/D139050 | 3 年前 | |
[flang] Delay parse tree rewriting for I/O UNIT=func() When an I/O statement's UNIT= specifier is a variable that is a function reference, parse tree rewriting may determine the wrong type of the result because generic resolution has not yet been performed. So move this bit of parse tree rewriting into I/O semantic checking so that the right handling (integer -> external file unit number, character pointer -> internal I/O) applies. Differential Revision: https://reviews.llvm.org/D135210 | 3 年前 | |
[flang] Silence bogus error message (#111057) Fortran doesn't permit the use of a polymorphic I/O list item for intrinsic data transfers, so the compiler emits an error message for polymorphic items whose types can't possibly be handled by a defined I/O subroutine. This check didn't allow for the possibility that the defined I/O subroutine might apply to the parent component of an extended type. Fixes https://github.com/llvm/llvm-project/issues/111021. | 1 年前 | |
[flang] Enforce more restrictions on I/O data list items 12.6.3p5 requires an I/O data list item to have a defined I/O procedure if it is polymorphic. (We could defer this checking to the runtime, but no other Fortran compiler does so, and we would also have to be able to catch the case of an allocatable or pointer direct component in the absence of a defined I/O subroutine.) Also includes a patch to name resolution that ensures that a SELECT TYPE construct entity is polymorphic in the domain of a CLASS IS guard. Also ensures that non-defined I/O of types with PRIVATE components is caught. Differential Revision: https://reviews.llvm.org/D139050 | 3 年前 | |
[flang] Fix ISHFTC argument value check The code that visits all pairs of constant SHIFT= and SIZE= arguments in an array-valued call to the ISHFTC intrinsic function had a bad loop test that affected the case where one of these arguments was scalar and the other was not. Fix it, and add tests. Differential Revision: https://reviews.llvm.org/D145092 | 3 年前 | |
[flang] Make REAL/COMPLEX(10) a hard error for non-x86 targets (#124655) Currently the use of REAL/COMPLEX(KIND=10) as a type or literal constant suffix elicits an optional warning message only. This leads to compiler internal errors during lowering when these types appear in code being compiled to non-x86_64 targets. For better error messaging, make the use of these types a hard error in semantics instead when they are not supported by the target architecture. | 1 年前 | |
[flang] Make REAL/COMPLEX(10) a hard error for non-x86 targets (#124655) Currently the use of REAL/COMPLEX(KIND=10) as a type or literal constant suffix elicits an optional warning message only. This leads to compiler internal errors during lowering when these types appear in code being compiled to non-x86_64 targets. For better error messaging, make the use of these types a hard error in semantics instead when they are not supported by the target architecture. | 1 年前 | |
[flang] Rework component KIND= values in PDT instantiations (#162367) When processing the KIND= values of type specifications in parameterized derived type component declarations, it turns out to be necessary to analyze their expressions' parse trees rather than to just fold their typed expression representations. The types of the subexpressions may depend on the values of KIND parameters. Further, when checking the values of KIND= actual arguments to type conversion intrinsic functions (e.g., INT(..., KIND=)) that appear in KIND specifiers for PDT component declarations, don't emit an error for the derived type definition, but instead emit them for derived type instantiations. Fixes https://github.com/llvm/llvm-project/issues/161961. | 9 个月前 | |
[flang] Repair recent Power build bot breakage (#124950) Add AIX_WARNING expected warnings to a test that is now producing new warnings. Should fix https://lab.llvm.org/buildbot/#/builders/201/builds/2291. | 1 年前 | |
[Flang] Fix test case for AIX(big-endian) system for issuing an extra message. (#104792) The 10-byte FP on big-endian system such as AIX is not represented as a valid number in FE, so Flang issues an extra WARNING message as underflow on REAL(10) to REAL(4) conversion for _10 for such a number. This PR is to fix the test case. | 1 年前 | |
[flang] Extend test_errors.py to test warnings and explanatory messages flang/test/Semantics/test_errors,py only compares actual error messages with expected error messages. Many tests have expected warning messages in them, but they are not checked. A forthcoming change adds several new warning and explanatory messages to the compiler, and these messages must be testable. So (re-?) enable non-error message checking in test_errors.py and adjust some existing tests to get them to pass. Warning messages related to host-specific folding conditions will not be emitted on all platforms, so they will continue to be ignored. Differential Revision: https://reviews.llvm.org/D136479 | 3 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Better error recovery for REAL(x, [KIND=]bad) (#108222) There's two entries in the intrinsic table for REAL; the first handles the REAL(z) case of a COMPLEX argument, and the second handles the data type/kind conversion case. In the case of REAL(x,bad) with a bad or unsupported kind of REAL, neither table entry was matching. In the event of an unrecognized intrinsic function, the compiler emits the first error message that resulted, which was confusing here because it was a complaint about having too many arguments. Reversing the order of the intrinsic table entries would fix the error message, but would also have broken REAL(z) with a complex argument, since it would then be treated as REAL(z,KIND=KIND(0.)) rather than REAL(z,KIND=KIND(z)). The fix is to let the second entry "hit" with improved error recovery. | 1 年前 | |
[flang][driver] Modify the existing test cases that use -Mstandard in f18, to use -pedantic and %flang_fc1 to share with the new driver Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D99518 | 5 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[flang] Disallow branches into SELECT TYPE/RANK cases (#93893) Ensure that a branch cannot be made into a case of a SELECT TYPE or SELECT RANK construct. | 2 年前 | |
[flang] Fix bogus branch target error on END SELECT The scope model used for branch target checking treats a label on an END SELECT statement as if it were in the previous CASE block. This makes it illegal to GO TO that label from within any earlier CASE block in that statement. Fix by treating the CASE blocks as nested scopes within the scope of the SELECT construct. Also, add a "warning:" tag to related warning messages. Differential Revision: https://reviews.llvm.org/D127425 | 4 年前 | |
[flang] Fix bogus branch target error on END SELECT The scope model used for branch target checking treats a label on an END SELECT statement as if it were in the previous CASE block. This makes it illegal to GO TO that label from within any earlier CASE block in that statement. Fix by treating the CASE blocks as nested scopes within the scope of the SELECT construct. Also, add a "warning:" tag to related warning messages. Differential Revision: https://reviews.llvm.org/D127425 | 4 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[flang] Revamp C1502 checking of END INTERFACE [generic-spec] Validation of the optional generic-spec on an END INTERFACE statement was missing many possible error cases; reimplement it. Differential Revision: https://reviews.llvm.org/D109910 | 4 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[flang] Distinguish error/warning cases for bad jumps into constructs Previously, jumps to labels in constructs from exterior statements would elicit only a warning. Upgrade these to errors unless the branch into the construct would enter into only DO, IF, and SELECT CASE constructs, whose interiors don't scope variables or have other set-up/tear-down semantics. Branches into these "safe" constructs are still errors if they're nested in an unsafe construct that doesn't also enclose the exterior branch statement. Differential Revision: https://reviews.llvm.org/D113310 | 4 年前 | |
[flang][driver] Add options for unparsing This patch adds the following compiler frontend driver options: * -fdebug-unparse (f18 spelling: -funparse) * -fdebug-unparse-with-symbols (f18 spelling: -funparse-with-symbols) The new driver will only accept the new spelling. f18 will accept both the original and the new spelling. A new base class for frontend actions is added: PrescanAndSemaAction. This is added to reduce code duplication that otherwise these new options would lead to. Implementation from * ParseSyntaxOnlyAction::ExecutionAction is moved to: * PrescanAndSemaAction::BeginSourceFileAction This implementation is now shared between: * PrescanAndSemaAction * ParseSyntaxOnlyAction * DebugUnparseAction * DebugUnparseWithSymbolsAction All tests that don't require other yet unimplemented options are updated. This way flang-new -fc1 is used instead of f18 when FLANG_BUILD_NEW_DRIVER is set to On. In order to facilitate this, %flang_fc1 is added in the LIT configuration (lit.cfg.py). asFortran from f18.cpp is duplicated as getBasicAsFortran in FrontendOptions.cpp. At this stage it's hard to find a good place to share this method. I suggest that we revisit this once a switch from f18 to flang-new is complete. Differential Revision: https://reviews.llvm.org/D96483 | 5 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Add nested scoping to label distinctness checking Fortran defines derived type definitions and explicit interface blocks for subroutines and functions to be nestable scopes for statement labels, even though such labels are useless for all purposes. Handle these scopes in label resolution so that bogus errors about conflicting labels in "real" code don't come out. Note that BLOCK constructs could have also been defined as scopes for statement labeling, but were not. Differential Revision: https://reviews.llvm.org/D132679 | 3 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Accept CHANGE TEAM/END TEAM as branch target (#123822) It is valid to jump to a CHANGE TEAM statement from anywhere in the containing executable part, and valid to jump to an END TEAM statement from within the construct. | 1 年前 | |
[flang] Fold LCOBOUND & UCOBOUND (#121411) Implement constant folding for LCOBOUND and UCOBOUND intrinsic functions. Moves some error detection code from intrinsics.cpp to fold-integer.cpp so that erroneous calls get properly flagged and converted into known errors. | 1 年前 | |
[flang] Honor #line and related preprocessing directives Extend the SourceFile class to take account of #line directives when computing source file positions for error messages. Adjust the output of #line directives to -E output so that they reflect any #line directives that were in the input. Differential Revision: https://reviews.llvm.org/D153910 | 3 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Add semantics tests for lock-stmt Add three tests for lock-stmt. The first includes standard-conforming statements, the second includes non-standard-conforming statements because of errors where something unexpected occurs, such as a missing lock-variable, and the third includes non-standard-conforming statements because of semantic errors, such as type or rank mismatches. Reviewed By: rouson Differential Revision: https://reviews.llvm.org/D136628 | 3 年前 | |
[flang] Add semantics tests for lock-stmt Add three tests for lock-stmt. The first includes standard-conforming statements, the second includes non-standard-conforming statements because of errors where something unexpected occurs, such as a missing lock-variable, and the third includes non-standard-conforming statements because of semantic errors, such as type or rank mismatches. Reviewed By: rouson Differential Revision: https://reviews.llvm.org/D136628 | 3 年前 | |
[flang] Semantic checking of LOCK statement (#129806) Add checks for the LOCK statement, and complete and enable their tests. | 1 年前 | |
[flang] Main program symbol no longer conflicts with the other symbols (#149169) The following code is now accepted: module m end program m use m end The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name. | 1 年前 | |
[flang] Implement !DIR$ UNROLL [N] (#123331) This patch implements support for the UNROLL directive to control how many times a loop should be unrolled. It must be placed immediately before a DO LOOP and applies only to the loop that follows. N is an integer that specifying the unrolling factor. This is done by adding an attribute to the branch into the loop in LLVM to indicate that the loop should unrolled. The code pushed to support the directive VECTOR ALWAYS has been modified to take account of the fact that several directives can be used before a DO LOOP. | 1 年前 | |
[flang] Add support for LSHIFT and RSHIFT intrinsics The functionality of LSHIFT and RSHIFT intrinsics is the same as the standard SHIFTL and SHIFTA intrinsics respectively. The patch is to alias the two intrinsics to the standardized ones. Differential Revision: https://reviews.llvm.org/D138839 | 3 年前 | |
[flang] Enforce limit on rank + corank Fortran 2018 requires that a compiler allow objects whose rank + corank is 15, and that's our maximum; detect and diagnose violations. Differential Revision: https://reviews.llvm.org/D125153 | 4 年前 | |
[flang] Enforce C839 (#71239) An assumed-rank array may not be a coarray and may not have the VALUE attribute. | 2 年前 | |
[flang] Extend assumed-size array checking in intrinsic functions (#139339) The array argument of a reference to the intrinsic functions SHAPE can't be assumed-size; and for SIZE and UBOUND, it can be assumed-size only if DIM= is present. The checks for thes restrictions don't allow for host association, or for associate entities (ASSOCIATE, SELECT TYPE) that are variables. Fixes https://github.com/llvm/llvm-project/issues/138926. | 1 年前 | |
[Flang] Make all tests work with lit's internal shell This patch removes REQUIRES: shell lines and updates the tests to not need a shell, or adds REQUIRES lines for Linux where relevant. A lot of these seem to have gotten introduced in 58c3f20bbf51f454ffb38ddb700a1d5ad374dc7b, but many are no longer relevant as these tests no longer use shell scripts. There was one test (missing_newline.f90) that needed to be modified to work. Lit doesn't recognize -ne correctly for echo and the options need to be split into separate flags. Reviewers: clementval, Meinersbur, kiranchandramohan, klausler Reviewed By: clementval Pull Request: https://github.com/llvm/llvm-project/pull/156115 | 11 个月前 | |
[flang][driver] Add -fdebug-module-writer option | 5 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[flang] Fix bug introduced by PR#93106 (#93326) https://github.com/llvm/llvm-project/pull/93106 introduced some necessary fixes to module file generation, but has also caused a regression. The module file output can include bogus attempts to USE-associate symbols local to derived type scopes, like components and bindings. Fix, and extend a test. | 2 年前 | |
[flang] Check dummy arguments of BIND(C) procedures Declaration checking in semantics was only examining symbols with explicit BIND(C) attributes; extend it to also check dummy arguments to such procedures. Differential Revision: https://reviews.llvm.org/D145746 | 3 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[flang] Allow reference to earlier generic in later interface Name resolutions defers all resolution and checking of specific procedures in non-type-bound generic interfaces to the end of the specification part. This prevents expression analysis of references to generic functions in specification expressions in interfaces from resolving. Example (now a new test case in modfile07.f90): module m12 interface generic module procedure specific end interface interface module subroutine s(a1,a2) character(*) a1 character(generic(a1)) a2 ! <-- end end interface contains pure integer function specific(x) character(*), intent(in) :: x specific = len(x) end end The solution is to partially resolve specific procedures as they are defined for each generic, when they can be resolved, with the final pass at the end of the specification part to finish up any forward references and emit the necessary error messages. Making this fix caused some issues in module file output, which have all been resolved by making this simplifying change: generics are now all emitted to module file specification parts as their own group of declarations at the end of the specification part, followed only by namelists and COMMON blocks. Differential Revision: https://reviews.llvm.org/D157346 | 2 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[flang] Add some semantic checks for derived type with BIND attribute This supports checks in C1801-C1805 for derived type with BIND attribute. The other compilers such as 'gfortran' and 'ifort' do not report error for C1802 and C1805, so emit warnings for them. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D130438 | 3 年前 | |
[flang] Disabling REAL kinds must also disable their COMPLEX (#131353) When disabling kinds of REAL in the TargetCharacteristics, one must also disable the corresponding kinds of COMPLEX. Fixes https://github.com/llvm/llvm-project/issues/131088. | 1 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[flang] Add semantic check for C1520 As Fortran 2018 C1520, if proc-language-binding-spec with NAME= is specified, then proc-decl-list shall contain exactly one proc-decl, which shall neither have the POINTER attribute nor be a dummy procedure. Add this check. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D127725 | 4 年前 | |
[flang] Defer conversion of PDT default initializers (#91026) As the kinds of the integer types of type parameters may well depend on the values of other type parameters, defer the attempt to convert their values to the point of type instantiation instead of doing it during declaration processing. | 2 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[flang] BIND(C,NAME=...) corrections The Fortran standard's various restrictions on the use of BIND(C) often depend more on the presence or absence of an explicit NAME= specification rather than on its value, but semantics and module file generation aren't making distinctions between explicit NAME= specifications that happen to match the default name and declarations that don't have NAME=. Tweak semantics and module file generation to conform, and also complain when named BIND(C) attributes are erroneously applied to entities that can't support them, like ABSTRACT interfaces. Differential Revision: https://reviews.llvm.org/D145107 | 3 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[flang] Warn when F128 is unsupported (#102147) (#106957) This generates warning: REAL(KIND=16) is not an enabled type for this target if that type is used in a build not correctly configured to support this type. Uses of selected_real_kind(30) return -1. Relanding #102147 because the test errors turned out to be specific to a downstream configuration. | 1 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[flang] Fix LBOUND rewrite on descriptor components GetLowerBoundHelper rewrite in https://reviews.llvm.org/D121488 was incorrect with POINTER/ALLOCATABLE components. The rewrite created a descriptor inquiry to the component symbol only instead of the whole named entity. The base information was lost, and not retrievable. LBOUND(a(10)%p) became LBOUND(p). Fix this regression, and also update DescriptorInquiry unparsing to carry the kind information. DescriptorInquiries are KIND 8 expressions, while LBOUND/SIZE/RANK, %LEN are default kind expressions. This caused print *,lbound(x,kind=8) to unparse as print*,lbound(x) which is not semantically the same (this unparsing issue was not an issue for lowering, but I noticed it while writing my regression test). Differential Revision: https://reviews.llvm.org/D122406 | 4 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[flang] Allow reference to earlier generic in later interface Name resolutions defers all resolution and checking of specific procedures in non-type-bound generic interfaces to the end of the specification part. This prevents expression analysis of references to generic functions in specification expressions in interfaces from resolving. Example (now a new test case in modfile07.f90): module m12 interface generic module procedure specific end interface interface module subroutine s(a1,a2) character(*) a1 character(generic(a1)) a2 ! <-- end end interface contains pure integer function specific(x) character(*), intent(in) :: x specific = len(x) end end The solution is to partially resolve specific procedures as they are defined for each generic, when they can be resolved, with the final pass at the end of the specification part to finish up any forward references and emit the necessary error messages. Making this fix caused some issues in module file output, which have all been resolved by making this simplifying change: generics are now all emitted to module file specification parts as their own group of declarations at the end of the specification part, followed only by namelists and COMMON blocks. Differential Revision: https://reviews.llvm.org/D157346 | 2 年前 | |
[flang] Allow reference to earlier generic in later interface Name resolutions defers all resolution and checking of specific procedures in non-type-bound generic interfaces to the end of the specification part. This prevents expression analysis of references to generic functions in specification expressions in interfaces from resolving. Example (now a new test case in modfile07.f90): module m12 interface generic module procedure specific end interface interface module subroutine s(a1,a2) character(*) a1 character(generic(a1)) a2 ! <-- end end interface contains pure integer function specific(x) character(*), intent(in) :: x specific = len(x) end end The solution is to partially resolve specific procedures as they are defined for each generic, when they can be resolved, with the final pass at the end of the specification part to finish up any forward references and emit the necessary error messages. Making this fix caused some issues in module file output, which have all been resolved by making this simplifying change: generics are now all emitted to module file specification parts as their own group of declarations at the end of the specification part, followed only by namelists and COMMON blocks. Differential Revision: https://reviews.llvm.org/D157346 | 2 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[flang] Distinguish intrinsic module USE in module files; correct search paths In the USE statements that f18 emits to module files, ensure that symbols from intrinsic modules are marked as such on their USE statements. And ensure that the current working directory (".") cannot override the intrinsic module search path when trying to locate an intrinsic module. Differential Revision: https://reviews.llvm.org/D127019 | 4 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[flang] Allow reference to earlier generic in later interface Name resolutions defers all resolution and checking of specific procedures in non-type-bound generic interfaces to the end of the specification part. This prevents expression analysis of references to generic functions in specification expressions in interfaces from resolving. Example (now a new test case in modfile07.f90): module m12 interface generic module procedure specific end interface interface module subroutine s(a1,a2) character(*) a1 character(generic(a1)) a2 ! <-- end end interface contains pure integer function specific(x) character(*), intent(in) :: x specific = len(x) end end The solution is to partially resolve specific procedures as they are defined for each generic, when they can be resolved, with the final pass at the end of the specification part to finish up any forward references and emit the necessary error messages. Making this fix caused some issues in module file output, which have all been resolved by making this simplifying change: generics are now all emitted to module file specification parts as their own group of declarations at the end of the specification part, followed only by namelists and COMMON blocks. Differential Revision: https://reviews.llvm.org/D157346 | 2 年前 | |
[flang] Allow reference to earlier generic in later interface Name resolutions defers all resolution and checking of specific procedures in non-type-bound generic interfaces to the end of the specification part. This prevents expression analysis of references to generic functions in specification expressions in interfaces from resolving. Example (now a new test case in modfile07.f90): module m12 interface generic module procedure specific end interface interface module subroutine s(a1,a2) character(*) a1 character(generic(a1)) a2 ! <-- end end interface contains pure integer function specific(x) character(*), intent(in) :: x specific = len(x) end end The solution is to partially resolve specific procedures as they are defined for each generic, when they can be resolved, with the final pass at the end of the specification part to finish up any forward references and emit the necessary error messages. Making this fix caused some issues in module file output, which have all been resolved by making this simplifying change: generics are now all emitted to module file specification parts as their own group of declarations at the end of the specification part, followed only by namelists and COMMON blocks. Differential Revision: https://reviews.llvm.org/D157346 | 2 年前 | |
[Flang] Port test_modfile.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. The following changes have been made: "test_modfile.sh" has been ported to Python, and the relevant tests relying on it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107956 | 4 年前 | |
[flang] Fix USE with homonymous renaming Fortran requires that a USE with renaming prevent the USE'd symbol from also being associated into a scope without renaming. The implementation in name resolution gets confused in the case of a USE with renaming using the same name ("x => x"). Clean things up. Fixes LLVM bug https://github.com/llvm/llvm-project/issues/63397. Differential Revision: https://reviews.llvm.org/D153452 | 3 年前 | |
[flang] Implement semantics for DEC STRUCTURE/RECORD Implements part of the legacy "DEC structures" feature from VMS Fortran. STRUCTUREs are processed as if they were derived types with SEQUENCE. DATA-like object entity initialization is supported as well (e.g., INTEGER FOO/666/) since it was used for default component initialization in structures. Anonymous components (named %FILL) are also supported. These features, and UNION/MAP, were already being parsed. An omission in the collection of structure field names in the case of nested structures with entity declarations was fixed in the parser. Structures are supported in modules, but this is mostly for testing purposes. The names of fields in structures accessed via USE association cannot appear with dot notation in client code (at least not yet). DEC structures antedate Fortran 90, so their actual use in applications should not involve modules. This patch does not implement UNION/MAP, since that feature would impose difficulties later in lowering them to MLIR types. In the meantime, if they appear, semantics will issue a "not yet implemented" error message. Differential Revision: https://reviews.llvm.org/D117151 | 4 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Allow reference to earlier generic in later interface Name resolutions defers all resolution and checking of specific procedures in non-type-bound generic interfaces to the end of the specification part. This prevents expression analysis of references to generic functions in specification expressions in interfaces from resolving. Example (now a new test case in modfile07.f90): module m12 interface generic module procedure specific end interface interface module subroutine s(a1,a2) character(*) a1 character(generic(a1)) a2 ! <-- end end interface contains pure integer function specific(x) character(*), intent(in) :: x specific = len(x) end end The solution is to partially resolve specific procedures as they are defined for each generic, when they can be resolved, with the final pass at the end of the specification part to finish up any forward references and emit the necessary error messages. Making this fix caused some issues in module file output, which have all been resolved by making this simplifying change: generics are now all emitted to module file specification parts as their own group of declarations at the end of the specification part, followed only by namelists and COMMON blocks. Differential Revision: https://reviews.llvm.org/D157346 | 2 年前 | |
[flang] Make uninitialized allocatable components explicitly NULL() in structure constructors When a structure constructor does not initialize an allocatable component, ensure that the typed expression representation contains an explicit NULL() for the component. Expression semantics already copies default initialized expressions for nonallocatable components into structure constructors. This change is expected to simplify lowering. Differential Revision: https://reviews.llvm.org/D121162 | 4 年前 | |
[flang] Emit missing IMPORTs in module file interfaces When a symbol from the enclosing scope is necessary to declare a procedure or procedure pointer dummy argument or function result for a procedure interface, note it in the collection of symbols to be imported when scanning that interface. Differential Revision: https://reviews.llvm.org/D132683 | 3 年前 | |
[NFC] Move flang OpenMP semantic tests under one single directory To be consistent with OpenACC and will find the tests in one single directory for OpenMP. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D127529 | 4 年前 | |
[flang] Handle parameter-dependent types in PDT initializers For parameterized derived type component initializers whose expressions' types depend on parameter values, f18's current scheme of analyzing the initialization expression once during name resolution fails. For example, type :: pdt(k) integer, kind :: k real :: component = real(0.0, kind=k) end type To handle such cases, it is necessary to re-analyze the parse trees of these initialization expressions once for each distinct initialization of the type. This patch adds code to wipe an expression parse tree of its typed expressions, and update those of its symbol table pointers that reference type parameters, and then re-analyze that parse tree to generate the properly typed component initializers. Differential Revision: https://reviews.llvm.org/D123728 | 4 年前 | |
[flang] Check procedure pointer initializations; clean up ELEMENTAL 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 | 2 年前 | |
[flang] Fix module file issue with renamed shadowed specific procedures A specific procedure in the list of specific procedures associated with a generic interface needs to be a symbol that is not inadvertently resolved to its ultimate symbol in another module when it is also shadowed by a generic interface of the same name. Differential Revision: https://reviews.llvm.org/D132686 | 3 年前 | |
[flang] Allow a generic-spec on a PUBLIC/PRIVATE statement to declare a generic A generic-spec can appear on a module accessibility control statement even if it has not been declared as a generic interface, because there's nothing else that it could be. While here, simplify the parse tree and parser for AccessId, since one of its alternatives is ambiguous with the other. Differential Revision: https://reviews.llvm.org/D134471 | 3 年前 | |
[flang] Ensure USE associations of shadowed procedures are emitted to module files When a generic interface in a module shadows a procedure of the same name that has been brought into scope via USE association, ensure that that USE association is not lost when the module file is written. Differential Revision: https://reviews.llvm.org/D135207 | 3 年前 | |
[flang] Handle forward references to modules When a USE of a module precedes its definition in the same source file, ensure that the module is processed by name resolution before the USE statement. This prevents the risk of the USE statement using an obsolete module file that is later overwritten during the same compilation. Differential Revision: https://reviews.llvm.org/D143799 | 3 年前 | |
[flang] Ensure that portability warnings are conditional (#71857) 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. | 2 年前 | |
[flang][cuda] Do not apply implicit data attribute on dummy arg with VALUE (#119927) Dummy arguments with the VALUE attribute do not need the implicit data attribute. | 1 年前 | |
[flang] Don't emit debugging output to module file When a constant array value has a non-default lower bound, the current expression formatting code uses a non-Fortran syntax to dump the lower bounds. (There's no way in Fortran to explicitly specify such a constant value, but they can be created through the use of named constants.) But we don't want this lower bounds syntax from expression dumping to show up in module files, since it can't be parsed back in. So disable that part of expression formatting by default. Fixes https://github.com/llvm/llvm-project/issues/64391. Differential Revision: https://reviews.llvm.org/D157330 | 2 年前 | |
[flang] Cray pointer in module (#66119) This patch is to add the support of declaring a Cray pointer in a module. | 2 年前 | |
[flang] Do not write implicit SAVE attribute into the mod file. (#67215) If it happens that a symbol has an implicit SAVE attribute, we have to omit it in the mod file writer. Otherwise it may violate F202X C862: The SAVE attribute shall not be specified for... an object that is in a common block. | 2 年前 | |
[flang] Fix mod file generation of derived type initializers... (#70511) ... when the derived type used in the structure constructor(s) is from another module and not use-associated into the current module. This came up in a test with a derived type component default initializer of "c_null_ptr", which is replaced with the expression "__builtin_c_ptr(address=0_8)"; the derived type name "__builtin_c_ptr" is not available in the current scope, and the module file would fail semantic analysis when USE'd. The best solution that I found was to extend module file generation to detect this case and handle it by inserting the right USE association to the ultimate derived type symbol, possibly with renaming to a compiler-created name in the case of a conflict. To implement this transformation, it was necessary to fix the utility evaluate::CollectSymbols() to include the derived type symbol from a structure constructor. This involved extending the expression traversal framework to visit the derived type spec of a structure constructor. Extending CollectSymbols() caused a lowering test to fail mysteriously, so I tracked down the code in PFTBuilder that didn't expect to see a DerivedTypeDetails symbol and dealt with it there. | 2 年前 | |
[flang] Support \u Unicode escape sequences (#76757) Support \uNNNN and \uNNNNNNNN escape sequences for CHARACTER(KIND=2) and CHARACTER(KIND=4) literal constants for better GNU Fortran compatibility. Fixes llvm-test-suite/Fortran/gfortran/regression/achar_6.F90 and .../widechar_1.f90. | 2 年前 | |
[flang] Refine IMPORT processing in module file generation (#77133) Procedure interfaces emitted to module files are including IMPORT statements for some symbols that don't need to be imported (base types and procedure interfaces for components of imported derived types) and omitting others (procedure interfaces for bindings in locally-defined derived types that are material to the interface). | 2 年前 | |
[flang] Fix module file generation when generic shadows derived type (#78618) Fortran allows the name of a generic interface to be the same as the name of a derived type or specific procedure. When this happens, it causes the code in module file generation to miss the symbol of a derived type when scanning for symbols in initialization expressions that need to be imported. Fix. | 2 年前 | |
[flang] Improve module file error message wording (#122787) Instead of "Cannot read ...", distinguish true errors in finding and parsing module files from problems with unexpected hash codes by using "Cannot parse" or "Cannot use" wording as appropriate. | 1 年前 | |
[flang] Emit "raw" name for procedure interface in module file (#83915) Save both the raw procedure interface symbol as well as the result of passing it through GetUltimate() and BypassGeneric() in symbol table entries with ProcEntityDetails. The raw symbol of the interface needs to be the one used for emitting procedure symbols to module files. Fixes https://github.com/llvm/llvm-project/issues/83836. | 2 年前 | |
[flang] Add -fhermetic-module-files (#98083) Module files emitted by this Fortran compiler are valid Fortran source files. Symbols that are USE-associated into modules are represented in their module files with USE statements and special comments with hash codes in them to ensure that those USE statements resolve to the same modules that were used to build the module when its module file was generated. This scheme prevents unchecked module file growth in large applications by not emitting USE-associated symbols redundantly. This problem can be especially bad when derived type definitions must be repeated in the module files of their clients, and the clients of those modules, and so on. However, this scheme has the disadvantage that clients of modules must be compiled with dependent modules in the module search path. This new -fhermetic-module-files option causes module file output to be free of dependences on any non-intrinsic module files; dependent modules are instead emitted as part of the module file, rather than being USE-associated. It is intended for top level library module files that are shipped with binary libraries when it is not convenient to collect and ship their dependent module files as well. Fixes https://github.com/llvm/llvm-project/issues/97398. | 2 年前 | |
[flang] Silence spurious error on non-CUDA use of CUDA module (#107444) When a module file has been compiled with CUDA enabled, don't emit spurious errors about non-interoperable types when that module is read by a USE statement in a later non-CUDA compilation. | 1 年前 | |
[flang] Fix bogus error about procedure incompatbility (#107645) This was a subtle problem. When the shape of a function result is explicit but not constant, it is characterized with bounds expressions that use Extremum<SubscriptInteger> operations to force extents to 0 rather than be negative. These Extremum operations are formatted as "max()" intrinsic functions in the module file. Upon being read from the module file, they are not folded back into Extremum operations, but remain as function references; and this then leads to expressions not comparing equal when the procedure characteristics are compared to those of a local procedure declared identically. The real fix here would be for folding to just always change max and min function references into Extremum<> operations, constant operands or not, and I tried that, but it lead to test failures and crashes in lowering that I couldn't resolve. So, until those can be fixed, here's a change that will read max/min operations in module file declarations back into Extremum operations to solve the compatibility checking problem, but leave other non-constant max/min operations as function calls. | 1 年前 | |
[flang] Fix subtle type naming bug in module file output (#108892) A derived type specification in semantics holds both its source name (for location purposes) and its ultimate derived type symbol. But for correct module file generation of a structure constructor using that derived type spec, the original symbol may be needed so that USE association can be exposed. Save both the original symbol and its ultimate symbol in the DerivedTypeSpec, and collect the right one when traversing expressions (specifically for handling initialization in module files). Fixes https://github.com/llvm/llvm-project/issues/108827. | 1 年前 | |
[flang] Fix edge case regression (#109350) A recent fix to the emission of derived type names to module files exposed a regression in the case of a derived type that (1) has the same name as a generic procedure interface and (2) has undergone renaming through USE association before (3) being used in a declaration significant to a module procedure interface. Fix. | 1 年前 | |
[flang] Improve module file error message wording (#122787) Instead of "Cannot read ...", distinguish true errors in finding and parsing module files from problems with unexpected hash codes by using "Cannot parse" or "Cannot use" wording as appropriate. | 1 年前 | |
[flang] Fixed LIT tests to create modfiles in a temp dir. (#144448) | 1 年前 | |
[flang][Semantics] Ensure deterministic mod file output (#128655) This PR adds a test to ensure deterministic ordering in .mod files. It also includes related changes to prevent non-deterministic symbol ordering caused by pointers outside the cooked source. This issue is particularly noticeable when using Flang as a library and compiling the same files multiple times. | 1 年前 | |
[flang][Semantics] Ensure deterministic mod file output (#129669) This PR is a follow-up to #128655. It adds another test to ensure deterministic ordering in .mod files and includes related changes to prevent non-deterministic ordering caused by iterating over a set ordered by heap pointers. This issue is particularly noticeable when using Flang as a library and compiling the same files multiple times. The reduced test case is as minimal as possible. We were unable to reproduce the issue with a smaller set of files. | 1 年前 | |
[flang] Fix Cray pointers in module file output (#130315) The relationship between a Cray pointee and its pointer is not in the symbol table entry, but instead in a per-scope map. Use this information to ensure that if a pointee/pointer is needed in the module file, so is its pointer/pointee. Fixes https://github.com/llvm/llvm-project/issues/130270. | 1 年前 | |
[flang][test] Removed temporary workaround for buildbots. | 1 年前 | |
[flang] Fixed LIT tests to create modfiles in a temp dir. (#144448) | 1 年前 | |
[flang] Fixed LIT tests to create modfiles in a temp dir. (#144448) | 1 年前 | |
[flang] Fixed LIT tests to create modfiles in a temp dir. (#144448) | 1 年前 | |
[flang] Fixed LIT tests to create modfiles in a temp dir. (#144448) | 1 年前 | |
[flang] Fix bogus generic interface error due to hermetic module files (#161607) When the same generic interface is processed via USE association from its original module file and from a copy in a hermetic module file, we need to do a better job at detecting and omitting duplicate specific procedures. They won't have the same symbol addresses, but they will have the same name, module name, and characteristics. This will avoid a bogus error about multiple specific procedures matching the actual arguments later when the merged generic interface is referenced. | 10 个月前 | |
[flang] Main program symbol no longer conflicts with the other symbols (#149169) The following code is now accepted: module m end program m use m end The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name. | 1 年前 | |
[flang] Submodule names can clash only with submodule names (#67361) Name resolution creates symbols for submodules in their parents' scopes. This can lead to bogus errors about name clashes between submodule names and other entities in the parents' scopes. Create symbols for submodules but do not add them to a scope's dictionary. | 2 年前 | |
[flang] Check coranks on MOVE_ALLOC (#129944) The FROM= and TO= arguments in a reference to the MOVE_ALLOC intrinsic subroutine must have the same corank. | 1 年前 | |
[flang] Enforce a program not including more than one main program As Fortran 2018 5.2.2 states, a program shall consist of exactly one main program. Add this semantic check. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D125186 | 4 年前 | |
[flang] Enforce a program not including more than one main program As Fortran 2018 5.2.2 states, a program shall consist of exactly one main program. Add this semantic check. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D125186 | 4 年前 | |
[flang] Enforce a program not including more than one main program As Fortran 2018 5.2.2 states, a program shall consist of exactly one main program. Add this semantic check. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D125186 | 4 年前 | |
[flang] Main program symbol no longer conflicts with the other symbols (#149169) The following code is now accepted: module m end program m use m end The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name. | 1 年前 | |
[flang] Enforce a program not including more than one main program As Fortran 2018 5.2.2 states, a program shall consist of exactly one main program. Add this semantic check. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D125186 | 4 年前 | |
[flang] Enforce a program not including more than one main program As Fortran 2018 5.2.2 states, a program shall consist of exactly one main program. Add this semantic check. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D125186 | 4 年前 | |
[flang][Semantics] Testcase for declaration conflict with named-const… (#111556) …ruct | 1 年前 | |
[flang] Ensure USE-associated objects can be in NAMELIST (#82846) The name resolution for NAMELIST objects didn't allow for symbols that are not ObjectEntityDetails symbols. Fixes https://github.com/llvm/llvm-project/issues/82574. | 2 年前 | |
[flang] Add notify-type and notify-wait-stmt (#76594) Add notify-type to iso_fortran_env module. Add notify-wait-stmt to the parser and add checks for constraints on the statement, C1177 and C1178, from the Fortran 2023 standard. Add three semantics tests for notify-wait-stmt. | 2 年前 | |
[flang] Add notify-type and notify-wait-stmt (#76594) Add notify-type to iso_fortran_env module. Add notify-wait-stmt to the parser and add checks for constraints on the statement, C1177 and C1178, from the Fortran 2023 standard. Add three semantics tests for notify-wait-stmt. | 2 年前 | |
[flang] Adding NOTIFY specifier in image selector and add notify type checks (#148810) This PR adds support for the NOTIFY specifier in the image selector as described in the 2023 standard, and add checks for the NOTIFY_TYPE type. | 9 个月前 | |
[flang] Adjust needless warning (#164500) When an external procedure has an explicit interface in one scope, and an implicit interface in another, and there's at least one call to it from which dummy argument information can be inferred, don't emit a warning about potential incompatibility if the only difference in their characteristics is that one of their interfaces was implicit. | 9 个月前 | |
[flang][CUDA] Downgrade error to warning (#161570) The compiler currently emit an error about the lack of an explicit procedure interface when an external procedure that is called via an implicit interface is known to have an dummy argument with a CUDA data attribute, even when the corresponding actual argument does have a CUDA data attribute. This behavior is inconsistent with what happens when such a call is to an external in another source file and its definition is not visible -- the compiler silently accepts an actual argument with a CUDA data attribute across the implicit interface. Harmonize this situation so that an actual argument with a CUDA data attribute in a reference to a procedure with an implicit interface elicits a usage warning encouraging the use of explicit interfaces. Only when the procedure's definition is visible, and incompatible, will an error message appear. | 10 个月前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Fix pointer definition semantic checking via refactoring 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 | 3 年前 | |
[flang] Add team_type to num_images intrinsic call num_images had previously been added to the list of intrinsics before the type team_type had been implemented. Now that team_type is implemented, add the num_images call that has the team argument. Update the semantics tests for num_images. Reviewed By: craig.rasmussen Differential Revision: https://reviews.llvm.org/D126734 | 4 年前 | |
[flang] Add team_type to num_images intrinsic call num_images had previously been added to the list of intrinsics before the type team_type had been implemented. Now that team_type is implemented, add the num_images call that has the team argument. Update the semantics tests for num_images. Reviewed By: craig.rasmussen Differential Revision: https://reviews.llvm.org/D126734 | 4 年前 | |
[flang] Clean up ISO_FORTRAN_ENV, fix NUMERIC_STORAGE_SIZE (#87566) Address TODOs in the intrinsic module ISO_FORTRAN_ENV, and extend the implementation of NUMERIC_STORAGE_SIZE so that the calculation of its value is deferred until it is needed so that the effects of -fdefault-integer-8 or -fdefault-real-8 are reflected. Emit a warning when NUMERIC_STORAGE_SIZE is used from the module file and the default integer and real sizes do not match. Fixes https://github.com/llvm/llvm-project/issues/87476. | 2 年前 | |
[flang] Don't reference non-invariant symbols in shape expressions When an array's shape involves references to symbols that are not invariant in a scope -- the classic example being a dummy array with an explicit shape involving other dummy arguments -- the compiler was creating shape expressions that referenced those symbols. This might be valid if those symbols are somehow captured and copied at each entry point to a subprogram, and the copies referenced in the shapes instead, but that's not the case. This patch introduces a new expression predicate IsScopeInvariantExpr(), which defines a class of expressions that contains constant expressions (in the sense that the standard uses that term) as well as references to items that may be safely accessed in a context-free way throughout their scopes. This includes dummy arguments that are INTENT(IN) and not VALUE, descriptor inquiries into descriptors that cannot change, and bare LEN type parameters within the definitions of derived types. The new predicate is then used in shape analysis to winnow out results that would have otherwise been contextual. Differential Revision: https://reviews.llvm.org/D113309 | 4 年前 | |
[flang] Round derived type byte sizes up to alignment multiple (#67571) When calculating sizes and offsets of types and components, be sure to round the size of a derived type up to a multiple of its alignment. | 2 年前 | |
[flang][OpenMP] Make static duration variables default to shared DSA (#142783) According to the OpenMP standard, variables with static storage duration are predetermined as shared. Add a check when creating implicit symbols for OpenMP to fix them erroneously getting set to firstprivate. Fixes llvm#140732. --------- Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com> | 1 年前 | |
[flang][AIX] BIND(C) derived type alignment for AIX (#121505) This patch is to handle the alignment requirement for the bind(c) derived type component that is real type and larger than 4 bytes. The alignment of such component is 4-byte. | 1 年前 | |
[flang][OpenMP] Fix offsets for EQUIVALENCE in firstprivate(/block/) (#156492) When a common block appears in firstprivate, its contents become host associations, which the symbol offset computation code for equivalences wasn't expecting. Add a GetUltimate() call, and extend symbol dumping for HostAssocDetails. | 11 个月前 | |
[flang] Update the regression tests to use the new driver when enabled This patch updates most of the remaining regression tests (~400) to use flang-new rather then f18 when FLANG_BUILD_NEW_DRIVER is set. This allows us to share more Flang regression tests between f18 and flang-new. A handful of tests have not been ported yet - these are currently either failing or not supported by the new driver. Summary of changes: * RUN lines in tests are updated to use %flang_fc1 instead of %f18 * option spellings in tests are updated to forms accepted by both f18 and flang-new * variables in Bash scripts are renamed (e.g. F18 --> FLANG_FC1) The updated tests will now be run with the new driver, flang-new, whenever it is enabled (i.e when FLANG_BUILD_NEW_DRIVER is set). Although this patch touches many files, vast majority of the changes are automatic: grep -IEZlr "%f18" flang/test/ | xargs -0 -l sed -i 's/%f18/%flang_fc1/g Differential Revision: https://reviews.llvm.org/D100309 | 5 年前 | |
[flang] Make uninitialized allocatable components explicitly NULL() in structure constructors When a structure constructor does not initialize an allocatable component, ensure that the typed expression representation contains an explicit NULL() for the component. Expression semantics already copies default initialized expressions for nonallocatable components into structure constructors. This change is expected to simplify lowering. Differential Revision: https://reviews.llvm.org/D121162 | 4 年前 | |
[flang] Update the regression tests to use the new driver when enabled This patch updates most of the remaining regression tests (~400) to use flang-new rather then f18 when FLANG_BUILD_NEW_DRIVER is set. This allows us to share more Flang regression tests between f18 and flang-new. A handful of tests have not been ported yet - these are currently either failing or not supported by the new driver. Summary of changes: * RUN lines in tests are updated to use %flang_fc1 instead of %f18 * option spellings in tests are updated to forms accepted by both f18 and flang-new * variables in Bash scripts are renamed (e.g. F18 --> FLANG_FC1) The updated tests will now be run with the new driver, flang-new, whenever it is enabled (i.e when FLANG_BUILD_NEW_DRIVER is set). Although this patch touches many files, vast majority of the changes are automatic: grep -IEZlr "%f18" flang/test/ | xargs -0 -l sed -i 's/%f18/%flang_fc1/g Differential Revision: https://reviews.llvm.org/D100309 | 5 年前 | |
[flang] Pad Hollerith actual arguments (#139782) For more compatible legacy behavior on old tests, extend Hollerith actual arguments on the right with trailing blanks out to a multiple of 8 bytes. Fixes Fujitsu test 0343_0069. | 1 年前 | |
[flang][NFC] Document an intentional violation of the standard (#99073) The Fortran standard committees passed an "interp" request at their June 2024 meetings that is distinct from nearly every other Fortran compiler that I tried (6) in an an ambiguous case (parent component naming when the base type has been renamed via USE association). Document this case in flang/docs/Extensions.md as an intentional instance of non-conformance chosen for portability and better usability. | 2 年前 | |
[flang] Fix looping on LEN type parameter usage When a LEN type parameter of one PDT is being used as the value of a LEN type parameter in another PDT, expression rewriting can loop infinitely due to an incorrect assumption that the same PDT's parameters are being referenced. Fixes LLVM bug https://github.com/llvm/llvm-project/issues/63198 Differential Revision: https://reviews.llvm.org/D153465 | 3 年前 | |
[flang] Support PDT KIND parameters in later parameter kind expressions Fortran allows an earlier-declared KIND type parameter of a parameterized derived type to be used in the constant expression defining the integer kind of a later type parameter. TYPE :: T(K,L) INTEGER, KIND :: K INTEGER(K), LEN :: L ... END TYPE Differential Revision: https://reviews.llvm.org/D159044https://reviews.llvm.org/D159044 | 2 年前 | |
[flang] Defer conversion of PDT default initializers (#91026) As the kinds of the integer types of type parameters may well depend on the values of other type parameters, defer the attempt to convert their values to the point of type instantiation instead of doing it during declaration processing. | 2 年前 | |
[flang] Better error handling for PDT constant expression (#130637) We currently don't consider an integer division to be a constant expression unless its divisor is known and nonzero. This produces a weird result in the linked test; do better. Fixes https://github.com/llvm/llvm-project/issues/130534. | 1 年前 | |
[flang] Rework component KIND= values in PDT instantiations (#162367) When processing the KIND= values of type specifications in parameterized derived type component declarations, it turns out to be necessary to analyze their expressions' parse trees rather than to just fold their typed expression representations. The types of the subexpressions may depend on the values of KIND parameters. Further, when checking the values of KIND= actual arguments to type conversion intrinsic functions (e.g., INT(..., KIND=)) that appear in KIND specifiers for PDT component declarations, don't emit an error for the derived type definition, but instead emit them for derived type instantiations. Fixes https://github.com/llvm/llvm-project/issues/161961. | 9 个月前 | |
[flang] Main program symbol no longer conflicts with the other symbols (#149169) The following code is now accepted: module m end program m use m end The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name. | 1 年前 | |
[flang] Silence bogus error on local proc pointer initializer (#116663) A procedure pointer is allowed to be initialized with the subprogram in which it is local, assuming that other requirements are satisfied. Add a good test for local procedure pointer initialization, as no test existed for the error message in question. Fixes https://github.com/llvm/llvm-project/issues/116566. | 1 年前 | |
[flang] Correct checking of PRESENT() (#78364) The argument to the PRESENT() intrinsic function must be the name of a a whole OPTIONAL dummy argument. Fixes llvm-test-suite/Fortran/gfortran/regression/present_1.f90. | 2 年前 | |
[flang] Main program symbol no longer conflicts with the other symbols (#149169) The following code is now accepted: module m end program m use m end The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Expunge needless semantics::ProcInterface The ProcInterface structure is used only by ProcEntityDetails; it represents what a program might have put in parentheses in a procedure-declaration-stmt, either the name of a procedure interface or a declaration-type-spec. If a procedure entity has an implicit interface, the function result type (if any) can be kept in EntityDetails::type_, which already exists and is currently redundant for ProcEntityDetails symbols. All that is really needed is a nullable Symbol pointer in ProcEntityDetails to point to the procedure's explicit interface, when it has one. Also, catch the case where a procedure has an explicit interface and a program attempts to also give it a type. Differential Revision: https://reviews.llvm.org/D140134 | 3 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Fix crash in error recovery (implicit host association) (#92795) When a symbol appears in a specification expression in a subprogram contained in a host program unit, semantics may have to create a symbol in the host and use host association to it. This shouldn't happen for nested subprograms that can't import such a symbol, such as interface blocks by default. Further, when host association fails, semantics shouldn't crash. Fixes https://github.com/llvm/llvm-project/issues/92647. | 2 年前 | |
[flang] Preserve errors from generic matching When searching for a matching specific procedure for a set of actual arguments in a type-bound generic interface for a defined operator, don't discard any error messages that may have been produced for the specific that was found. Tweak the code to preserve those messages and add them to the context's messages, and add a test. Differential Revision: https://reviews.llvm.org/D155966 | 3 年前 | |
[flang] Fix purity checking for internal subprograms (#91759) ELEMENTAL internal subprograms are pure unless explicitly IMPURE. | 2 年前 | |
[flang] Add runtime and lowering implementation for extended intrinsic PUTENV (#134412) Implement extended intrinsic PUTENV, both function and subroutine forms. Add PUTENV documentation to flang/docs/Intrinsics.md. Add functional and semantic unit tests. | 1 年前 | |
[flang] Fix pointer definition semantic checking via refactoring 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 | 3 年前 | |
[flang] Rework component KIND= values in PDT instantiations (#162367) When processing the KIND= values of type specifications in parameterized derived type component declarations, it turns out to be necessary to analyze their expressions' parse trees rather than to just fold their typed expression representations. The types of the subexpressions may depend on the values of KIND parameters. Further, when checking the values of KIND= actual arguments to type conversion intrinsic functions (e.g., INT(..., KIND=)) that appear in KIND specifiers for PDT component declarations, don't emit an error for the derived type definition, but instead emit them for derived type instantiations. Fixes https://github.com/llvm/llvm-project/issues/161961. | 9 个月前 | |
[flang] Fix PPC and AARCH64 after #73301 (#74591) After https://github.com/llvm/llvm-project/pull/73301, all semantics tests using triple XXX options need to have a REQUIRED: XX-registered-target since the llvm::TargetMachine is needed to get the llvm::DataLayout before semantics. Fix three tests that lacked this. Fixes: https://lab.llvm.org/buildbot/#/builders/21/builds/87263 https://lab.llvm.org/buildbot/#/builders/268/builds/3841 | 2 年前 | |
[flang] Warn when F128 is unsupported (#102147) (#106957) This generates warning: REAL(KIND=16) is not an enabled type for this target if that type is used in a build not correctly configured to support this type. Uses of selected_real_kind(30) return -1. Relanding #102147 because the test errors turned out to be specific to a downstream configuration. | 1 年前 | |
[flang][cuda] Allow complex type in cuf kernel reduce (#124185) | 1 年前 | |
| 11 个月前 | ||
[flang] Better messages and error recovery for a bad RESHAPE (#122604) Add tests for negative array extents where necessary, motivated by a compiler crash exposed by yet another fuzzer test, and improve overall error message quality for RESHAPE(). Fixes https://github.com/llvm/llvm-project/issues/122060. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Main program symbol no longer conflicts with the other symbols (#149169) The following code is now accepted: module m end program m use m end The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Catch more semantic errors with coarrays (#125536) Detect and report a bunch of uncaught semantic errors with coarray declarations. Add more tests, and clean up bad usage in existing tests. | 1 年前 | |
[flang] Correct disambiguation of possible statement function definitions The statement "A(J) = expr" could be an assignment to an element of an array A, an assignment to the target of a pointer-valued function A, or the definition of a new statement function in the local scope named A, depending on whether it appears in (what might still be) the specification part of a program or subprogram and what other declarations and definitions for A might exist in the local scope or have been imported into it. The standard requires that the name of a statement function appear in an earlier type declaration statement if it is also the name of an entity in the enclosing scope. Some other Fortran compilers mistakenly enforce that rule in the case of an assignment to the target of a pointer-valued function in the containing scope, after misinterpreting the assignment as a new local statement function definition. This patch cleans up the handling of the various possibilities and resolves what was a crash in the case of a statement function definition whose name was the same as that of a procedure in the outer scope whose result is *not* a pointer. Differential Revision: https://reviews.llvm.org/D155493 | 3 年前 | |
[flang] Don't allow function calls to PROCEDURE() (#165786) PROCEDURE() declares a procedure with no interface or result type. (When used to declare a derived type component, it must also be a NOPASS POINTER.) Document that we allow such procedures to be called as subroutines with implicit interfaces, despite the ISO standard -- this is a universal extension to the language. However, no longer allow such procedure entities to be referenced as implicitly-typed functions -- this usage is neither portable nor well-defined, as the compilers that do allow it do not respect the implicit typing rules established at the point of declaration. | 9 个月前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang][driver] Add debug dump options Add the following options: * -fdebug-dump-symbols * -fdebug-dump-parse-tree * -fdebug-dump-provenance Summary of changes: - Add 3 new frontend actions: DebugDumpSymbolsAction, DebugDumpParseTreeAction and DebugDumpProvenanceAction - Add a unique pointer to the Semantics instance created in PrescanAndSemaAction - Move fatal semantic error reporting to its own method, FrontendActions#reportFatalSemanticErrors - Port most tests using -fdebug-dump-symbols and -fdebug-dump-parse-tree to the new driver if built, otherwise default to f18 Differential Revision: https://reviews.llvm.org/D96716 | 5 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Always check procedure characterizability (#92008) When a procedure is defined with a subprogram but never referenced in a compilation unit, it may not be characterized until lowering, and any errors in characterization then may crash the compiler. So always ensure that procedure definitions are characterizable in declaration checking. Fixes https://github.com/llvm/llvm-project/issues/91845. | 2 年前 | |
[flang] Allow forward reference to non-default INTEGER dummy (#141254) A dummy argument with an explicit INTEGER type of non-default kind can be forward-referenced from a specification expression in many Fortran compilers. Handle by adding type declaration statements to the initial pass over a specification part's declaration constructs. Emit an optional warning under -pedantic. Fixes https://github.com/llvm/llvm-project/issues/140941. | 1 年前 | |
[flang] Don't resolve component names to components in derived-type definition scope We implemented 19.3.4p1 literally in name resolution: A component name has the scope of its derived-type definition. Outside the type definition, it may also appear within a designator of a component of a structure of that type or as a component keyword in a structure constructor for that type. and within the derived-type definition would resolve the "bare" names of components in specification inquiries and other contexts to those components, not to any symbols in the enclosing scopes. It turns out that most Fortran compilers resolve only "bare" names thus when they are type parameters, and the names of data and procedure components do not shadow exterior symbols. Adjust name resolution to follow that precedent rather than what seems to be clear language in the standard. Differential Revision: https://reviews.llvm.org/D136984 | 3 年前 | |
[flang] Better error handling for PDT constant expression (#130637) We currently don't consider an integer division to be a constant expression unless its divisor is known and nonzero. This produces a weird result in the linked test; do better. Fixes https://github.com/llvm/llvm-project/issues/130534. | 1 年前 | |
[flang] Ensure that portability warnings are conditional (#71857) 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. | 2 年前 | |
[flang] Silence spurious errors about SAVE (#78765) When an attribute specification statement follows a declaration that applies the SAVE attribute to a symbol, name resolution can produce a spurious error message about redundant SAVEs. Fixes llvm-test-suite/Fortran/gfortran/regression/proc_ptr_9.f90. | 2 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Correct interaction between generics and intrinsics Fortran allows a generic interface to have he same name as an intrinsic procedure. If the intrinsic is explicitly marked with the INTRINSIC attribute, restrictions apply (C848) - the generic must contain only functions or subroutines, depending on the intrinsic. Explicit or not, the generic overrides the intrinsic, but the intrinsic behavior must still be available for calls whose actual arguments do not match any of the specific procedures. Semantics was not checking constraint C848, and it didn't allow an explicit INTRINSIC attribute on a name of a generic interface. Differential Revision: https://reviews.llvm.org/D123713 | 4 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Prefer non-elemental to elemental defined operator resolution (#124941) A non-elemental specific procedure must take precedence over an elemental specific procedure in defined operator generic resolution. Fixes https://github.com/llvm/llvm-project/issues/124777. | 1 年前 | |
[flang] Fix internal error with DATA-statement style initializers The code below causes flang to crash with an exception. After fixing the crash flang with an internal error "no symbol found for 'bar'" This change fixes all the issues. program name implicit none integer, parameter :: bar = 1 integer foo(bar) /bar*2/ end program name Reviewed By: kiranchandramohan, klausler Differential Revision: https://reviews.llvm.org/D124914 | 4 年前 | |
[flang] Fix use-associated false-positive error For the program provided as the test case flang fired the following error: error: Semantic errors in main.f90 error: 'foo' is not a procedure This change fixes the error by postponing handling of UseErrorDetails from CharacterizeProcedure to a later stage. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D125791 | 4 年前 | |
[flang] Support BIND(C) variable scope check As Fortran 2018 C819, a variable with the BIND attribute shall be declared in the specification part of a module. Add the support for this check. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D126653 | 4 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Clarify cases where name resolution of generic shadowing can be overridden Fortran famously allows a generic interface definition to share a scope with a procedure or derived type of the same name. When that shadowed name is accessed via host or USE association, but is also defined by an interface in the generic, then name resolution needs to fix up the representation of the shadowing so that the new interface definition is seen as the shadowed symbol -- the host or USE associated name is not material to the situation. See the new test case for particular examples. Differential Revision: https://reviews.llvm.org/D136891 | 3 年前 | |
[flang] Fix USE rename Fix USE rename when use-name and local-name are the same. Previously, the associated symbol was being removed from scope. Operator rename implementation needed no change, because, as it doesn't call AddUseRename(), symbol erasure is skipped. Fixes #60223 Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D143933 | 3 年前 | |
[flang] Catch type-bound generic with inherited indistinguishable spe… (#128980) …cific When checking generic procedures for indistinguishable specific procedures, don't neglect to include specific procedures from any accessible instance of the generic procedure inherited from its parent type.. Fixes https://github.com/llvm/llvm-project/issues/128760. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Allow redudant attributes on use-/host- associated names Constraint C815 in F'2018 allows a name to acquire an attribute at most once per scope. For some attributes, the attribute may have already been inherited, and the compiler was emitting a bogus error message for a redundant application of the same attribute in another scope. Fixes https://github.com/llvm/llvm-project/issues/60274 Differential Revision: https://reviews.llvm.org/D150819 | 3 年前 | |
[flang] Improve module file error message wording (#122787) Instead of "Cannot read ...", distinguish true errors in finding and parsing module files from problems with unexpected hash codes by using "Cannot parse" or "Cannot use" wording as appropriate. | 1 年前 | |
[flang] Fix GENERIC, PUBLIC/PRIVATE The handling of accessibility attributes on GENERIC statements outside derived type definitions is incorrect in name resolution. Change it to use the usual BeginAttrs()/EndAttrs() infrastructure. Differential Revision: https://reviews.llvm.org/D159032 | 2 年前 | |
[flang][OpenMP] Make static duration variables default to shared DSA (#142783) According to the OpenMP standard, variables with static storage duration are predetermined as shared. Add a check when creating implicit symbols for OpenMP to fix them erroneously getting set to firstprivate. Fixes llvm#140732. --------- Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com> | 1 年前 | |
[flang] Silence bogus USE statement error (#79896) When there are multiple USE statement for a particular module using renaming, it is necessary to collect a set of all of the original renaming targets before processing any of USE statements that don't have ONLY: clauses. Currently, if there is a name in the module that can't be added to the current scope -- due to a conflict with an internal or module subprogram, or with a previously use-associated name -- the compiler will emit a bogus error message even if that conflicting name appear on a later USE statement of the same module as the target of a renaming. The new regression test case added with this patch provides a motivating example. | 2 年前 | |
[flang][Semantics][OpenMP] don't reduce variables in namelist (#110671) This is allowed by the OpenMP and F23 standards. But variables in a namelist are not allowed in OpenMP privatisation. I suspect this was an oversight. If we allow this we run into problems masking the original symbol with the symbol for the reduction variable when the variable is accessed via a namelist initialised as a global variable. See #101907. One solution for this would be to force the namelist to always be initilized inside of the block in which it is used (therefore using the correct mapping for the reduction variable), but this could make some production applications slow. I tentatively think it is probably better to disallow a (perhaps mistaken) edge case of the standards with (I think) little practical use, than to make real applications slow in order to make this work. If reviewers would rather keep to the letter of the standard, see #109303 which implements the alternative solution. I'm open to either path forward. Fixes #101907 | 1 年前 | |
[flang] Add parsing of DO CONCURRENT REDUCE clause (#92518) Derived from #92480. This PR supports parsing of the DO CONCURRENT REDUCE clause in Fortran 2023. Following the style of the OpenMP parser in MLIR, the front end accepts both arbitrary operations and procedures for the REDUCE clause. But later Semantics can notify type errors and resolve procedure names. | 2 年前 | |
[flang] Main program symbol no longer conflicts with the other symbols (#149169) The following code is now accepted: module m end program m use m end The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name. | 1 年前 | |
[flang] Catch both EXTERNAL and INTRINSIC on type declaration stmt (#150254) The EXTERNAL and INTRINSIC attributes can't both appear on the same type declarations statement. Fixes https://github.com/llvm/llvm-project/issues/149771. | 1 年前 | |
[flang] Fix name resolution bug (#158749) When the current scope is an implied DO loop nested within a derived type declaration, it is possible for name resolution to mistakenly resolve a name to a component rather than to a name in the outer scope. Fix. Fixes https://github.com/llvm/llvm-project/issues/158412. | 10 个月前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Fix bogus errors about CONTIGUOUS attribute Incorrect error messages were issuing for symbol table entries with the CONTIGUOUS attribute that didn't deserve them, like host association symbols. Put the CONTIGUOUS check into CheckObjectEntity(). Differential Revision: https://reviews.llvm.org/D150712 | 3 年前 | |
[flang] Allow reference to earlier generic in later interface Name resolutions defers all resolution and checking of specific procedures in non-type-bound generic interfaces to the end of the specification part. This prevents expression analysis of references to generic functions in specification expressions in interfaces from resolving. Example (now a new test case in modfile07.f90): module m12 interface generic module procedure specific end interface interface module subroutine s(a1,a2) character(*) a1 character(generic(a1)) a2 ! <-- end end interface contains pure integer function specific(x) character(*), intent(in) :: x specific = len(x) end end The solution is to partially resolve specific procedures as they are defined for each generic, when they can be resolved, with the final pass at the end of the specification part to finish up any forward references and emit the necessary error messages. Making this fix caused some issues in module file output, which have all been resolved by making this simplifying change: generics are now all emitted to module file specification parts as their own group of declarations at the end of the specification part, followed only by namelists and COMMON blocks. Differential Revision: https://reviews.llvm.org/D157346 | 2 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Downgrade error to warning for consistency (#157191) When a procedure name is declared EXTERNAL and then followed up with an explicit INTERFACE, the compiler emits an error when the procedure is a dummy procedure but only a warning otherwise. Since the EXTERNAL statement is harmless in both cases, accept the case of a dummy procedure as well for consistency. Fixes https://github.com/llvm/llvm-project/issues/157162. | 10 个月前 | |
[flang] Improve error message with declaration (#87294) When a program attempts to use a non-object entity as the base of a component reference or type parameter inquiry, the message is somewhat uninformative and the position of the entity's declaration will not reflect any updates made to the symbol during name resolution. Includes some NFC C++17 style clean-up on some code noticed while debugging (missing mandatory braces). | 2 年前 | |
[flang] Make generic resolution conform to 15.5.5.2 w/r/t host association When two or more generic interfaces are available by declaration or by USE association at different scoping levels, we need to search the outer generic interfaces as well as the inner ones, but only after the inner ones have failed to produce a specific procedure that matches a given set of actual arguments. This means that it is possible for a specific procedure of a generic interface of an inner scope to override a conflicting specific procedure of a generic interface of an outer scope. Also cope with forward references to derived types when a generic interface is also in scope. Fixes LLVM bug https://github.com/llvm/llvm-project/issues/55240 and LLVM bug https://github.com/llvm/llvm-project/issues/55300. Differential Revision: https://reviews.llvm.org/D126587 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Allow reference to earlier generic in later interface Name resolutions defers all resolution and checking of specific procedures in non-type-bound generic interfaces to the end of the specification part. This prevents expression analysis of references to generic functions in specification expressions in interfaces from resolving. Example (now a new test case in modfile07.f90): module m12 interface generic module procedure specific end interface interface module subroutine s(a1,a2) character(*) a1 character(generic(a1)) a2 ! <-- end end interface contains pure integer function specific(x) character(*), intent(in) :: x specific = len(x) end end The solution is to partially resolve specific procedures as they are defined for each generic, when they can be resolved, with the final pass at the end of the specification part to finish up any forward references and emit the necessary error messages. Making this fix caused some issues in module file output, which have all been resolved by making this simplifying change: generics are now all emitted to module file specification parts as their own group of declarations at the end of the specification part, followed only by namelists and COMMON blocks. Differential Revision: https://reviews.llvm.org/D157346 | 2 年前 | |
[flang] Improve module file error message wording (#122787) Instead of "Cannot read ...", distinguish true errors in finding and parsing module files from problems with unexpected hash codes by using "Cannot parse" or "Cannot use" wording as appropriate. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Handle forward reference to shadowing derived type from IMPLICIT (#87280) A derived type name in an IMPLICIT statement might be a host association or it might be a forward reference to a local derived type, which may be shadowing a host-associated name. Add a scan over the specification part in search of derived type definitions to determine the right interpretation. Fixes https://github.com/llvm/llvm-project/issues/87215. | 2 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Fix checking of TBP bindings Non-DEFERRED procedure binding checking can't blindly accept all procedures defined in modules -- they can't be ABSTRACT interfaces. And GetUltimate() must be used rather than FindSubprogram(); the latter will resolve to a procedure's interface in the case of "procedure(interface) :: external", not "external". Differential Revision: https://reviews.llvm.org/D145749 | 3 年前 | |
[flang] Detect use-before-decl errors on type parameters (#99947) Ensure that type parameters are declared as such before being referenced within the derived type definition. (Previously, such references would resolve to symbols in the enclosing scope.) This change causes the symbols for the type parameters to be created when the TYPE statement is processed in name resolution. They are TypeParamDetails symbols with no KIND/LEN attribute set, and they shadow any symbols of the same name in the enclosing scope. When the type parameter declarations are processed, the KIND/LEN attributes are set. Any earlier reference to a type parameter with no KIND/LEN attribute elicits an error. Some members of TypeParamDetails have been retyped &/or renamed. | 2 年前 | |
[flang] PRIVATE statement in derived type applies to proc components (#139336) A PRIVATE statement in a derived type definition is failing to set the default accessibility of procedure pointer components; fix. Fixes https://github.com/llvm/llvm-project/issues/138911. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Fixed a crash with undeclared variable in implicit-do loop (#149513) Fixed a crash in the following example: subroutine sub() implicit none print *, (i, i = 1, 2) ! Problem: using undefined var in implied-do loop end subroutine sub The error message was already generated, but the compiler crashed before it could display it. | 1 年前 | |
[flang] Make REAL/COMPLEX(10) a hard error for non-x86 targets (#124655) Currently the use of REAL/COMPLEX(KIND=10) as a type or literal constant suffix elicits an optional warning message only. This leads to compiler internal errors during lowering when these types appear in code being compiled to non-x86_64 targets. For better error messaging, make the use of these types a hard error in semantics instead when they are not supported by the target architecture. | 1 年前 | |
[flang] Consolidate & clean up COMMON block checks (#161286) COMMON block checks are split between name resolution and declaration checking. We generally want declaration checks to take place after name resolution, and the COMMON block checks that are currently in name resolution have some derived type analyses that are redundant with the derived type component iteration framework used elsewhere in semantics. So move as much as possible into declaration checking, use the component iteration framework, and cope with the missing COMMON block name case that arises with blank COMMON when placing the error messages. | 10 个月前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Fix constraint check on CLASS() entities Entities declared with CLASS() must be dummy arguments, allocatables, or pointers. This constraint check is currently correct for objects but not for procedures, and getting it right needs to avoid being confused between pointers to procedures and pointers returned by procedures. Differential Revision: https://reviews.llvm.org/D155491 | 3 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Enforce a program not including more than one main program As Fortran 2018 5.2.2 states, a program shall consist of exactly one main program. Add this semantic check. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D125186 | 4 年前 | |
[flang] Catch more semantic errors with coarrays (#125536) Detect and report a bunch of uncaught semantic errors with coarray declarations. Add more tests, and clean up bad usage in existing tests. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Avoid crash in error recovery When a PASS() clause names a nonexistent dummy argument, don't crash later in expression semantics. Fixes https://github.com/llvm/llvm-project/issues/63487. Differential Revision: https://reviews.llvm.org/D153792 | 3 年前 | |
[flang] Warn about undefined function results (#99533) 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. | 2 年前 | |
[flang] Restore error status for many indistinguishable specifics (#79927) A recent patch to allow pFUnit to compile softened the diagnostic about indistinguishable specific procedures to a portability warning. It turns out that this was overkill -- for specific procedures containing no optional or unlimited polymorphic dummy data arguments, a diagnosis of "indistinguishable" can still be a hard error. So adjust the analysis to be tri-state: two procedures are either definitely distinguishable, definitely indistinguishable without optionals or unlimited polymorphics, or indeterminate. Emit errors as before for the definitely indistinguishable cases; continue to emit portability warnings for the indeterminate cases. When this patch is merged, all but one of the dozen or so tests that I disabled in llvm-test-suite can be re-enabled. | 2 年前 | |
[flang] Check for ultimate ALLOCATABLE component in LOCAL_INIT() (#145800) Fortran 2023 constraint C1130 disallows variables of derived type with ultimate allocatable component to appear in LOCAL_INIT(). | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Fix pointer definition semantic checking via refactoring 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 | 3 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Warn about inconsistent external procedure interfaces When multiple scopes in a compilation define interfaces (explicit or implicit) for an external procedure, warn when those interfaces are inconsistent. Differential Revision: https://reviews.llvm.org/D146574 | 3 年前 | |
[flang] Refine checks for NULL() in expressions (#163655) Fix a false positive "NULL can't be an operand here" error message arising in a defined generic interface for an intrinsic operator (==) with multiple spellings. Fixes https://github.com/llvm/llvm-project/issues/163255. | 9 个月前 | |
[flang] Enforce accessibility requirement on type-bound generic operators, &c. Type-bound generics like operator(+) and assignment(=) need to not be PRIVATE if they are used outside the module in which they are declared. Differential Revision: https://reviews.llvm.org/D139123 | 3 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Respect function vs subroutine distinction in generic matching When checking the specific procedures of a generic interface for a match against a given set of actual arguments, be sure to not match a function against a subroutine call or vice versa. (We generally catch and warn about attempts to declare mixed interfaces, but they are usually conforming and can be inadvertently created when generics are merged due to USE and host association.) Differential Revision: https://reviews.llvm.org/D139059 | 3 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Fix constraint check on CLASS() entities Entities declared with CLASS() must be dummy arguments, allocatables, or pointers. This constraint check is currently correct for objects but not for procedures, and getting it right needs to avoid being confused between pointers to procedures and pointers returned by procedures. Differential Revision: https://reviews.llvm.org/D155491 | 3 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Settle ambiguity between C795 and C721 C721 says that a type parameter value of '*' is permitted in the type-spec for a named constant; C795 says that such type parameters are allowed in type-specs only for a few kinds of things, not including named constants. The interpretation seems to depend on context, with C721 applying to intrinsic types (i.e., character) and C795 applying only to derived types. Differential Revision: https://reviews.llvm.org/D146586 | 3 年前 | |
[flang] Settle ambiguity between C795 and C721 C721 says that a type parameter value of '*' is permitted in the type-spec for a named constant; C795 says that such type parameters are allowed in type-specs only for a few kinds of things, not including named constants. The interpretation seems to depend on context, with C721 applying to intrinsic types (i.e., character) and C795 applying only to derived types. Differential Revision: https://reviews.llvm.org/D146586 | 3 年前 | |
[flang] Settle ambiguity between C795 and C721 C721 says that a type parameter value of '*' is permitted in the type-spec for a named constant; C795 says that such type parameters are allowed in type-specs only for a few kinds of things, not including named constants. The interpretation seems to depend on context, with C721 applying to intrinsic types (i.e., character) and C795 applying only to derived types. Differential Revision: https://reviews.llvm.org/D146586 | 3 年前 | |
[flang] Fix pointer definition semantic checking via refactoring 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 | 3 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Catch more semantic errors with coarrays (#125536) Detect and report a bunch of uncaught semantic errors with coarray declarations. Add more tests, and clean up bad usage in existing tests. | 1 年前 | |
[flang] Catch bad inquiries in specification expressions When a descriptor inquiry or inquiry function's result is not constant and is known to be impossible to correctly determine at runtime, raise an error. For example, LEN(X) when X is a local allocatable variable with deferred length. Differential Revision: https://reviews.llvm.org/D142759 | 3 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Allow PROCEDURE() with explicit type elsewhere (#82835) Fortran allows a procedure declaration statement with no interface or type, with an explicit type declaration statement elsewhere being used to define a function's result. Fixes https://github.com/llvm/llvm-project/issues/82006. | 2 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Better messages for function vs. array errors When a scalar-valued function with no distinct RESULT is being called recursively in its own executable part, emit a better message about the error. Clean up the code that resolves function vs. array ambiguities in expression semantics. Update to address review comment Differential Revision: https://reviews.llvm.org/D117577 | 4 年前 | |
[flang] Revamp evaluate::CoarrayRef (#136628) Bring the typed expression representation of a coindexed reference up to F'2023, which removed some restrictions that had allowed the current representation to suffice for older revisions of the language. This new representation is somewhat more simple -- it uses a DataRef as its base, so any subscripts in a part-ref can be represented as an ArrayRef there. Update the code that creates the CoarrayRef, and add more checking to it, as well as actually capturing any STAT=, TEAM=, & TEAM_NUMBER= specifiers that might appear. Enforce the constraint that the part-ref must have subscripts if it is an array. (And update a pile of copied-and-pasted test code that lacked such subscripts.) | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Restore error status for many indistinguishable specifics (#79927) A recent patch to allow pFUnit to compile softened the diagnostic about indistinguishable specific procedures to a portability warning. It turns out that this was overkill -- for specific procedures containing no optional or unlimited polymorphic dummy data arguments, a diagnosis of "indistinguishable" can still be a hard error. So adjust the analysis to be tri-state: two procedures are either definitely distinguishable, definitely indistinguishable without optionals or unlimited polymorphics, or indeterminate. Emit errors as before for the definitely indistinguishable cases; continue to emit portability warnings for the indeterminate cases. When this patch is merged, all but one of the dozen or so tests that I disabled in llvm-test-suite can be re-enabled. | 2 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][driver] Add debug dump options Add the following options: * -fdebug-dump-symbols * -fdebug-dump-parse-tree * -fdebug-dump-provenance Summary of changes: - Add 3 new frontend actions: DebugDumpSymbolsAction, DebugDumpParseTreeAction and DebugDumpProvenanceAction - Add a unique pointer to the Semantics instance created in PrescanAndSemaAction - Move fatal semantic error reporting to its own method, FrontendActions#reportFatalSemanticErrors - Port most tests using -fdebug-dump-symbols and -fdebug-dump-parse-tree to the new driver if built, otherwise default to f18 Differential Revision: https://reviews.llvm.org/D96716 | 5 年前 | |
[flang] Support "PRINT namelistname" (#112024) Nearly every Fortran compiler supports "PRINT namelistname" as a synonym for "WRITE (*, NML=namelistname)". Implement this extension via parse tree rewriting. Fixes https://github.com/llvm/llvm-project/issues/111738. | 1 年前 | |
[flang] Fix rewriting of misparsed statement functions (#112934) Fortran's syntax is ambiguous for some assignment statements (to array elements or to the targets of pointers returned by functions) that appear as the first executable statements in a subprogram or BLOCK construct. Is A(I)=X a statement function definition at the end of the specification part, or ar array element assignment statement, or an assignment to a pointer returned by a function named A? Since f18 builds a parse tree for the entire source file before beginning any semantic analysis, we can't tell which is which until after name resolution, at which point the symbol table has been built. So we have to walk the parse tree and rewrite some misparsed statement function definitions that really were assignment statements. There's a bug in that code, though, due to the fact that the implementation used state in the parse tree walker to hold a list of misparsed statement function definitions extracted from one specification part to be reinserted at the beginning of the next execution part that is visited; it didn't work for misparsed cases BLOCK constructs. Their parse tree nodes encapsulate a parser::Block, not an instance of the wrapper class parser::ExecutionPart. So misparsed statement functions in BLOCK constructs were being rewritten into assignment statement that were inserted at the beginning of the executable part of the following subprogram, if and wherever one happened to occur. This led to crashes in lowering and much astonishment. A simple fix would have been to adjust the rewriting code to always insert the list at the next visited parser::Block, since parser::ExecutionPart is just a wrapper around Block anyway; but this patch goes further to do the "right thing", which is a restructuring of the rewrite that avoids the use of state and any assumptions about parse tree walking visitation order. Fixes https://github.com/llvm/llvm-project/issues/112549. | 1 年前 | |
[flang] Add support for LSHIFT and RSHIFT intrinsics The functionality of LSHIFT and RSHIFT intrinsics is the same as the standard SHIFTL and SHIFTA intrinsics respectively. The patch is to alias the two intrinsics to the standardized ones. Differential Revision: https://reviews.llvm.org/D138839 | 3 年前 | |
[flang] Add -fno-automatic, refine IsSaved() This legacy option (available in other Fortran compilers with various spellings) implies the SAVE attribute for local variables on subprograms that are not explicitly RECURSIVE. The SAVE attribute essentially implies static rather than stack storage. This was the default setting in Fortran until surprisingly recently, so explicit SAVE statements & attributes could be and often were omitted from older codes. Note that initialized objects already have an implied SAVE attribute, and objects in COMMON effectively do too, as data overlays are extinct; and since objects that are expected to survive from one invocation of a procedure to the next in static storage should probably be explicit initialized in the first place, so the use cases for this option are somewhat rare, and all of them could be handled with explicit SAVE statements or attributes. This implicit SAVE attribute must not apply to automatic (in the Fortran sense) local objects, whose sizes cannot be known at compilation time. To get the semantics of IsSaved() right, the IsAutomatic() predicate was moved into Evaluate/tools.cpp to allow for dynamic linking of the compiler. The redundant predicate IsAutomatic() was noticed, removed, and its uses replaced. GNU Fortran's spelling of the option (-fno-automatic) was added to the clang-based driver and used for basic sanity testing. Differential Revision: https://reviews.llvm.org/D114209 | 4 年前 | |
[flang] Add -fno-automatic, refine IsSaved() This legacy option (available in other Fortran compilers with various spellings) implies the SAVE attribute for local variables on subprograms that are not explicitly RECURSIVE. The SAVE attribute essentially implies static rather than stack storage. This was the default setting in Fortran until surprisingly recently, so explicit SAVE statements & attributes could be and often were omitted from older codes. Note that initialized objects already have an implied SAVE attribute, and objects in COMMON effectively do too, as data overlays are extinct; and since objects that are expected to survive from one invocation of a procedure to the next in static storage should probably be explicit initialized in the first place, so the use cases for this option are somewhat rare, and all of them could be handled with explicit SAVE statements or attributes. This implicit SAVE attribute must not apply to automatic (in the Fortran sense) local objects, whose sizes cannot be known at compilation time. To get the semantics of IsSaved() right, the IsAutomatic() predicate was moved into Evaluate/tools.cpp to allow for dynamic linking of the compiler. The redundant predicate IsAutomatic() was noticed, removed, and its uses replaced. GNU Fortran's spelling of the option (-fno-automatic) was added to the clang-based driver and used for basic sanity testing. Differential Revision: https://reviews.llvm.org/D114209 | 4 年前 | |
[flang] Improve error reporting for procedures determined by usage (#88184) When a symbol is known to be a procedure due to its being referenced as a function or subroutine, improve the error messages that appear if the symbol is also used as an object by attaching the source location of its procedural use. Also, for errors spotted in name resolution due to how a given symbol has been used, don't unconditionally set the symbol's error flag (which is otherwise generally a good idea, to prevent cascades of errors), so that more unrelated errors related to usage will appear. | 2 年前 | |
[flang][MSVC] Change XFAIL to UNSUPPORTED for disabled test Test flang/test/Semantics/select-rank02.f90 has an unresolved failure when built with MSVC on an x86 Windows buildbot, but it passes on an Arm Windows buildbot. Change XFAIL to UNSUPPORTED to dodge an XPASS buildbot complaint on the Arm Windows buildbot. | 3 年前 | |
[flang] Add/fix some semantic checks for assumed-rank (#96194) Catch some cases where assumed rank dummy arguments are not allowed. | 2 年前 | |
[flang] Error out when assumed rank variable in used as selector in SELECT TYPE statement (#74286) This patch adds a check to error out when an assumed rank variable is used as dummy argument. Fixes https://github.com/llvm/llvm-project/issues/74285 | 2 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Do not traverse selectors in FindImpureCall and HasVectorSubscript (#84041) In presence of symbols with AssocEntityDetails in an expression, Traverse, AnyTraverse, AllTraverse, and SetTraverse automatically visit the selector expression or variable. This is most often the desired behavior but can be surprising, and was not correct for FindImpureCall and HasVectorSubscript. Add a default template option to flag the behavior to someone willing to use the Traverse helper for a new utility, and set this template to false for FindImpureCall and HasVectorSubscript. | 2 年前 | |
[flang] Rework F'2023 constraint C1167 checking (#83888) The code that verifies that the type in a TYPE IS or CLASS IS clause is a match or an extension of the type of the SELECT TYPE selector needs rework to avoid emitting a bogus error for a test. Fixes https://github.com/llvm/llvm-project/issues/83612. | 2 年前 | |
[flang] Handle indirect USE of ancestor module into submodule (#124969) A USE statement within a submodule (possibly in a nested scope) is not allowed to USE the submodule's ancestor module directly, but it is permissible to USE that ancestor module indirectly via another unrelated module. Don't emit "already present in scope" errors for this case. Fixes https://github.com/llvm/llvm-project/issues/124731. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Fine-tune function result equivalence checking (#70260) When a separate module function's definition has a redundant interface -- it's defined with MODULE FUNCTION, not MODULE PROCEDURE -- the check for result type equivalence needs to allow for character lengths that are the results of specification expressions. At present, identical-looking length specification expression don't compare equal, since they can refer to distinct dummy argument symbols. Ensure just that they are both constant or not, and if constant, that the lengths have the same value. | 2 年前 | |
[flang] Allow for submodule override of module procedure When checking that a module procedure definition is unique, allow for the possibility that a submodule may contain a module procedure interface that shadows a module procedure of the same name in its (sub)module parent. In other words, module procedure definitions need only be unique in the tree of submodules rooted at the (sub)module containing the relevant module procedure interface. Differential Revision: https://reviews.llvm.org/D159033 | 2 年前 | |
[Flang] Fix to the module procedure interface block ignoring implicit… (#85735) … of host scoping unit. Fix as proposed by @thtsikas [here ](https://github.com/llvm/llvm-project/commit/11d07d9ef618497b825badee8b4f06a48575606b#commitcomment-139798026). | 2 年前 | |
[flang] Derived type structural equivalence (#69376) F'202X 7.5.2.4 describes conditions under which two derived type definitions are to be considered equivalent. These rules are already implemented in Evaluate/type.cpp but not exposed for general use; rearrange the code a little so that the compatibility checking of separate module procedure interfaces and explicit definitions can use it to avoid emitting a bogus error message. Fixes https://github.com/llvm/llvm-project/issues/67946. | 2 年前 | |
[flang] Fix bad shape analysis of assumed-rank dummy (#92936) Shape analysis for the results of SHAPE, LBOUND, and UBOUND (without DIM=) needs to account for an assumed-rank dummy argument, and return a shape vector with a single unknown element. | 2 年前 | |
| 1 年前 | ||
[flang] Silence impossible error about SMP interface incompatibility (#112054) It is possible for the compiler to emit an impossible error message about dummy argument character length incompatibility in the case of a MODULE SUBROUTINE or FUNCTION defined later in a submodule with MODULE PROCEDURE, when the character length is defined by USE association in its interface. The checking for separate module procedure interface compatibility needs to use a more flexible check than just operator== on a semantics::ParamValue. | 1 年前 | |
[flang] Silence bogus error about insufficiently defined interfaces (#116694) The interfaces of separate module procedures are sufficiently well defined in a submodule to be used in a local generic interface; the compiler just needed to work a little harder to find them. Fixes https://github.com/llvm/llvm-project/issues/116567. | 1 年前 | |
[flang] Fix spurious error with separate module procedures (#106768) When the implementation of one SMP apparently references another in what might be a specification expression, semantics may need to resolve it as a forward reference, and to allow for the replacement of a SubprogramNameDetails place-holding symbol with the final SubprogramDetails symbol. Otherwise, as in the bug report below, confusing error messages may result. (The reference in question isn't really in the specification part of a subprogram, but due to the syntactic ambiguity between the array element assignment statement and a statement function definition, it appears to be so at the time that the reference is processed.) I needed to make DumpSymbols() available via SemanticsContext to analyze this bug, and left that new API in place to make things easier next time. Fixes https://github.com/llvm/llvm-project/issues/106705. | 1 年前 | |
[flang][warnings] systematically guard warnings (#154234) This change modifies the messages API to make it impossible to forget to call ShouldWarn by moving the call inside of the API. The low level API should be avoided and developers should call Warn on a SemanticContext or FoldingContext. | 11 个月前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Add stopped_images to list of intrinsics and add test Add stopped_images to the list of intrinsic functions. Add a semantics test for stopped_images. Reviewed By: klausler, ngeorge1098 Differential Revision: https://reviews.llvm.org/D129513 | 3 年前 | |
[flang] Make not yet implemented messages more consistent To make it easier to find things that are not yet implemented, I'm changing the messages that appear in the compiler's output to all have the string "not yet implemented:". These changes apply to files in the front end. I have another set of changes to files in the lowering code. Differential Revision: https://reviews.llvm.org/D122355 | 4 年前 | |
[flang] add nested DEC STRUCTURE in DerivedTypeDetails component names Currently, when a (legacy) DEC structure contained other DEC structure declarations, the related component names were not added to the containing DerivedTypeDetails component_names. This lead to bugs in later phase when visiting the components (like in when lowering the type to FIR/MLIR). When an EntityDecl is visited and the scope is a DEC structure, add the entity to the component names of this DEC structure. Differential Revision: https://reviews.llvm.org/D154216 | 3 年前 | |
[flang] A nested STRUCTURE must declare entities (#99379) When a DEC legacy STRUCTURE definition appears within another, its STRUCTURE statement must also declare some components of the enclosing structure. Fixes https://github.com/llvm/llvm-project/issues/99288. | 2 年前 | |
[flang] Accept structure constructor value for polymorphic component Semantic analysis was emitting a bogus error message when a structure constructor contains a monomorphic value for a (limited) polymorphic component of a derived type. The type compatibility test was too strict; this patch relaxes it a little to allow values that could be assigned or passed to a variable or dummy argument with that type. Also add some quotes to an error message that was sometimes confusing without them, and remove a repeated space character from another. Differential Revision: https://reviews.llvm.org/D119744 | 4 年前 | |
[flang] Improve error message output (#102324) When a local character variable with non-constant length has an initializer, it's an error in a couple of ways (SAVE variable with unknown size, static initializer that isn't constant due to conversion to an unknown length). The error that f18 reports is the latter, but the message contains a formatted representation of the initialization expression that exposes a non-Fortran %SET_LENGTH() operation. Print the original expression in the message instead. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Ensure that structure constructors fold parameter references Structure contructors for instances of parameterized derived types must have their components' values folded in the context of the values of the type parameters. Differential Revision: https://reviews.llvm.org/D125116 | 4 年前 | |
[flang] Add structure constructor with allocatable component (#77845) Enable the structure constructor with allocatable component support. Handling of null() for the allocatable component is added. | 2 年前 | |
[flang] Add structure constructor with allocatable component (#77845) Enable the structure constructor with allocatable component support. Handling of null() for the allocatable component is added. | 2 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Catch non-constant targets for procedure pointer initialization (#86338) Detect attempts to use non-constant targets, including internal procedures, as initializers for procedure pointers, including components of structure components being used as initializers. | 2 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Don't misinterpret valid component value for ancestor type (#161910) As a common language extension, this compiler accepts a structure constructor whose first value has no keyword and whose type matches an ancestral type as if the constructor had had a keyword whose name was the ancestral type. For example, given TYPE PARENT; REAL X; END TYPE TYPE, EXTENDS(PARENT) :: CHILD; END TYPE we accept the nonconforming constructor "child(parent(1.))" as if it had been the conforming "child(1.)" or "child(parent=parent(1.))". The detection of this case needs to be constrained a bit to avoid a false positive misinterpretation of conforming code in the case where the actual first component of the derived type is a POINTER or ALLOCATABLE whose type and rank would allow it to correspond with the keywordless first value in the component value list. Fixes https://github.com/llvm/llvm-project/issues/161887. | 9 个月前 | |
[flang] Use instantiated PDT for structure constructor in default init (#167409) A structure constructor used in (or as) the default component initializer for a PDT derived type component needs to traverse the scope of the right PDT instantiation. Fixes https://github.com/llvm/llvm-project/issues/167337 and fixes https://github.com/llvm/llvm-project/issues/167573. | 8 个月前 | |
[Flang] Ported test_symbols to Python Due to unavailability of Flang testing on Windows, the shell scripts are being ported to Python. The following changes are being made in this patch: removed test_symbols.sh and common.sh, and ported them to Python. Changes to the tests themselves so that they use the python scripts instead of the shell script. Reviewed By: Meinersbur, awarzynski, kiranchandramohan Differential Revision: https://reviews.llvm.org/D107041 | 4 年前 | |
[Flang] Ported test_symbols to Python Due to unavailability of Flang testing on Windows, the shell scripts are being ported to Python. The following changes are being made in this patch: removed test_symbols.sh and common.sh, and ported them to Python. Changes to the tests themselves so that they use the python scripts instead of the shell script. Reviewed By: Meinersbur, awarzynski, kiranchandramohan Differential Revision: https://reviews.llvm.org/D107041 | 4 年前 | |
[flang] Main program symbol no longer conflicts with the other symbols (#149169) The following code is now accepted: module m end program m use m end The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name. | 1 年前 | |
[flang] Correct IsHostAssociated() to be true for BLOCK constructs The predicate IsHostAssocited() was implemented in a way that would return true only for cases of host association into a module or inner subprogram. Technically, the use of a name in a BLOCK construct that is not declared therein is considered in the Fortran standard to also be a form of host association, and this matters when doing error checking on DATA statements. Differential Revision: https://reviews.llvm.org/D130388 | 3 年前 | |
[flang] Main program symbol no longer conflicts with the other symbols (#149169) The following code is now accepted: module m end program m use m end The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name. | 1 年前 | |
[flang] Main program symbol no longer conflicts with the other symbols (#149169) The following code is now accepted: module m end program m use m end The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name. | 1 年前 | |
[flang] Main program symbol no longer conflicts with the other symbols (#149169) The following code is now accepted: module m end program m use m end The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name. | 1 年前 | |
[flang] Allow nested scopes for implied DO loops with DATA statements (#129410) Previously, nested scopes for implied DO loops with DATA statements were disallowed, which meant that the following code couldn't compile due to re-use of j loop variable name: DATA (a(i),(b(i,j),j=1,3),(c(i,j),j=1,3),i=0,4)/ This change allows nested scopes implied DO loops, which allows the code above to compile. Tests modified to in accordance with this change: Semantics/resolve40.f90, Semantics/symbol09.f90 | 1 年前 | |
[Flang] Ported test_symbols to Python Due to unavailability of Flang testing on Windows, the shell scripts are being ported to Python. The following changes are being made in this patch: removed test_symbols.sh and common.sh, and ported them to Python. Changes to the tests themselves so that they use the python scripts instead of the shell script. Reviewed By: Meinersbur, awarzynski, kiranchandramohan Differential Revision: https://reviews.llvm.org/D107041 | 4 年前 | |
[flang] Enforce more restrictions on I/O data list items 12.6.3p5 requires an I/O data list item to have a defined I/O procedure if it is polymorphic. (We could defer this checking to the runtime, but no other Fortran compiler does so, and we would also have to be able to catch the case of an allocatable or pointer direct component in the absence of a defined I/O subroutine.) Also includes a patch to name resolution that ensures that a SELECT TYPE construct entity is polymorphic in the domain of a CLASS IS guard. Also ensures that non-defined I/O of types with PRIVATE components is caught. Differential Revision: https://reviews.llvm.org/D139050 | 3 年前 | |
[Flang] Ported test_symbols to Python Due to unavailability of Flang testing on Windows, the shell scripts are being ported to Python. The following changes are being made in this patch: removed test_symbols.sh and common.sh, and ported them to Python. Changes to the tests themselves so that they use the python scripts instead of the shell script. Reviewed By: Meinersbur, awarzynski, kiranchandramohan Differential Revision: https://reviews.llvm.org/D107041 | 4 年前 | |
[flang] Refine error checking in specification expressions The rules in the Fortran standard for specification expressions are full of special cases and exceptions, and semantics didn't get them exactly right. It is valid to refer to an INTENT(OUT) dummy argument in a specification expression in the context of a specification inquiry function like SIZE(); it is not valid to reference an OPTIONAL dummy argument outside of the context of PRESENT. This patch makes the specification expression checker a little context-sensitive about whether it's examining an actual argument of a specification inquiry intrinsic function or not. Differential Revision: https://reviews.llvm.org/D125131 | 4 年前 | |
[flang] Disallow scalar argument to SIZE/LBOUND/UBOUND The compiler accepts arguments of any rank, or assumed rank, to a host of intrinsic inquiry functions. For scalars, this is correct for most of them, but the standard (and other compilers) prohibit scalar arguments to SIZE, LBOUND, and UBOUND (without DIM=). There are meaningful interpretations for these intrinsic inquiries on scalars, but since there's no portability concern here, continuing to support them would be an unjustifiable extension. Differential Revision: https://reviews.llvm.org/D146587 | 3 年前 | |
[flang] Main program symbol no longer conflicts with the other symbols (#149169) The following code is now accepted: module m end program m use m end The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name. | 1 年前 | |
[flang] Main program symbol no longer conflicts with the other symbols (#149169) The following code is now accepted: module m end program m use m end The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name. | 1 年前 | |
[flang] Rework component KIND= values in PDT instantiations (#162367) When processing the KIND= values of type specifications in parameterized derived type component declarations, it turns out to be necessary to analyze their expressions' parse trees rather than to just fold their typed expression representations. The types of the subexpressions may depend on the values of KIND parameters. Further, when checking the values of KIND= actual arguments to type conversion intrinsic functions (e.g., INT(..., KIND=)) that appear in KIND specifiers for PDT component declarations, don't emit an error for the derived type definition, but instead emit them for derived type instantiations. Fixes https://github.com/llvm/llvm-project/issues/161961. | 9 个月前 | |
[flang] Main program symbol no longer conflicts with the other symbols (#149169) The following code is now accepted: module m end program m use m end The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name. | 1 年前 | |
[Flang] Ported test_symbols to Python Due to unavailability of Flang testing on Windows, the shell scripts are being ported to Python. The following changes are being made in this patch: removed test_symbols.sh and common.sh, and ported them to Python. Changes to the tests themselves so that they use the python scripts instead of the shell script. Reviewed By: Meinersbur, awarzynski, kiranchandramohan Differential Revision: https://reviews.llvm.org/D107041 | 4 年前 | |
[flang] Main program symbol no longer conflicts with the other symbols (#149169) The following code is now accepted: module m end program m use m end The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name. | 1 年前 | |
[flang] Avoid crash from forward referenced derived type Fortran permits forward references to derived types in contexts that don't require knowledge of the derived type definition for semantic analysis, such as in the declaration of a pointer or allocatable variable or component. But when the forward-referenced derived type is used later for a component reference, it is possible for the DerivedTypeSpec in he base variable or component declaration to still have a null scope pointer even if the type has been defined, since DerivedTypeSpec and TypeSpec objects are created in scopes of use rather than in scopes of definition. The fix is to call DerivedTypeSpec::Instantiate() in the name resolution of each component name so that the scope gets filled in if it is still null. Differential Revision: https://reviews.llvm.org/D129681 | 4 年前 | |
[flang] Ignore inaccessible components when extending types or constructing structures Inaccessible components -- those declared PRIVATE in another module -- should be allowed to be redeclared in extended types, and should be ignored if they appear as keywords in structure constructors. Differential Revision: https://reviews.llvm.org/D131102 | 3 年前 | |
[flang] Don't resolve names in derived type definitions to generics There's code in name resolution that handles resolution of references that appear in the definitions of derived types -- it checks for existing components in the type being defined, as well as for non-parent components in its ancestors. Special case code prevents resolution of a name to the symbol of a procedure binding. This code needs to be extended so that names of generic procedures are similarly prevented from shadowing symbols in the scope around the type. Differential Revision: https://reviews.llvm.org/D134398 | 3 年前 | |
[flang] Special handling of ENTRY BIND(C,NAME=...) We apply special symbol table scoping to top-level subroutine and function names that have interoperable binding names, so that it's possible to define the same subroutine/function name more than once at the top level so long as their binding names are distinct. But we don't use those scoping techniques for ENTRY statement symbols with interoperable binding names, which can lead to bogus semantic errors when the same ENTRY name is defined multiple times with distinct binding names. Differential Revision: https://reviews.llvm.org/D134401 | 3 年前 | |
[flang] Main program symbol no longer conflicts with the other symbols (#149169) The following code is now accepted: module m end program m use m end The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name. | 1 年前 | |
[flang] Main program symbol no longer conflicts with the other symbols (#149169) The following code is now accepted: module m end program m use m end The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name. | 1 年前 | |
[flang] Improve USE merging of homonymous types, interfaces, and proc… (#79364) …edures Fortran allows a generic interface to have the same name as a derived type in the same scope. It also allows a generic interface to have the same name as one of its specific procedures. When two modules define the same name, possibly more than once each, things get exciting. The standard is not clear, and other compilers do variously different things. We are currently emitting some errors prematurely for some usage in pfUnit due to how it combines two versions of a package together via USE association. This patch handles combinations of derived types and generic interfaces and their specific procedures in a more principled way. Errors due to ambiguity are deferred to actual usage of derived types and specific procedures -- and when they're not used, the program is unambiguous and no error issues. | 2 年前 | |
[flang] Fix symbol on module subroutine name with same name as generic (#67678) When a MODULE SUBROUTINE or MODULE FUNCTION is implemented in the same scope as its interface and appears in a generic with the same name, the parse::Name of the implementation was not correctly reset and remained the SubprogramNameDetails symbol after semantics, causing a crash in lowering that picks up the procedure symbols on the parser names. Reset the parser::Name symbol before the new symbol is created. | 2 年前 | |
[flang] Enable more usage of generics with forward-referenced specifics in specification parts Earlier work allowed a specification expression to reference a generic function that was defined earlier, so long as the relevant specific procedure of the generic had been defined before the generic. This patch extends that work so that the generic can also be used in cases where the relevant specific procedure has been defined after the generic and before the reference. Differential Revision: https://reviews.llvm.org/D159034 | 2 年前 | |
[flang] Accept FINAL forward reference to separate module procedure When one of a derived type's FINAL procedures is in a submodule, its separate module procedure interface must necessarily be a forward reference from the FINAL statement, as its interface could not appear before the definition of the type. The implementation of FINAL procedure name resolution doesn't work for forward references; replace it. Differential Revision: https://reviews.llvm.org/D159035 | 2 年前 | |
[flang] Assume unknown target of procedure pointer assignment is a pr… (#66232) …ocedure When an previously unknown name appears as the target of an assignment to a known procedure pointer, create an external symbol for it rather than an implicitly-typed object symbol. | 2 年前 | |
[flang] Account for shadowed symbols when skimming executable part (#70246) Name resolution takes a quick pass over the executable part of a (sub)program in search of symbols that appear to be called as procedures, so that those names don't get mistakenly converted into objects when finishing up specification part processing. This pass doesn't currently cope with symbol shadowing by nested declarations in executable constructs. This patch ensures that nested declarations for symbols that could be used in contexts that might have been parsed as function references properly shadow symbols of the same name in outer scopes. | 2 年前 | |
[flang][OpenMP] Make static duration variables default to shared DSA (#142783) According to the OpenMP standard, variables with static storage duration are predetermined as shared. Add a check when creating implicit symbols for OpenMP to fix them erroneously getting set to firstprivate. Fixes llvm#140732. --------- Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com> | 1 年前 | |
[flang] Test SYNC IMAGES, increase checking (#132279) Add a test for the SYNC IMAGES statement, and add a check for invalid image numbers. | 1 年前 | |
[flang] Refine EVENT_TYPE/LOCK_TYPE usage checks (#123244) The event variable in an EVENT POST/WAIT statement can be a coarray reference, and need not be an entire coarray. Variables and potential subobject components with EVENT_TYPE/LOCK_TYPE must be coarrays, unless they are potential subobjects nested within coarrays or pointers. | 1 年前 | |
[flang] Improve syntax error messages by fixing withMessage() parser combinator The parser combinator withMessage("error message"_err_en_US, PARSER) is meant to run the parser PARSER and, if it fails, override its error messages if it failed silently or it was unable to recognize any tokens at all. This gives the parser a way to avoid emitting some confusing or missing error messages. Unfortunately, the implementation could sometimes lose track of whether any tokens had been recognized, leading to problems with outer usage of withMessage() and also -- more seriously -- with ParseState::CombineFailedParses(). That's a utility that determines which error messages to retain when two or more parsers have been attempted at the same starting point and none of them succceed. Its policy is to retain the state from the parser that consumed the most input text before failing, so long as it had recognized at least one token. So anyway, fix up withMessage(), adjust the tests, and add a test of the original motivating confusing error situation, in which a syntax error in a COMMON statement was being diagnosed as a problem with a statement function definition because withMessage() had lost the fact that the parse of the COMMON statement had recognized some tokens, and the last attempted parse later was a failed attempt to parse a statement function. Differential Revision: https://reviews.llvm.org/D135216 | 3 年前 | |
[flang] Add check for constraints on synchronization-stmts In the CoarrayChecker, add checks for the constraints C1172 and C1173, which constrain sync-stat-list. Add these checks to sync-all-stmt, sync-images-stmt, sync-memory-stmt, and sync-team-stmt. Also add a check for the constraint C1174 in sync-images-stmt. Update semantics tests for these stmts. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D136104 | 3 年前 | |
[flang] Split up synchronization, event, and error stop stmt tests Splitting up the tests for the synchronization statements, event statements, and error stop statement allow for some of the errors which are hidden by other errors, to be caught in the test. This then reveals which invalid code does produce errors and which does not produce errors. | 3 年前 | |
[flang] Add check for constraints on synchronization-stmts In the CoarrayChecker, add checks for the constraints C1172 and C1173, which constrain sync-stat-list. Add these checks to sync-all-stmt, sync-images-stmt, sync-memory-stmt, and sync-team-stmt. Also add a check for the constraint C1174 in sync-images-stmt. Update semantics tests for these stmts. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D136104 | 3 年前 | |
[flang] Improve syntax error messages by fixing withMessage() parser combinator The parser combinator withMessage("error message"_err_en_US, PARSER) is meant to run the parser PARSER and, if it fails, override its error messages if it failed silently or it was unable to recognize any tokens at all. This gives the parser a way to avoid emitting some confusing or missing error messages. Unfortunately, the implementation could sometimes lose track of whether any tokens had been recognized, leading to problems with outer usage of withMessage() and also -- more seriously -- with ParseState::CombineFailedParses(). That's a utility that determines which error messages to retain when two or more parsers have been attempted at the same starting point and none of them succceed. Its policy is to retain the state from the parser that consumed the most input text before failing, so long as it had recognized at least one token. So anyway, fix up withMessage(), adjust the tests, and add a test of the original motivating confusing error situation, in which a syntax error in a COMMON statement was being diagnosed as a problem with a statement function definition because withMessage() had lost the fact that the parse of the COMMON statement had recognized some tokens, and the last attempted parse later was a failed attempt to parse a statement function. Differential Revision: https://reviews.llvm.org/D135216 | 3 年前 | |
[flang] Add check for constraints on synchronization-stmts In the CoarrayChecker, add checks for the constraints C1172 and C1173, which constrain sync-stat-list. Add these checks to sync-all-stmt, sync-images-stmt, sync-memory-stmt, and sync-team-stmt. Also add a check for the constraint C1174 in sync-images-stmt. Update semantics tests for these stmts. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D136104 | 3 年前 | |
[flang] Split up synchronization, event, and error stop stmt tests Splitting up the tests for the synchronization statements, event statements, and error stop statement allow for some of the errors which are hidden by other errors, to be caught in the test. This then reveals which invalid code does produce errors and which does not produce errors. | 3 年前 | |
[flang] Add check for constraints on synchronization-stmts In the CoarrayChecker, add checks for the constraints C1172 and C1173, which constrain sync-stat-list. Add these checks to sync-all-stmt, sync-images-stmt, sync-memory-stmt, and sync-team-stmt. Also add a check for the constraint C1174 in sync-images-stmt. Update semantics tests for these stmts. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D136104 | 3 年前 | |
[flang] Add new semantics test for team_number function Add new semantics test for team_number and rename existing team_number semantics test. Reviewed By: ktras Differential Revision: https://reviews.llvm.org/D128309 | 4 年前 | |
[flang] Add new semantics test for team_number function Add new semantics test for team_number and rename existing team_number semantics test. Reviewed By: ktras Differential Revision: https://reviews.llvm.org/D128309 | 4 年前 | |
[Flang][Windows] Fix test_errors.py by enforcing UTF-8 encoding (#134625) This patch fixes UnicodeDecodeError on Windows in test_errors.py. This issue was observed on the flang-arm64-windows-msvc buildbot. Semantics/OpenMP/interop-construct.f90 was crashing due to Python defaulting to the cp1252 codec on Windows. I have fixed this by explicitly setting encoding="utf-8" when reading source files and invoking subprocess.run() in test_errors.py flang-arm64-windows-msvc was running on stagging master which resulted in this issue not being fixed earlier. https://lab.llvm.org/staging/#/builders/206 | 1 年前 | |
[flang] Use module file hashes for more checking and disambiguation (#80354) f18's module files are Fortran with a leading header comment containing the module file format version and a hash of the following contents. This hash is currently used only to protect module files against corruption and truncation. Extend the use of these hashes to catch or avoid some error cases. When one module file depends upon another, note its hash in additional module file header comments. This allows the compiler to detect when the module dependency is on a module file that has been updated. Further, it allows the compiler to find the right module file dependency when the same module file name appears in multiple directories on the module search path. The order in which module files are written, when multiple modules appear in a source file, is such that every dependency is written before the module(s) that depend upon it, so that their hashes are known. A warning is emitted when a module file is not the first hit on the module file search path. Further work is needed to add a compiler option that emits (larger) stand-alone module files that incorporate copies of their dependencies rather than relying on search paths. This will be desirable for application libraries that want to ship only "top-level" module files without needing to include their dependencies. Another future work item would be to admit multiple modules in the same compilation with the same name if they have distinct hashes. | 2 年前 | |
[flang][test] Change re.I to flags=re.I in re.sub Follow-up to da6099c9ad. As a positional argument, the re.I was in place of count, not flags. | 1 年前 | |
[flang] Catch more semantic errors with coarrays (#125536) Detect and report a bunch of uncaught semantic errors with coarray declarations. Add more tests, and clean up bad usage in existing tests. | 1 年前 | |
[flang] expand the this_image test coverage Add a test with a range of this_image() intrinsic function invocations, including a comprehensive set of standard-conforming keyword and non-keyword arguments with and without optional arguments present and with argument positions covering all possible orderings. Also test that several non-conforming this_image() invocations generate the correct error messages. Differential Revision: https://reviews.llvm.org/D123331 | 4 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Rework component KIND= values in PDT instantiations (#162367) When processing the KIND= values of type specifications in parameterized derived type component declarations, it turns out to be necessary to analyze their expressions' parse trees rather than to just fold their typed expression representations. The types of the subexpressions may depend on the values of KIND parameters. Further, when checking the values of KIND= actual arguments to type conversion intrinsic functions (e.g., INT(..., KIND=)) that appear in KIND specifiers for PDT component declarations, don't emit an error for the derived type definition, but instead emit them for derived type instantiations. Fixes https://github.com/llvm/llvm-project/issues/161961. | 9 个月前 | |
[flang] Catch attempt to type a subroutine (#82704) The presence of a type in the prefix of a SUBROUTINE statement should elicit an error message, not a crash. Fixes https://github.com/llvm/llvm-project/issues/80530. | 2 年前 | |
[flang] Allow -fdefault-integer-8 with defined I/O (#148927) Defined I/O subroutines have UNIT= and IOSTAT= dummy arguments that are required to have type INTEGER with its default kind. When that default kind is modified via -fdefault-integer-8, calls to defined I/O subroutines from the runtime don't work. Add a flag to the two data structures shared between the compiler and the runtime support library to indicate that a defined I/O subroutine was compiled under -fdefault-integer-8. This has been done in a compatible manner, so that existing binaries are compatible with the new library and new binaries are compatible with the old library, unless of course -fdefault-integer-8 is used. Fixes https://github.com/llvm/llvm-project/issues/148638. | 1 年前 | |
[flang] Allow -fdefault-integer-8 with defined I/O (#148927) Defined I/O subroutines have UNIT= and IOSTAT= dummy arguments that are required to have type INTEGER with its default kind. When that default kind is modified via -fdefault-integer-8, calls to defined I/O subroutines from the runtime don't work. Add a flag to the two data structures shared between the compiler and the runtime support library to indicate that a defined I/O subroutine was compiled under -fdefault-integer-8. This has been done in a compatible manner, so that existing binaries are compatible with the new library and new binaries are compatible with the old library, unless of course -fdefault-integer-8 is used. Fixes https://github.com/llvm/llvm-project/issues/148638. | 1 年前 | |
[flang] Restructure runtime to avoid recursion (relanding) (#143993) Recursion, both direct and indirect, prevents accurate stack size calculation at link time for GPU device code. Restructure these recursive (often mutually so) routines in the Fortran runtime with new implementations based on an iterative work queue with suspendable/resumable work tickets: Assign, Initialize, initializeClone, Finalize, and Destroy. Default derived type I/O is also recursive, but already disabled. It can be added to this new framework later if the overall approach succeeds. Note that derived type FINAL subroutine calls, defined assignments, and defined I/O procedures all perform callbacks into user code, which may well reenter the runtime library. This kind of recursion is not handled by this change, although it may be possible to do so in the future using thread-local work queues. (Relanding this patch after reverting initial attempt due to some test failures that needed some time to analyze and fix.) Fixes https://github.com/llvm/llvm-project/issues/142481. | 1 年前 | |
[flang] Restructure runtime to avoid recursion (relanding) (#143993) Recursion, both direct and indirect, prevents accurate stack size calculation at link time for GPU device code. Restructure these recursive (often mutually so) routines in the Fortran runtime with new implementations based on an iterative work queue with suspendable/resumable work tickets: Assign, Initialize, initializeClone, Finalize, and Destroy. Default derived type I/O is also recursive, but already disabled. It can be added to this new framework later if the overall approach succeeds. Note that derived type FINAL subroutine calls, defined assignments, and defined I/O procedures all perform callbacks into user code, which may well reenter the runtime library. This kind of recursion is not handled by this change, although it may be possible to do so in the future using thread-local work queues. (Relanding this patch after reverting initial attempt due to some test failures that needed some time to analyze and fix.) Fixes https://github.com/llvm/llvm-project/issues/142481. | 1 年前 | |
[flang] Restructure runtime to avoid recursion (relanding) (#143993) Recursion, both direct and indirect, prevents accurate stack size calculation at link time for GPU device code. Restructure these recursive (often mutually so) routines in the Fortran runtime with new implementations based on an iterative work queue with suspendable/resumable work tickets: Assign, Initialize, initializeClone, Finalize, and Destroy. Default derived type I/O is also recursive, but already disabled. It can be added to this new framework later if the overall approach succeeds. Note that derived type FINAL subroutine calls, defined assignments, and defined I/O procedures all perform callbacks into user code, which may well reenter the runtime library. This kind of recursion is not handled by this change, although it may be possible to do so in the future using thread-local work queues. (Relanding this patch after reverting initial attempt due to some test failures that needed some time to analyze and fix.) Fixes https://github.com/llvm/llvm-project/issues/142481. | 1 年前 | |
[flang] Restructure runtime to avoid recursion (relanding) (#143993) Recursion, both direct and indirect, prevents accurate stack size calculation at link time for GPU device code. Restructure these recursive (often mutually so) routines in the Fortran runtime with new implementations based on an iterative work queue with suspendable/resumable work tickets: Assign, Initialize, initializeClone, Finalize, and Destroy. Default derived type I/O is also recursive, but already disabled. It can be added to this new framework later if the overall approach succeeds. Note that derived type FINAL subroutine calls, defined assignments, and defined I/O procedures all perform callbacks into user code, which may well reenter the runtime library. This kind of recursion is not handled by this change, although it may be possible to do so in the future using thread-local work queues. (Relanding this patch after reverting initial attempt due to some test failures that needed some time to analyze and fix.) Fixes https://github.com/llvm/llvm-project/issues/142481. | 1 年前 | |
[flang] Restructure runtime to avoid recursion (relanding) (#143993) Recursion, both direct and indirect, prevents accurate stack size calculation at link time for GPU device code. Restructure these recursive (often mutually so) routines in the Fortran runtime with new implementations based on an iterative work queue with suspendable/resumable work tickets: Assign, Initialize, initializeClone, Finalize, and Destroy. Default derived type I/O is also recursive, but already disabled. It can be added to this new framework later if the overall approach succeeds. Note that derived type FINAL subroutine calls, defined assignments, and defined I/O procedures all perform callbacks into user code, which may well reenter the runtime library. This kind of recursion is not handled by this change, although it may be possible to do so in the future using thread-local work queues. (Relanding this patch after reverting initial attempt due to some test failures that needed some time to analyze and fix.) Fixes https://github.com/llvm/llvm-project/issues/142481. | 1 年前 | |
[flang] Restructure runtime to avoid recursion (relanding) (#143993) Recursion, both direct and indirect, prevents accurate stack size calculation at link time for GPU device code. Restructure these recursive (often mutually so) routines in the Fortran runtime with new implementations based on an iterative work queue with suspendable/resumable work tickets: Assign, Initialize, initializeClone, Finalize, and Destroy. Default derived type I/O is also recursive, but already disabled. It can be added to this new framework later if the overall approach succeeds. Note that derived type FINAL subroutine calls, defined assignments, and defined I/O procedures all perform callbacks into user code, which may well reenter the runtime library. This kind of recursion is not handled by this change, although it may be possible to do so in the future using thread-local work queues. (Relanding this patch after reverting initial attempt due to some test failures that needed some time to analyze and fix.) Fixes https://github.com/llvm/llvm-project/issues/142481. | 1 年前 | |
[flang] Allow -fdefault-integer-8 with defined I/O (#148927) Defined I/O subroutines have UNIT= and IOSTAT= dummy arguments that are required to have type INTEGER with its default kind. When that default kind is modified via -fdefault-integer-8, calls to defined I/O subroutines from the runtime don't work. Add a flag to the two data structures shared between the compiler and the runtime support library to indicate that a defined I/O subroutine was compiled under -fdefault-integer-8. This has been done in a compatible manner, so that existing binaries are compatible with the new library and new binaries are compatible with the old library, unless of course -fdefault-integer-8 is used. Fixes https://github.com/llvm/llvm-project/issues/148638. | 1 年前 | |
[flang] ensure parent component are first in runtime type info (#81259) Static info generated to describe derived types contain an array listing the components of some derived type. The parent component must be first for the runtime to properly works. The current sort was only relying on the offset, but if the parent is an empty type, this did not work properly because its offset did not compare smaller than the first component and the parent was not added first | 2 年前 | |
[flang] Restructure runtime to avoid recursion (relanding) (#143993) Recursion, both direct and indirect, prevents accurate stack size calculation at link time for GPU device code. Restructure these recursive (often mutually so) routines in the Fortran runtime with new implementations based on an iterative work queue with suspendable/resumable work tickets: Assign, Initialize, initializeClone, Finalize, and Destroy. Default derived type I/O is also recursive, but already disabled. It can be added to this new framework later if the overall approach succeeds. Note that derived type FINAL subroutine calls, defined assignments, and defined I/O procedures all perform callbacks into user code, which may well reenter the runtime library. This kind of recursion is not handled by this change, although it may be possible to do so in the future using thread-local work queues. (Relanding this patch after reverting initial attempt due to some test failures that needed some time to analyze and fix.) Fixes https://github.com/llvm/llvm-project/issues/142481. | 1 年前 | |
[flang] Restructure runtime to avoid recursion (relanding) (#143993) Recursion, both direct and indirect, prevents accurate stack size calculation at link time for GPU device code. Restructure these recursive (often mutually so) routines in the Fortran runtime with new implementations based on an iterative work queue with suspendable/resumable work tickets: Assign, Initialize, initializeClone, Finalize, and Destroy. Default derived type I/O is also recursive, but already disabled. It can be added to this new framework later if the overall approach succeeds. Note that derived type FINAL subroutine calls, defined assignments, and defined I/O procedures all perform callbacks into user code, which may well reenter the runtime library. This kind of recursion is not handled by this change, although it may be possible to do so in the future using thread-local work queues. (Relanding this patch after reverting initial attempt due to some test failures that needed some time to analyze and fix.) Fixes https://github.com/llvm/llvm-project/issues/142481. | 1 年前 | |
[flang] Allow -fdefault-integer-8 with defined I/O (#148927) Defined I/O subroutines have UNIT= and IOSTAT= dummy arguments that are required to have type INTEGER with its default kind. When that default kind is modified via -fdefault-integer-8, calls to defined I/O subroutines from the runtime don't work. Add a flag to the two data structures shared between the compiler and the runtime support library to indicate that a defined I/O subroutine was compiled under -fdefault-integer-8. This has been done in a compatible manner, so that existing binaries are compatible with the new library and new binaries are compatible with the old library, unless of course -fdefault-integer-8 is used. Fixes https://github.com/llvm/llvm-project/issues/148638. | 1 年前 | |
[flang] Fold LCOBOUND & UCOBOUND (#121411) Implement constant folding for LCOBOUND and UCOBOUND intrinsic functions. Moves some error detection code from intrinsics.cpp to fold-integer.cpp so that erroneous calls get properly flagged and converted into known errors. | 1 年前 | |
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767) Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free. | 1 年前 | |
[flang] Add new semantics tests for unlock-stmt Add two semantics tests for unlock-stmt, one with standard-conforming and one with non-standard conforming statements Reviewed By: ktras Differential Revision: https://reviews.llvm.org/D157409 | 2 年前 | |
[flang] Add new semantics tests for unlock-stmt Add two semantics tests for unlock-stmt, one with standard-conforming and one with non-standard conforming statements Reviewed By: ktras Differential Revision: https://reviews.llvm.org/D157409 | 2 年前 | |
[Flang] Ported test_errors.sh to Python To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575 | 4 年前 | |
[flang] Support UNSIGNED ** (#154601) GNU Fortran added support for UNSIGNED ** UNSIGNED power operations; we should do the same for portability. This actually simplifies semantics a bit, since I had to go out of my way to exclude Power as a supported operation for UNSIGNED. | 11 个月前 | |
[flang] Disallow passing array actual arguments to ignore_tkr(r) scalars with VALUE attribute (#166682) Scalars with VALUE attribute are likely passed in registers, so it's now clear what lowering should do with the array actual argument in this case. Fail this case with an error before getting to lowering. | 8 个月前 | |
[flang] Warn about inexact real literal implicit widening pitfall (#152799) When a REAL or COMPLEX literal appears without an explicit kind suffix or a kind-determining exponent letter, and the conversion of that literal from decimal to binary is inexact, emit a warning if that constant is later implicitly widened to a more precise kind, since it will have a different value than was probably intended. Values that convert exactly from decimal to default real, e.g. 1.0 and 0.125, do not elicit this warning. There are many contexts in which Fortran implicitly converts constants. This patch covers name constant values, variable and component initialization, constants in expressions, structure constructor components, and array constructors. For example, "real(8) :: tenth = 0.1" is a common Fortran bug that's hard to find, and is one that often trips up even experienced Fortran programmers. Unlike C and C++, the literal constant 0.1 is *not* double precision by default, and it does not have the same value as 0.1d0 or 0.1_8 do when it is converted from decimal to real(4) and then to real(8). | 11 个月前 | |
[flang] Fix x86 REQUIRES in a couple of tests (#146869) Many tests in Flang are looking for x86_64-registered-target, but this never exists because the target is just called x86. These two pass with this corrected but the others I need to look into why they fail. | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 5 年前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 10 个月前 | ||
| 10 个月前 | ||
| 10 个月前 | ||
| 10 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 10 个月前 | ||
| 3 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 5 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 10 个月前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 10 个月前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 10 个月前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 5 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 10 个月前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 9 个月前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 10 个月前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 9 个月前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 10 个月前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 9 个月前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 5 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 11 个月前 | ||
| 8 个月前 | ||
| 11 个月前 | ||
| 1 年前 |