[all-commits] [llvm/llvm-project] bead8b: Merging r371548:

Alexey Bataev via All-commits all-commits at lists.llvm.org
Wed Nov 27 13:56:26 PST 2019


  Branch: refs/heads/release/9.x
  Home:   https://github.com/llvm/llvm-project
  Commit: bead8bf31fb4a6bf02af67bd3029adb5dedf704f
      https://github.com/llvm/llvm-project/commit/bead8bf31fb4a6bf02af67bd3029adb5dedf704f
  Author: Alexey Bataev <a.bataev at hotmail.com>
  Date:   2019-11-27 (Wed, 27 Nov 2019)

  Changed paths:
    M clang/lib/CodeGen/CGExpr.cpp
    A clang/test/OpenMP/constexpr_partial_array.cpp

  Log Message:
  -----------
  Merging r371548:

------------------------------------------------------------------------
r371548 | abataev | 2019-09-10 12:16:56 -0700 (Tue, 10 Sep 2019) | 10 lines

Fix for PR43175: compiler crash when trying to emit noncapturable
constant.

If the constexpr variable is partially initialized, the initializer can
be emitted as the structure, not as an array, because of some early
optimizations. The llvm variable gets the type from this constant and,
thus, gets the type which is pointer to struct rather than pointer to an
array. We need to convert this type to be truely array, otherwise it may
lead to the compiler crash when trying to emit array subscript
expression.
------------------------------------------------------------------------




More information about the All-commits mailing list