1. Mar 10, 2020
    • Tim Keith's avatar
      [flang] Perform definability checks on LHS of assignment · a0a1f519
      Tim Keith authored
      If the pure context check succeeds, call `WhyNotModifiable` to verify
      the LHS can be modified.
      
      Detect assignment to whole assumed-size array.
      
      Change `IsVariable` to return false for a parameter or a component or
      array reference whose base it a parameter.
      
      When analyzing an assignment statement, report an error if the LHS is
      a constant expression. Otherwise it might get folded and when we detect
      the problem later the error will be confusing.
      
      Handle Substring on LHS of assignment. Change ExtractDataRef and IsVariable
      to work on a Substring.
      
      Fix IsImpliedShape and IsAssumedSize predicates in ArraySpec.
      
      Fix C709 check in check-declarations.cpp.
      
      Original-commit: flang-compiler/f18@f2d2657aab051b938ec4e4702926aadb436c19aa
      Reviewed-on: https://github.com/flang-compiler/f18/pull/1050
      a0a1f519
    • Tim Keith's avatar
      [flang] Change CheckDefinabilityInPureScope to return bool · c97e1c0a
      Tim Keith authored
      Have CheckDefinabilityInPureScope and CheckCopyabilityInPureScope return
      false when their checks fail and report errors so that we will be able
      to avoid reporting extra errors in those cases.
      
      Original-commit: flang-compiler/f18@305a3470e572161483b0f430514b77ba19f932ea
      Reviewed-on: https://github.com/flang-compiler/f18/pull/1050
      Tree-same-pre-rewrite: false
      c97e1c0a
    • Tim Keith's avatar
      [flang] Change WhyNotModifiable to return optional · 2cc21cec
      Tim Keith authored
      One overload of WhyNotModifiable returned an optional message while the
      other returns a unique_ptr. Change the latter to be consistent with the
      former and other message-returning functions in this file.
      
      Also, reorder the if clauses to reduce the level of indentation.
      
      Original-commit: flang-compiler/f18@864e9cfc7ee98e3646052fdc757943011d641691
      Reviewed-on: https://github.com/flang-compiler/f18/pull/1050
      Tree-same-pre-rewrite: false
      2cc21cec
    • Tim Keith's avatar
      [flang] Fix handling of DataRef when analyzing CoindexedNamedObject · 0b130278
      Tim Keith authored
      As we loop through the Components, maintain a pointer to the current
      DataRef rather than moving it. This is more efficient and the previous
      behavior caused illegal memory accesses.
      
      Original-commit: flang-compiler/f18@cede2971ff863b8dd6a2c8727f6566a444ac7a52
      Reviewed-on: https://github.com/flang-compiler/f18/pull/1050
      Tree-same-pre-rewrite: false
      0b130278
  2. Mar 06, 2020
  3. Mar 05, 2020
  4. Mar 02, 2020
  5. Mar 04, 2020
  6. Mar 03, 2020
  7. Mar 02, 2020
    • Tim Keith's avatar
      [flang] Expression analysis on DataStmtConstant · 2a00c617
      Tim Keith authored
      Data statements contains expressions but they are not wrapped in one of
      the kinds of parse tree nodes that are analyzed, like `parser::Expr`.
      So potential errors were not discovered.
      
      Change `ExprChecker` to handle `DataStmtConstant` and analyze any
      expressions that are contained in it. Note that the analyzed form of
      the expression is not yet saved in the parse tree.
      
      Original-commit: flang-compiler/f18@8bdaf0a521f6630ec2c369b2c41484eff4803d6e
      Reviewed-on: https://github.com/flang-compiler/f18/pull/1044
      2a00c617
  8. Feb 28, 2020
  9. Feb 27, 2020
    • Pete Steinfeld's avatar
      [flang] Semantic checks for C712 through C727 · 657aaf8b
      Pete Steinfeld authored
      I've updated the compiler and test source with references to the contraints at
      the points where they were enforced and tested.  Many of these were already
      implemented and required no code change.  A few constraint checks were both
      implemented and tested, and I only added references to the constraint
      numbers in the compiler source and tests.  Here are the things I had to
      implement:
      
      Constraint C716 states that, in a REAL constant, if both a kind-param and an
      exponent letter appear, the exponent letter must be 'E'.
      
      Constraints C715 and C719 require that a KIND value be actually implemented.
      
      Constraint C722 requires that functions that return assumed-length character
      types are external.
      
      Constraint C726 disallows assumed lenght charater types for dummy arguments and
      return types.
      
      Original-commit: flang-compiler/f18@45998741e5f04bba7db6eed6a4d27c1d25209b41
      Reviewed-on: https://github.com/flang-compiler/f18/pull/1031
      Tree-same-pre-rewrite: false
      657aaf8b
    • Tim Keith's avatar
      [flang] Merge pull request flang-compiler/f18#1024 from flang-compiler/tsk-rewrite · c388d26f
      Tim Keith authored
      Fix misparsed structure constructor in data stmt
      
      Original-commit: flang-compiler/f18@7649e5d705b2c87d710525d522a42288030c3bfa
      Reviewed-on: https://github.com/flang-compiler/f18/pull/1024
      c388d26f
  10. Feb 26, 2020
  11. Feb 27, 2020
  12. Feb 26, 2020
  13. Feb 25, 2020
  14. Feb 22, 2020