[all-commits] [llvm/llvm-project] f8700d: [Sema][SVE] Don't allow static or thread-local var...

rsandifo-arm via All-commits all-commits at lists.llvm.org
Thu Mar 12 10:39:56 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f8700db7f150287b71453e4ae10dea79a2e4fb03
      https://github.com/llvm/llvm-project/commit/f8700db7f150287b71453e4ae10dea79a2e4fb03
  Author: Richard Sandiford <richard.sandiford at arm.com>
  Date:   2020-03-12 (Thu, 12 Mar 2020)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/Sema/sizeless-1.c
    M clang/test/SemaCXX/sizeless-1.cpp

  Log Message:
  -----------
  [Sema][SVE] Don't allow static or thread-local variables to have sizeless type

clang accepts a TU containing just:

  __SVInt8_t x;

However, sizeless types are not allowed to have static or thread-local
storage duration and trying to code-generate the TU triggers an LLVM
fatal error:

  Globals cannot contain scalable vectors
  <vscale x 16 x i8>* @x
  fatal error: error in backend: Broken module found, compilation aborted!

This patch adds an associated clang diagnostic.

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




More information about the All-commits mailing list