[all-commits] [llvm/llvm-project] c0c3ca: [flang] Fix assert on bad character kind

Tim Keith via All-commits all-commits at lists.llvm.org
Sat Aug 22 10:11:58 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c0c3cafa2bdaaf878a6b544837073d3d92fbb797
      https://github.com/llvm/llvm-project/commit/c0c3cafa2bdaaf878a6b544837073d3d92fbb797
  Author: Tim Keith <tkeith at nvidia.com>
  Date:   2020-08-22 (Sat, 22 Aug 2020)

  Changed paths:
    M flang/lib/Semantics/resolve-names.cpp
    M flang/test/Semantics/kinds02.f90

  Log Message:
  -----------
  [flang] Fix assert on bad character kind

When we report an error for a bad character kind, don't keep it in the
`DeclTypeSpec`. Otherwise there could be further problems. In this case,
`ComputeOffsets()` got an assertion error because we didn't recognize
`CHARACTER(*,8)` as needing a descriptor because of the bad kind.

Fixes https://bugs.llvm.org/show_bug.cgi?id=47173

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




More information about the All-commits mailing list