From patchwork Tue Feb 28 13:51:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 733544 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vXg3p1ZGRz9s7k for ; Wed, 1 Mar 2017 00:51:49 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="E+It38DA"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=iq8GA7NIxPMGLENx2Co1f9+x9oLGIvYOaqsRTPvFnYUbdSCSEa 6ZM4HNPu58OKAsyn9XauVMlAGVecyK2JQZouNRyYcBOyPIxf2C+dCBFsiL32M3Xh AtyNzZmLUX0+415Ku9yLqbZokJoaMhhj8Vdrp6kuO3AN237o4WD4oCvFg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=g11tmT5s//N0iJT6i4RibIBTsyA=; b=E+It38DAoec5kJMct9oQ FHCiyS0mURZQHnwOazEZ9ILkKrb2OUH53kh6xpZv8HqKAfgTkeNzOD5iEdf3s5IR Vy1QetYuJ8qGuQfmnTv7nrzDzqLLuiJiAXAThdRQxeFvd2UUjZ81VSo3j/a2E3U9 OaBzKgwS0gn8y/fuB1jPnms= Received: (qmail 35758 invoked by alias); 28 Feb 2017 13:51:41 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 35698 invoked by uid 89); 28 Feb 2017 13:51:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 28 Feb 2017 13:51:35 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9EDFDAB9A; Tue, 28 Feb 2017 13:51:33 +0000 (UTC) To: GCC Patches Cc: David Malcolm From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [PATCH] Do not allow to run GIMPLE or RTL test-cases w/ LTO (PR lto/79625). Message-ID: <9ecfa68b-7386-c852-39a0-09a54349c2b6@suse.cz> Date: Tue, 28 Feb 2017 14:51:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 X-IsSubscribed: yes 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 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 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 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 *); 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