diff mbox

Do not allow to run GIMPLE or RTL test-cases w/ LTO (PR lto/79625).

Message ID 9ecfa68b-7386-c852-39a0-09a54349c2b6@suse.cz
State New
Headers show

Commit Message

Martin Liška Feb. 28, 2017, 1:51 p.m. UTC
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

Comments

Richard Biener Feb. 28, 2017, 2:45 p.m. UTC | #1
On Tue, Feb 28, 2017 at 2:51 PM, Martin Liška <mliska@suse.cz> wrote:
> 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?

Actually GIMPLE should work fine if you make sure to start compilation
before LTO streaming,
if you don't it also won't ICE, will it?

Richard.

> Thanks,
> Martin
Martin Liška Feb. 28, 2017, 3:15 p.m. UTC | #2
On 02/28/2017 03:45 PM, Richard Biener wrote:
> On Tue, Feb 28, 2017 at 2:51 PM, Martin Liška <mliska@suse.cz> wrote:
>> 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?
> 
> Actually GIMPLE should work fine if you make sure to start compilation
> before LTO streaming,
> if you don't it also won't ICE, will it?

Hm, can't find startwith value that will cause that. Btw. why choosing an invalid startwith
option does not display an error message? Should I report that?

Do you have a candidate option that can possibly trigger an ICE ("stdarg" works for me).

Martin

> 
> Richard.
> 
>> Thanks,
>> Martin
Richard Biener Feb. 28, 2017, 3:36 p.m. UTC | #3
On Tue, Feb 28, 2017 at 4:15 PM, Martin Liška <mliska@suse.cz> wrote:
> On 02/28/2017 03:45 PM, Richard Biener wrote:
>> On Tue, Feb 28, 2017 at 2:51 PM, Martin Liška <mliska@suse.cz> wrote:
>>> 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?
>>
>> Actually GIMPLE should work fine if you make sure to start compilation
>> before LTO streaming,
>> if you don't it also won't ICE, will it?
>
> Hm, can't find startwith value that will cause that. Btw. why choosing an invalid startwith
> option does not display an error message? Should I report that?
>
> Do you have a candidate option that can possibly trigger an ICE ("stdarg" works for me).

I think it'll never ICE but it will just eventually fail to link
(because the function is not streamed).

Richard.

> Martin
>
>>
>> Richard.
>>
>>> Thanks,
>>> Martin
>
Martin Liška Feb. 28, 2017, 3:39 p.m. UTC | #4
On 02/28/2017 04:36 PM, Richard Biener wrote:
> On Tue, Feb 28, 2017 at 4:15 PM, Martin Liška <mliska@suse.cz> wrote:
>> On 02/28/2017 03:45 PM, Richard Biener wrote:
>>> On Tue, Feb 28, 2017 at 2:51 PM, Martin Liška <mliska@suse.cz> wrote:
>>>> 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?
>>>
>>> Actually GIMPLE should work fine if you make sure to start compilation
>>> before LTO streaming,
>>> if you don't it also won't ICE, will it?
>>
>> Hm, can't find startwith value that will cause that. Btw. why choosing an invalid startwith
>> option does not display an error message? Should I report that?
>>
>> Do you have a candidate option that can possibly trigger an ICE ("stdarg" works for me).
> 
> I think it'll never ICE but it will just eventually fail to link
> (because the function is not streamed).

Thus it's fine for me. May I install just the RTL hunk after my tests will finish?

M.

> 
> Richard.
> 
>> Martin
>>
>>>
>>> Richard.
>>>
>>>> Thanks,
>>>> Martin
>>
Richard Biener Feb. 28, 2017, 3:43 p.m. UTC | #5
On Tue, Feb 28, 2017 at 4:39 PM, Martin Liška <mliska@suse.cz> wrote:
> On 02/28/2017 04:36 PM, Richard Biener wrote:
>> On Tue, Feb 28, 2017 at 4:15 PM, Martin Liška <mliska@suse.cz> wrote:
>>> On 02/28/2017 03:45 PM, Richard Biener wrote:
>>>> On Tue, Feb 28, 2017 at 2:51 PM, Martin Liška <mliska@suse.cz> wrote:
>>>>> 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?
>>>>
>>>> Actually GIMPLE should work fine if you make sure to start compilation
>>>> before LTO streaming,
>>>> if you don't it also won't ICE, will it?
>>>
>>> Hm, can't find startwith value that will cause that. Btw. why choosing an invalid startwith
>>> option does not display an error message? Should I report that?
>>>
>>> Do you have a candidate option that can possibly trigger an ICE ("stdarg" works for me).
>>
>> I think it'll never ICE but it will just eventually fail to link
>> (because the function is not streamed).
>
> Thus it's fine for me. May I install just the RTL hunk after my tests will finish?

Yes.

> M.
>
>>
>> Richard.
>>
>>> Martin
>>>
>>>>
>>>> Richard.
>>>>
>>>>> Thanks,
>>>>> Martin
>>>
>
diff mbox

Patch

From 3c26a29821b52d4e90fa05686a473b565ddf5ba9 Mon Sep 17 00:00:00 2001
From: marxin <mliska@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  <mliska@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  <mliska@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