Issue 1:
Possible (probable) duplicate of #13186.

Compiling the following program against with rust@30fe550 against brson/rust-sdl@804adf6:

extern crate sdl;

static my_pixfmt: sdl::video::PixelFormat = sdl::video::PixelFormat {
palette: None,
bpp: 24,
r_loss: 0,
g_loss: 0,
b_loss: 0,
a_loss: 0,
r_shift: 16,
g_shift: 8,
b_shift: 0,
a_shift: 0,
r_mask: 0xff,
g_mask: 0xff00,
b_mask: 0xff0000,
a_mask: 0,
color_key: 0,
alpha: 0,
};

fn main() {
print!("{:?}", my_pixfmt);
}

gives:

$ RUST_BACKTRACE=1 rustc -L rust-sdl -o test test.rs
{ { i8, [15 x i8] }, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i8 } { { i8, [15 x i8] } { i8 0, [15 x i8] undef }, i8 24, i8 0, i8 0, i8 0, i8 0, i8 16, i8 8, i8 0, i8 0, i32 255, i32 65280, i32 16711680, i32 0, i32 0, i8 0 }
{ { i8, [7 x i8], [1 x i64] }, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i8 } undef
error: internal compiler error: const expr(8: sdl::video::PixelFormat{palette: None,
bpp: 24,
r_loss: 0,
g_loss: 0,
b_loss: 0,
a_loss: 0,
r_shift: 16,
g_shift: 8,
b_shift: 0,
a_shift: 0,
r_mask: 255,
g_mask: 65280,
b_mask: 16711680,
a_mask: 0,
color_key: 0,
alpha: 0,}) of type sdl::video::PixelFormat has size 52 instead of 56
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at '~Any', /home/robn/code/rust/rust/src/libsyntax/diagnostic.rs:155
stack backtrace:
1: 0x7f46a1812930 - rt::backtrace::imp::write::h726c0ee05b0a1251rta::v0.11.pre
2: 0x7f46a1772370 - rt::unwind::begin_unwind_inner::h9b7e455dab1796daw39::v0.11.pre
3: 0x7f46a0c39430 - rt::unwind::begin_unwind::h5910056841063238677::v0.11.pre
4: 0x7f46a0c3a490 - diagnostic::Handler::bug::h0f9bbab1cbb7e822AYb::v0.11.pre
5: 0x7f46a2429510 - driver::session::Session::bug::h6e55d6e6cbf0d844bhh::v0.11.pre
6: 0x7f46a24db640 - middle::trans::consts::const_expr::ha281951f96861546GFj::v0.11.pre
7: 0x7f46a2426850 - middle::trans::base::get_item_val::h4b8a8b57d5346ddbBNp::v0.11.pre
8: 0x7f46a24dd3c0 - middle::trans::consts::trans_const::h6abb7670a66f1aecstk::v0.11.pre
9: 0x7f46a2425440 - middle::trans::base::trans_item::h65d6980b59f31439Btp::v0.11.pre
10: 0x7f46a250d2c0 - middle::trans::base::trans_mod::hdd24677d9163c30cHyp::v0.11.pre
11: 0x7f46a25151a0 - middle::trans::base::trans_crate::h0920ca7f9115adc25dq::v0.11.pre
12: 0x7f46a2c404a0 - driver::driver::phase_4_translate_to_llvm::hb81995af2fcfe7361Cf::v0.11.pre
13: 0x7f46a2c42a90 - driver::driver::compile_input::hfaa2edba3ed249a4QSf::v0.11.pre
14: 0x7f46a2c67490 - run_compiler::h0c58ff7ffab7f82efpn::v0.11.pre
15: 0x7f46a2c7f210 - main_args::closure.91455
16: 0x7f46a2c7d710 - monitor::closure.91330
17: 0x7f46a2c79000 - task::TaskBuilder::try::closure.91096
18: 0x7f46a1e9d650 - task::spawn_opts::closure.7103
19: 0x7f46a180d970 - rt::task::Task::run::closure.39989
20: 0x7f46a18196b0 - rust_try
21: 0x7f46a180d7b0 - rt::task::Task::run::hc79a6e8202de0a541T7::v0.11.pre
22: 0x7f46a1e9d420 - task::spawn_opts::closure.7076
23: 0x7f46a1811470 - rt::thread::thread_start::h915d8ac90bd84ba1My8::v0.11.pre
24: 0x7f469f52ffa0 - start_thread
25: 0x7f46a1445a09 - __clone
26: 0x0 - <unknown>

Unfortunately I was unable to reduce this to a case that doesn't require rust-sdl. The PixelFormat structure is a bit too complex for me to know which bits are important for this case.

Happy to help reduce it further if I can. Let me know.

Issue 2:
bug.rs:

pub struct Request {
analyze: Option<int>,
unknown_command: Option<Option<bool>>,
}

pub fn default_instance() -> &'static Request {
static instance: Request = Request {
analyze: None,
unknown_command: None,
};
&'static instance
}

fn main() {}

RUST_BACKTRACE=1 rustc ./bug.rs:

{ { i8, [15 x i8] }, { i8, [2 x i8] } } { { i8, [15 x i8] } { i8 0, [15 x i8] undef }, { i8, [2 x i8] } { i8 0, [2 x i8] undef } }
{ { i8, [7 x i8], [1 x i64] }, { i8, [0 x i8], [2 x i8] } } undef
error: internal compiler error: const expr(27: Request{analyze: None, unknown_command: None,}) of type Request has size 19 instead of 24
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at '~Any', /build/buildd/rust-nightly-201403270405~c83994e~precise/src/libsyntax/diagnostic.rs:123
stack backtrace:
1: 0x7f25fdd3ad40 - rt::backtrace::imp::write::h6b777dcaf409ea23F2b::v0.10.pre
2: 0x7f25fdc9c930 - rt::unwind::begin_unwind_inner::h127556ef836f43d59Cb::v0.10.pre
3: 0x7f25fcf775c0 - <unknown>
4: 0x7f25fcf781a0 - diagnostic::Handler::bug::h90ba33079579ed8cpVb::v0.10.pre
5: 0x7f25fe934450 - driver::session::Session::bug::h861141e387b844784gg::v0.10.pre
6: 0x7f25fe9d5d00 - middle::trans::consts::const_expr::h184e010c42c47b98ASi::v0.10.pre
7: 0x7f25fe9313c0 - middle::trans::base::get_item_val::h6182c9507a6ad448T4o::v0.10.pre
8: 0x7f25fe9d7ad0 - middle::trans::consts::trans_const::hb8427f2eaca603fbmGj::v0.10.pre
9: 0x7f25fe9301b0 - middle::trans::base::trans_item::ha5706cc0fc79239cXKo::v0.10.pre
10: 0x7f25fe9619f0 - middle::trans::controlflow::trans_stmt::h768eb5d45871275d8Xa::v0.10.pre
11: 0x7f25fe963570 - middle::trans::controlflow::trans_block::hc51a2a8399fee0bcc2a::v0.10.pre
12: 0x7f25fea05730 - middle::trans::base::trans_closure::h80d2b66d04a2d7e9yro::v0.10.pre
13: 0x7f25fe9352d0 - middle::trans::base::trans_fn::h4d00598e72c1fbe7mzo::v0.10.pre
14: 0x7f25fe9301b0 - middle::trans::base::trans_item::ha5706cc0fc79239cXKo::v0.10.pre
15: 0x7f25fea0a140 - middle::trans::base::trans_mod::h3b0d6ed6e779ebe82Po::v0.10.pre
16: 0x7f25fea13600 - middle::trans::base::trans_crate::h0223b28ee84b5a27vmq::v0.10.pre
17: 0x7f25ff0599d0 - driver::driver::phase_4_translate_to_llvm::h70976aba4cbfb3846Fe::v0.10.pre
18: 0x7f25ff05bba0 - driver::driver::compile_input::h8b8903fabd6a5683VVe::v0.10.pre
19: 0x7f25ff07fa80 - run_compiler::h41aecde7ee81abf7cym::v0.10.pre
20: 0x7f25ff0972d0 - <unknown>
21: 0x7f25ff095c00 - <unknown>
22: 0x7f25ff091530 - <unknown>
23: 0x7f25fe3df590 - <unknown>
24: 0x7f25fdd361d0 - <unknown>
25: 0x7f25fdd41810 - rust_try
26: 0x7f25fdd36010 - rt::task::Task::run::heda54ea5581c3cc41t9::v0.10.pre
27: 0x7f25fe3df360 - <unknown>
28: 0x7f25fdd39880 - <unknown>
29: 0x7f25fb2a4dc0 - start_thread
30: 0x0 - <unknown>

Using rust nightly, version: 201403270405~c83994e, on Linux x86_64.