diff options
author | Bernd Schmidt <bernds@codesourcery.com> | 2015-01-09 21:38:00 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2015-01-09 22:38:00 +0100 |
commit | 1b34e6e25062154c9a978785902db3a3326234eb (patch) | |
tree | 0fa5fbb2a370d97a2ae01365d2990eccfaad9616 /gcc/lto-opts.c | |
parent | 000c70a76c61dc95075e937f2bfa457226036b3f (diff) | |
download | gcc-1b34e6e25062154c9a978785902db3a3326234eb.tar.gz |
re PR middle-end/64412 (ICE in offload compiler: in extract_insn, at recog.c:2327)
PR middle-end/64412
* lto-streamer.h (lto_stream_offload_p): New declaration.
* lto-streamer.c (lto_stream_offload_p): New variable.
* cgraphunit.c (ipa_passes): Set lto_stream_offload_p
at the same time as section_name_prefix.
* lto-streamer-out.c (hash_tree): Don't hash TREE_TARGET_OPTION
if lto_stream_offload_p.
* tree-streamer-out.c (streamer_pack_tree_bitfields): Don't
stream TREE_TARGET_OPTION if lto_stream_offload_p.
(write_ts_function_decl_tree_pointers): Don't
stream DECL_FUNCTION_SPECIFIC_TARGET if lto_stream_offload_p.
* tree-streamer-in.c (unpack_value_fields): Don't stream
TREE_TARGET_OPTION in if ACCEL_COMPILER.
(lto_input_ts_function_decl_tree_pointers): Don't stream
DECL_FUNCTION_SPECIFIC_TARGET in if ACCEL_COMPILER.
* lto-opts.c (lto_write_options): Use lto_stream_offload_p
instead of section_name_prefix string comparisons.
lto/
* lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
if ACCEL_COMPILER.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r219410
Diffstat (limited to 'gcc/lto-opts.c')
-rw-r--r-- | gcc/lto-opts.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/lto-opts.c b/gcc/lto-opts.c index 9a635b157a0..026b323b46f 100644 --- a/gcc/lto-opts.c +++ b/gcc/lto-opts.c @@ -167,7 +167,7 @@ lto_write_options (void) "-fno-strict-overflow"); /* Append options from target hook and store them to offload_lto section. */ - if (strcmp (section_name_prefix, OFFLOAD_SECTION_NAME_PREFIX) == 0) + if (lto_stream_offload_p) { char *offload_opts = targetm.offload_options (); char *offload_ptr = offload_opts; @@ -208,7 +208,7 @@ lto_write_options (void) /* Do not store target-specific options in offload_lto section. */ if ((cl_options[option->opt_index].flags & CL_TARGET) - && strcmp (section_name_prefix, OFFLOAD_SECTION_NAME_PREFIX) == 0) + && lto_stream_offload_p) continue; /* Drop options created from the gcc driver that will be rejected @@ -221,8 +221,7 @@ lto_write_options (void) We do not need those. The only exception is -foffload option, if we write it in offload_lto section. Also drop all diagnostic options. */ if ((cl_options[option->opt_index].flags & (CL_DRIVER|CL_WARNING)) - && (strcmp (section_name_prefix, OFFLOAD_SECTION_NAME_PREFIX) != 0 - || option->opt_index != OPT_foffload_)) + && (!lto_stream_offload_p || option->opt_index != OPT_foffload_)) continue; for (j = 0; j < option->canonical_option_num_elements; ++j) |