OSDN Git Service

Don't try to create a GEP when the pointee type is unsized (such GEPs
authorDuncan Sands <baldrick@free.fr>
Wed, 11 Jan 2012 12:20:08 +0000 (12:20 +0000)
committerDuncan Sands <baldrick@free.fr>
Wed, 11 Jan 2012 12:20:08 +0000 (12:20 +0000)
commit1876abe63edf0380aee3d0f3ad9cace3f7e6a042
tree1403d07800bc0d0e70c5296610c2f4695f6c87ee
parente4bc80a14be77c232e1c4e1f30308a72d5cec05a
Don't try to create a GEP when the pointee type is unsized (such GEPs
are invalid).  Fixes a crash on array1.C from the GCC testsuite when
compiled with dragonegg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147946 91177308-0d34-0410-b5e6-96231b3b80d8
lib/VMCore/ConstantFold.cpp
test/Transforms/InstCombine/2012-01-11-OpaqueBitcastCrash.ll [new file with mode: 0644]