[all-commits] [llvm/llvm-project] 380955: [flang] Constraint checks C751 to C760

Pete Steinfeld via All-commits all-commits at lists.llvm.org
Fri May 15 19:05:33 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 38095549c6a12a75794595464fa9b95f5c6dcf35
      https://github.com/llvm/llvm-project/commit/38095549c6a12a75794595464fa9b95f5c6dcf35
  Author: Pete Steinfeld <psteinfeld at nvidia.com>
  Date:   2020-05-15 (Fri, 15 May 2020)

  Changed paths:
    M flang/include/flang/Evaluate/check-expression.h
    M flang/lib/Evaluate/check-expression.cpp
    M flang/lib/Semantics/check-declarations.cpp
    M flang/lib/Semantics/resolve-names.cpp
    M flang/lib/Semantics/type.cpp
    M flang/test/Semantics/assign02.f90
    M flang/test/Semantics/resolve31.f90
    M flang/test/Semantics/resolve33.f90
    M flang/test/Semantics/resolve34.f90
    M flang/test/Semantics/resolve52.f90
    M flang/test/Semantics/resolve79.f90
    M flang/test/Semantics/resolve89.f90
    A flang/test/Semantics/resolve90.f90

  Log Message:
  -----------
  [flang] Constraint checks C751 to C760

Summary:
Many of these were already implemented, and I just annotated the tests and/or
the code.

C752 was a simple check to verify that CONTIGUOUS components are arrays with

C754 proved to be virtually identical to C750 that I implemented previously.
This caused me to remove the distinction between specification expressions for
type parameters and bounds expressions that I'd previously created.
the POINTER attribute.

I also changed the error messages to specify that errors in specification
expressions could arise from either bad derived type components or type
parameters.

In cases where we detect a type param that was not declared, I created a symbol
marked as erroneous.  That avoids subsequent semantic process for expressions
containing the symbol.  This change caused me to adjust tests resolve33.f90 and
resolve34.f90.  Also, I avoided putting out error messages for erroneous type
param symbols in `OkToAddComponent()` in resolve-names.cpp and in
`EvaluateParameters()`, type.cpp.

C756 checks that procedure components have the POINTER attribute.

Reviewers: tskeith, klausler, DavidTruby

Subscribers: llvm-commits

Tags: #llvm, #flang

Differential Revision: https://reviews.llvm.org/D79798




More information about the All-commits mailing list