From 7caa21fc327a7b32b707d906fa05683e992fc3fb Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Wed, 18 Nov 2009 16:13:09 +0000 Subject: [PATCH] lto-streamer-in.c (input_gimple_stmt): Assert that we find a valid field decl if checking is enabled. 2009-11-18 Richard Guenther * lto-streamer-in.c (input_gimple_stmt): Assert that we find a valid field decl if checking is enabled. From-SVN: r154298 --- gcc/ChangeLog | 5 +++++ gcc/lto-streamer-in.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 07fbcf4520c..d316b744e03 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2009-11-18 Richard Guenther + + * lto-streamer-in.c (input_gimple_stmt): Assert that we find + a valid field decl if checking is enabled. + 2009-11-18 Martin Jambor * ipa-prop.h (struct ipa_param_call_note): New field lto_stmt_uid. diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c index dcc92fde13d..751e70472e4 100644 --- a/gcc/lto-streamer-in.c +++ b/gcc/lto-streamer-in.c @@ -1090,7 +1090,11 @@ input_gimple_stmt (struct lto_input_block *ib, struct data_in *data_in, } /* In case of type mismatches across units we can fail to unify some types and thus not find a proper - field-decl here. Just do nothing in this case. */ + field-decl here. So only assert here if checking + is enabled. */ +#ifdef ENABLE_CHECKING + gcc_assert (tem != NULL_TREE); +#endif if (tem != NULL_TREE) TREE_OPERAND (op, 1) = tem; }