]> git.lizzy.rs Git - rust.git/commit
Do not ICE in codegen given a extern_type static
authorDan Robertson <dan@dlrobertson.com>
Tue, 5 Feb 2019 15:52:54 +0000 (15:52 +0000)
committerDan Robertson <dan@dlrobertson.com>
Tue, 5 Feb 2019 21:20:07 +0000 (21:20 +0000)
commit80c052bed76d7b7406e956747012bc8a929fe909
tree77a17b1ae61363f1c0191da16bee3d4324b2956c
parentb2c6b8c29f13f8d1f242da89e587960b95337819
Do not ICE in codegen given a extern_type static

The layout of a extern_type static is unsized, but may pass the
Well-Formed check in typeck. As a result, we cannot assume that
a static is sized when generating the `Place` for an r-value.
src/librustc_codegen_ssa/mir/place.rs
src/test/run-make-fulldeps/static-extern-type/Makefile [new file with mode: 0644]
src/test/run-make-fulldeps/static-extern-type/define-foo.c [new file with mode: 0644]
src/test/run-make-fulldeps/static-extern-type/use-foo.rs [new file with mode: 0644]