From patchwork Mon Jun 20 18:38:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 638218 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 3rYKP602MYz9sxb for ; Tue, 21 Jun 2016 04:38:17 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=df9Hh4u4; 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:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; q=dns; s=default; b=dlFA30eMad6piZEQa3dP7CNXMUaAU OtMB+ftcnjpLRak0v5cDKqDSWyp9sCLmrfxEKt5UlFN0tD31iXRPVSKFo+coh2T9 3xkwDSg2e0I/oL7V0xged+KXGBOBvPVlG5MRErcL9NoIwK6YmmBe9E/LE+bFsers K+5XuOleL5KZ4c= 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:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; s=default; bh=7gCb1eZc1lorjdnx57vZuBWorm4=; b=df9 Hh4u4f107CQ01AEam5EHtieVyuvRsxqZIqhLBWuxvYLB/oJvbFKqkdSkTyiERvQ8 X86MoX2PqQm03GutCkop+Yi7KvuCyWzww+m0ZX5hLDR+w2PS7uzl4FoL8VRotjAm cCFfzSj1deDnvZTVfFyU3z8GMiw06lAyhp17WYlw= Received: (qmail 119428 invoked by alias); 20 Jun 2016 18:38:10 -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 119410 invoked by uid 89); 20 Jun 2016 18:38:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=2047, 6, 20476, family X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 20 Jun 2016 18:38:08 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A9D52C05B1CA for ; Mon, 20 Jun 2016 18:38:07 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-51.ams2.redhat.com [10.36.116.51]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5KIc5q2025380 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 20 Jun 2016 14:38:07 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id u5KIc4vj025074; Mon, 20 Jun 2016 20:38:04 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id u5KIc2oM025072; Mon, 20 Jun 2016 20:38:02 +0200 Date: Mon, 20 Jun 2016 20:38:02 +0200 From: Jakub Jelinek To: Jeff Law , Bernd Schmidt , David Malcolm Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Don't run -fself-test with -E (PR rtl-optimization/71591) Message-ID: <20160620183802.GI7387@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes Hi! As mentioned in the PR, with -E (C family and Fortran FEs, others don't preprocess) ask the middle-end not to initialize the backends, so running e.g. RTL tests leads to ICEs, e.g. pc_rtx and many other things just aren't initialized. 2016-06-20 Jakub Jelinek PR rtl-optimization/71591 * toplev.c (toplev::run_self_tests): If no_backend, complain and don't run any tests. * gcc.dg/cpp/pr71591.c: New test. Jakub --- gcc/toplev.c.jj 2016-06-13 20:45:11.000000000 +0200 +++ gcc/toplev.c 2016-06-20 14:54:07.931667136 +0200 @@ -2047,6 +2047,11 @@ toplev::start_timevars () void toplev::run_self_tests () { + if (no_backend) + { + error_at (UNKNOWN_LOCATION, "self-tests incompatible with -E"); + return; + } #if CHECKING_P /* Reset some state. */ input_location = UNKNOWN_LOCATION; --- gcc/testsuite/gcc.dg/cpp/pr71591.c.jj 2016-06-20 14:57:19.713187492 +0200 +++ gcc/testsuite/gcc.dg/cpp/pr71591.c 2016-06-20 14:58:46.014071662 +0200 @@ -0,0 +1,5 @@ +/* PR rtl-optimization/71591 */ +/* { dg-do preprocess } */ +/* { dg-options "-fself-test" } */ + +/* { dg-message "self-tests incompatible with -E" "" { target *-*-* } 0 } */