- Feb 05, 2020
-
-
Jean Perier authored
While working on PR 959, I instanciated a `common::TupleToVariant` with ~50+ types inside the tuple. Clang would then crash after 1hr compilation with message: "constexpr evaluation hit maximum step limit; possible infinite loop" After investigating, it turned out clang handles very badly the way `common::AreTypesDistinctHelper` was implemented. Its "number of steps" was exponential with the number of types. This fix makes this number quadratic which solves the issue. Original-commit: flang-compiler/f18@4542cb57082eaf578799c76482d4b706ae5da077 Reviewed-on: https://github.com/flang-compiler/f18/pull/968
-
Peter Klausler authored
Formatted output editing & initial buffer framing code Original-commit: flang-compiler/f18@003b664229a91b1692b52014ef6f9c9b65119b0d Reviewed-on: https://github.com/flang-compiler/f18/pull/950
-
peter klausler authored
Address review comments Integer output data editing (I,B,O,Z) Full integer output formatting Stub out some work in progress Progress on E output data editing E, D, EN, and ES output editing done Fw.d output editing Real G output editing G output editing for reals Make environment a distinct module CHARACTER and LOGICAL output editing Minimal decimal representations for E0, F0, G0 editing Move real output editing code into its own file Fix/dodge some GCC build problems Prep work for external I/O statement state External HELLO, WORLD Fix build problem with GCC Add virtual destructors where needed Add new test Original-commit: flang-compiler/f18@c3f1774f8eee903928b7e46636edfb03425eabc0 Reviewed-on: https://github.com/flang-compiler/f18/pull/950
-
- Feb 04, 2020
-
-
psteinfeld authored
Explanation of how to implement a semantic check Original-commit: flang-compiler/f18@bedca1462b46c52cf41b5f40cd7ed9bb6cc78f29 Reviewed-on: https://github.com/flang-compiler/f18/pull/939
-
Pete Steinfeld authored
This is the story of implementing semantic checks for passing DO variables to functions with dummy arguments with INTENT(OUT) or INTENT(INOUT). Original-commit: flang-compiler/f18@889f90913f280f285eb9960a0e0baadfd43a555f Reviewed-on: https://github.com/flang-compiler/f18/pull/939
-
- Jan 30, 2020
-
-
Tim Keith authored
Fix another bug checking simple contiguity Original-commit: flang-compiler/f18@cd371e9a2ab66c31c6df77c0fa3052a80f00908c Reviewed-on: https://github.com/flang-compiler/f18/pull/961
-
Tim Keith authored
The test still wasn't correct for structure components. If the last part-ref is a non-array or a single array element, but the whole ArrayRef has non-zero rank, it is not contiguous. Otherwise, if there are subscripts on the last part-ref they can be checked normally. Add some tests for cases that were previously failing, and also for cases with vector subscripts. Original-commit: flang-compiler/f18@aa0a0887325bd1fc6c3a1ad40fc6711d2e458a1c Reviewed-on: https://github.com/flang-compiler/f18/pull/961
-
psteinfeld authored
Semantic checks for deallocating entities with IMPURE FINAL procedures Original-commit: flang-compiler/f18@61da1f9e5c59cedb02026954a73ab30d8319a66c Reviewed-on: https://github.com/flang-compiler/f18/pull/954
-
Pete Steinfeld authored
You cannot call an IMPURE procedure in a DO CONCURRENT construct. One way that can happen is if an entity with an IMPURE FINAL procedure gets deallocated. Similar to the checks for deallocating coarrays, there are three ways that an entity can get deallocated that are applicable to DO CONCURRENT constructs -- an actual DEALLOCATE statement, block exit, and assignment. This change depends on the utility function `HasImpureFinal()` in tools.h to determine if an entity has a derived type with an IMPURE FINAL procedure. In the course of testing this change, I realized that this check is incorrect, but the code specific to DO CONCURRENT is independent of the check, so I might as well implement it. Original-commit: flang-compiler/f18@d2294ff511aebd64889df57d02325bd6fcdf914a Reviewed-on: https://github.com/flang-compiler/f18/pull/954
-
- Jan 29, 2020
-
-
Jinxin (Brian) Yang authored
Remove `default` case for OmpSectionsDirective (only two enum values) Original-commit: flang-compiler/f18@d98bf8494e2e017ed9a7e1d3c93688c379c01bf3 Reviewed-on: https://github.com/flang-compiler/f18/pull/960
-
Jinxin Yang authored
Original-commit: flang-compiler/f18@3f37e0dbaf32f1127553be2149915cab1b93cdcf Reviewed-on: https://github.com/flang-compiler/f18/pull/960
-
Jinxin (Brian) Yang authored
This is an extended framework based on the previous work that addresses the NR on OpenMP directives/clauses (b2ea520). In this change: * New `OmpVisitor` is created (ResolveNamesVisitor derives from it) to create necessary scopes for certain OpenMP constructs. This is along with the regular Fortran NR process. * Old `OmpVisitor` is adjusted and converted to a standalone visitor-- `OmpAttributeVisitor`. This is used to walk through the OpenMP constructs and do the NR for variables on the OpenMP directives or data references within the OpenMP constructs. "Do the NR" here means that based on the NR results of the regular Fortran NR, fix the symbols of `Names` related to the OpenMP constructs. Note that there is an `OmpContext` in this visitor (similar to the one in `OmpStructureChecker`), this is necessary when dealing with the nested OpenMP constructs in the future. Given an OpenMP code: ``` real*8 a, b a = 1. b = 2. !$omp parallel private(a) a = 3. b = 4. !$omp end parallel print *, a, b end ``` w/o -fopenmp: ``` real*8 a, b !REF: /MainProgram1/a a = 1. !REF: /MainProgram1/b b = 2. !!!! OMP parallel !REF: /MainProgram1/a a = 3. !REF: /MainProgram1/b b = 4. !!!! OMP end parallel !REF: /MainProgram1/a !REF: /MainProgram1/b print *, a, b end ``` w/ -fopenmp: ``` real*8 a, b !REF: /MainProgram1/a a = 1. !REF: /MainProgram1/b b = 2. !$omp parallel private(a) <-- new Symbol for 'a' created !DEF: /MainProgram1/Block1/a (OmpPrivate) HostAssoc REAL(8) a = 3. <-- fix the old symbol with new Symbol in parallel scope !REF: /MainProgram1/b b = 4. <-- do nothing because by default it is shared in this scope !$omp end parallel !REF: /MainProgram1/a !REF: /MainProgram1/b print *, a, b end ``` Please note that this is a framework update, there are still many things on the TODO list for finishing the NR for OpenMP (based on the `OpenMP-semantics.md` design doc), which will be on top of this framework. Some TODO items: - Create a generic function to go through all the rules for deciding `predetermined`, `explicitly determined`, and `implicitly determined` data-sharing attributes. (This is the next biggest part) - Handle `Array Sections` and `Array or Structure Element`. - Take association into consideration for example Pointer association, `ASSOCIATE` construct, and etc. - Handle all the name resolution for directives/clauses that have `parser::Name`. * N.B. Extend `AddSourceRange` to apply to current and parent scopes - motivated by a few cases that need to call `AddSourceRange` for current & parent scopes; the extension should be safe - global scope is not included Original-commit: flang-compiler/f18@0c3c39d30e3f166a6a1303337c5fd7eead720fd0 Reviewed-on: https://github.com/flang-compiler/f18/pull/940
-
- Jan 28, 2020
-
-
psteinfeld authored
More checklist items Original-commit: flang-compiler/f18@32eb0d79c3a334d15ed1dc351619be9fda6b2a9f Reviewed-on: https://github.com/flang-compiler/f18/pull/956
-
- Jan 25, 2020
-
-
Pete Steinfeld authored
I added more items when reviewing some actual pull request comments. Original-commit: flang-compiler/f18@195d807ff221e4247ec5609e8e816e81dab5df94 Reviewed-on: https://github.com/flang-compiler/f18/pull/956
-
- Jan 28, 2020
-
-
Alexis Perry authored
Updated CMake files accordingly, using better regex Updated license headers to match new extension and fit within 80 columns Updated other comments within files that referred to the old extension Original-commit: flang-compiler/f18@ae7721e611918631d1e3821dbb60f5ffcd9a69b1 Reviewed-on: https://github.com/flang-compiler/f18/pull/958
-
David Truby authored
Original-commit: flang-compiler/f18@21adbc7e05b2454ba3fc725b4697748f98599471 Reviewed-on: https://github.com/flang-compiler/f18/pull/943
-
Tim Keith authored
Fix bugs detecting impure calls Original-commit: flang-compiler/f18@db5ebec5156f3f93fb99358192307298c99fc3c4 Reviewed-on: https://github.com/flang-compiler/f18/pull/951
-
- Jan 26, 2020
-
-
Tim Keith authored
Change Traverse to visit the actual arguments of structure constructors. Change FindImpureCallHelper to visit the actual arguments of a call to a pure procedure in case one of them makes a call to an impure function. Original-commit: flang-compiler/f18@81a5488ee62b4324d002c348464712c930095a32 Reviewed-on: https://github.com/flang-compiler/f18/pull/951
-
- Jan 28, 2020
-
-
Tim Keith authored
Fix bug detecting simply contiguous component Original-commit: flang-compiler/f18@a8a7a8c914aecbfdaff95419eb0408aa979abe53 Reviewed-on: https://github.com/flang-compiler/f18/pull/952
-
Tim Keith authored
We were always return false when testing a component for simple contiguity. Change to check that the component is an array that is simply continguous. Also treat a scalar component of scalar as simply contiguous. A pointer with bounds remapping to a complex part is a similar case so add a test for that too. Original-commit: flang-compiler/f18@27d76da2a44614b2c4cf4d576410372cabf66577 Reviewed-on: https://github.com/flang-compiler/f18/pull/952
-
Peter Klausler authored
OpenFile class: API and implementation wrappers for open external files Original-commit: flang-compiler/f18@edd60ae8281ab21588355c4f93680b6152219cd0 Reviewed-on: https://github.com/flang-compiler/f18/pull/949
-
peter klausler authored
Asynchronous interfaces and locking Original-commit: flang-compiler/f18@3ba77a0c2035644485737a025cc8912485b56225 Reviewed-on: https://github.com/flang-compiler/f18/pull/949
-
- Jan 25, 2020
-
-
Peter Klausler authored
12HHELLO, WORLD Original-commit: flang-compiler/f18@3087aa82840b817cb7433c48cc2310accf9dc9b6 Reviewed-on: https://github.com/flang-compiler/f18/pull/946
-
peter klausler authored
internal formatted WRITE with no data list items. Improve argument names in io-api.h Bump up error number to not conflict with errno values Use Fortran::runtime::io namespace Add wrapper around malloc/free, allow use of unique_ptr with wrapper IoErrorHandler Revamp FormatContext, use virtual member functions Update comment syntax, allow for old C 12HHELLO, WORLD Remove files not yet ready for review Use std::forward Fix gcc build warnings Fix redundant filename in license boilerplate Reduce runtime dependence on compiler binary libraries, fixing shared lib builds Original-commit: flang-compiler/f18@839a91f1d699cd839767407bcdb1e384f2d2b730 Reviewed-on: https://github.com/flang-compiler/f18/pull/946
-
- Jan 23, 2020
-
-
Tim Keith authored
Check bounds on pointer assignment Original-commit: flang-compiler/f18@5e331c1a5cdbfa80c4ef736e95dc0a88b34c6d01 Reviewed-on: https://github.com/flang-compiler/f18/pull/944
-
Tim Keith authored
Perform checks on bounds-spec and bounds-remapping in a pointer assignment statement: - check that the rank of the bounds specified matches the rank of the pointer - for bounds-spec, check that the pointer rank matches the target rank - for bounds-remapping: - check that the target is rank 1 or simply contiguous - check that there are sufficient elements on the RHS for the bounds specified, when it can be determined at compile time Move more of the pointer-specific checking from `assignment.cc` to `pointer-assignment.cc`. Original-commit: flang-compiler/f18@7489b3539224f8ad7a55873916e5854510236218 Reviewed-on: https://github.com/flang-compiler/f18/pull/944 -
Tim Keith authored
Use early returns to reduce the indentation. Check LHS is a pointer as early as possible. A PointerAssignmentStmt can only have a typedAssignment that represents a PointerAssignment. So assert that is the case and don't worry about the other cases. Original-commit: flang-compiler/f18@bdf3d3a292b5f9ce4241e3d63b759bd61838cf18 Reviewed-on: https://github.com/flang-compiler/f18/pull/944 Tree-same-pre-rewrite: false
-
Tim Keith authored
Have it wrap an optional Assignment so that we can distinguish between unanalyzed and analyzed with error. Change analysis of PointerAssignmentStmt to proceed with bounds even if the DataRef or Expr has an error. Otherwise any bounds expressions won't be analyzed in that case. In GetExpr() and GetAssignment() if we get an internal error due to an unanalyzed expression, dump the parse tree for the expression so we have some context for the error. They should only be called after the expression analysis phase. At that point, every expression and assignment should be analyzed, though some may have resulted in errors(indicated by returning `nullptr`). Original-commit: flang-compiler/f18@3b865d7703f53099cd491ed1aa9b80b46fee9f58 Reviewed-on: https://github.com/flang-compiler/f18/pull/944 Tree-same-pre-rewrite: false
-
Tim Keith authored
This is easier to use when including an expression in an error message and also useful when debugging for dumping expressions. Fix up several places that no longer need to use a temporary std::stringstream. Also change some references to `operator<<` in `formatting.cc` and `symbol.cc` that became ambiguous with this change. Original-commit: flang-compiler/f18@25dc49b6e9cf5bce61d6d655ab242609cbd28e13 Reviewed-on: https://github.com/flang-compiler/f18/pull/944 Tree-same-pre-rewrite: false
-
psteinfeld authored
Checklist to precede pull requests Original-commit: flang-compiler/f18@b1e67c4a40d8cdd0a8f7429ad1780e25798e0136 Reviewed-on: https://github.com/flang-compiler/f18/pull/936
-
Pete Steinfeld authored
I added a checklist to the C++ Style document for things to check before submitting a pull request or when responding to a request for comments on a pull request. Original-commit: flang-compiler/f18@903420268a5aabbab9acdf8788b4344c395ee597 Reviewed-on: https://github.com/flang-compiler/f18/pull/936
-
- Jan 16, 2020
-
-
Peter Klausler authored
Fix shape analysis of RHS designators of pointer assignments Original-commit: flang-compiler/f18@0423347d69e4422e080a59dfec00c850bf1ddcc2 Reviewed-on: https://github.com/flang-compiler/f18/pull/938
-
peter klausler authored
Original-commit: flang-compiler/f18@bf26a36ef4255188b294a73bdc138dfba52cf5d3 Reviewed-on: https://github.com/flang-compiler/f18/pull/938
-
Tim Keith authored
Fix checking of pointer target with association Original-commit: flang-compiler/f18@6b3dc6d5ece54c2d051bec5bf01c0c7c8532819f Reviewed-on: https://github.com/flang-compiler/f18/pull/937
-
Tim Keith authored
When checking if the target of a pointer assignment is valid, we weren't following associations. E.g. we complained about the assignment below if `b` had the TARGET attribute but `c` did not: ``` associate(a => b%c) p => a end associate ``` The fix is to change `GetSymbolVector()` to follow associations in creating the chain of symbols from a designator. Add tests for this, and also some other cases where TARGET is on the derived type variable rather than the component (which worked but didn't have tests). Original-commit: flang-compiler/f18@c81c6baedd41d6ca2d36c81ca745a144c02be369 Reviewed-on: https://github.com/flang-compiler/f18/pull/937
-
Peter Klausler authored
Runtime FORMAT scanning Original-commit: flang-compiler/f18@538d4a1dea9d2301fe36b13d1b248fde5c010f83 Reviewed-on: https://github.com/flang-compiler/f18/pull/927
-
peter klausler authored
Move RoundingMode to Fortran.h Always skip blanks outside character literals & Hollerith Templatize optimize repeat counts somewhat Fix license punctuation, remove patch Original-commit: flang-compiler/f18@4a0d39b0398974ade4367a5a96e11a90e853c18c Reviewed-on: https://github.com/flang-compiler/f18/pull/927
-
Peter Klausler authored
BLOCK DATA semantics Original-commit: flang-compiler/f18@4954b95527a48d5242731c91a7181a001bf64283 Reviewed-on: https://github.com/flang-compiler/f18/pull/926
-
- Jan 15, 2020
-
-
peter klausler authored
Original-commit: flang-compiler/f18@0c12188e8437abf820381fea787c625eda7e2d1f Reviewed-on: https://github.com/flang-compiler/f18/pull/926
-
peter klausler authored
Original-commit: flang-compiler/f18@7c55097e81c9ab76953c1c652128bc9b969e6a33 Reviewed-on: https://github.com/flang-compiler/f18/pull/926 Tree-same-pre-rewrite: false
-