aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-opts.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2010-07-23 05:23:50 +0000
committerAndi Kleen <ak@gcc.gnu.org>2010-07-23 05:23:50 +0000
commit090fc3f4db2b05936d6f05b6ae4228fb86374cd3 (patch)
tree56ae3ac2179b21a6deef76ee4052fc36c257201f /gcc/lto-opts.c
parent9d3493e63d87f3cbd0c3caab3b429583f8b6c7b6 (diff)
downloadgcc-090fc3f4db2b05936d6f05b6ae4228fb86374cd3.zip
gcc-090fc3f4db2b05936d6f05b6ae4228fb86374cd3.tar.gz
gcc-090fc3f4db2b05936d6f05b6ae4228fb86374cd3.tar.bz2
lto-opts.c (lto_read_file_options): Check for missing section.
2010-07-10 Andi Kleen <ak@linux.intel.com> * lto-opts.c (lto_read_file_options): Check for missing section. From-SVN: r162439
Diffstat (limited to 'gcc/lto-opts.c')
-rw-r--r--gcc/lto-opts.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/lto-opts.c b/gcc/lto-opts.c
index 8405714..21a5a20 100644
--- a/gcc/lto-opts.c
+++ b/gcc/lto-opts.c
@@ -356,6 +356,8 @@ lto_read_file_options (struct lto_file_decl_data *file_data)
struct lto_input_block ib;
data = lto_get_section_data (file_data, LTO_section_opts, NULL, &len);
+ if (!data)
+ return;
header = (const struct lto_simple_header *) data;
opts_offset = sizeof (*header);