[all-commits] [llvm/llvm-project] 554791: Fix a crash when casting _Complex and ignoring the...

AaronBallman via All-commits all-commits at lists.llvm.org
Tue Jan 28 10:06:04 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 554791928088d6139e0fb3480d79cd76ea59198f
      https://github.com/llvm/llvm-project/commit/554791928088d6139e0fb3480d79cd76ea59198f
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2020-01-28 (Tue, 28 Jan 2020)

  Changed paths:
    M clang/lib/CodeGen/CGExprComplex.cpp
    M clang/test/CodeGen/complex-convert.c

  Log Message:
  -----------
  Fix a crash when casting _Complex and ignoring the results.

Performing a cast where the result is ignored caused Clang to crash when
performing codegen for the conversion:

  _Complex int a;
  void fn1() { (_Complex double) a; }

This patch addresses the crash by not trying to emit the scalar conversions,
causing it to be a noop. Fixes PR44624.




More information about the All-commits mailing list