Hello. As mentioned in the PR, I hope rejecting -flto option with both GIMPLE and RTL can work for the issue.
Ready after it finishes regression tests? Thanks, Martin
>From 3c26a29821b52d4e90fa05686a473b565ddf5ba9 Mon Sep 17 00:00:00 2001 From: marxin <mli...@suse.cz> Date: Tue, 21 Feb 2017 10:35:39 +0100 Subject: [PATCH] Do not allow to run GIMPLE or RTL test-cases w/ LTO (PR lto/79625). gcc/ChangeLog: 2017-02-28 Martin Liska <mli...@suse.cz> PR lto/79625 * read-rtl-function.c (function_reader::handle_unknown_directive): Bail out when one uses -flto. gcc/c/ChangeLog: 2017-02-28 Martin Liska <mli...@suse.cz> PR lto/79625 * gimple-parser.c (c_parser_parse_gimple_body): Bail out when one uses -flto. --- gcc/c/gimple-parser.c | 3 +++ gcc/read-rtl-function.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/gcc/c/gimple-parser.c b/gcc/c/gimple-parser.c index 0d6384b55c2..c56a2a4ac48 100644 --- a/gcc/c/gimple-parser.c +++ b/gcc/c/gimple-parser.c @@ -81,6 +81,9 @@ static void c_parser_gimple_expr_list (c_parser *, vec<tree> *); void c_parser_parse_gimple_body (c_parser *parser) { + if (flag_lto) + error ("%<__GIMPLE%> function cannot be compiled with %<-flto%>"); + gimple_seq seq = NULL; gimple_seq body = NULL; tree stmt = push_stmt_list (); diff --git a/gcc/read-rtl-function.c b/gcc/read-rtl-function.c index bead85811e6..8552cd2ae8c 100644 --- a/gcc/read-rtl-function.c +++ b/gcc/read-rtl-function.c @@ -405,6 +405,9 @@ function_reader::handle_unknown_directive (file_location start_loc, if (strcmp (name, "function")) fatal_at (start_loc, "expected 'function'"); + if (flag_lto) + error ("%<__RTL%> function cannot be compiled with %<-flto%>"); + parse_function (); } -- 2.11.1