From patchwork Mon Dec 12 13:50:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Toma Tabacu X-Patchwork-Id: 705043 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 3tckkp3Dwfz9t2b for ; Tue, 13 Dec 2016 00:50:57 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="ON06hsGX"; 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:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:content-transfer-encoding:mime-version; q=dns; s= default; b=nlZJqgUBepjJ4+nkyjNBxeWyur7LBCTNC9EzDUwqrdu/OElMNY9Qp R6tpjdnKjrgjKbGXWD/GDbVCXBB0RyMWcISZFcPEWfiyPfufBKqPSnrTIvlvjrnv y0HquxxMeHynfTIPOs3SEGDIYj64qN4QPC5dK7S2W1BpWPmJXWnq34= 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:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:content-transfer-encoding:mime-version; s=default; bh=83dcB+S/RgLc5Fb+hNjkWDiJPp8=; b=ON06hsGXbapIohjBqoKCajOI5wES 8KnFb/CShCo9JDGX0sCgaJBPxca4ZwvC8wtE5/IZ1oXw+GSz9lhCiaOmP96VMMR4 Vrq9sAzceqPPrujsgt7nQuDEqzCjizYhx3O0E6EuyJd96VB1BgBNu3XwMa3o+N5V hI0A6byOKUF1N6M= Received: (qmail 88669 invoked by alias); 12 Dec 2016 13:50:42 -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 88450 invoked by uid 89); 12 Dec 2016 13:50:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=shame, msah X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Dec 2016 13:50:38 +0000 Received: from hhmail02.hh.imgtec.org (unknown [10.100.10.20]) by Forcepoint Email with ESMTPS id 2B330AC42C396; Mon, 12 Dec 2016 13:50:32 +0000 (GMT) Received: from HHMAIL01.hh.imgtec.org ([fe80::710b:f219:72bc:e0b3]) by hhmail02.hh.imgtec.org ([fe80::5400:d33e:81a4:f775%25]) with mapi id 14.03.0294.000; Mon, 12 Dec 2016 13:50:35 +0000 From: Toma Tabacu To: Matthew Fortune , "gcc-patches@gcc.gnu.org" CC: "catherine_moore@mentor.com" Subject: RE: [PATCH, testsuite] MIPS: Skip msa-builtins-err.c if there is no assembly output. Date: Mon, 12 Dec 2016 13:50:34 +0000 Message-ID: References: <6D39441BF12EF246A7ABCE6654B0235380AF227B@HHMAIL01.hh.imgtec.org> In-Reply-To: <6D39441BF12EF246A7ABCE6654B0235380AF227B@HHMAIL01.hh.imgtec.org> MIME-Version: 1.0 X-IsSubscribed: yes > > It's a shame this is the only way to deal with this but I see aarch64 have > to resort to the same thing for error checking tests. > I have looked into this some more and I 've found that the solution I proposed is incomplete. The problem is that if no linker plugin is found, -fno-fat-lto-objects is not passed on, so the test isn't skipped and it will fail because -flto doesn't do assembly generation by default and the errors will not be triggered. This can be fixed by adding -ffat-lto-objects as a test option for error tests, as shown in the patch below. The thing is, this already happens for scan-assembler & friends behind-the-scenes, but not for dg-error, because the former are run through force_conventional_output, while the latter is not. A nicer solution would be to have a new directive which would do nothing except for the force_conventional_output part, thus forcing assembly generation, but this may be overkill. Regards, Toma gcc/testsuite/ChangeLog: * gcc.target/mips/msa-builtins-err.c (dg-options): Use -ffat-lto-objects to guarantee assembly generation. diff --git a/gcc/testsuite/gcc.target/mips/msa-builtins-err.c b/gcc/testsuite/gcc.target/mips/msa-builtins-err.c index 041b7f5..68244d6 100644 --- a/gcc/testsuite/gcc.target/mips/msa-builtins-err.c +++ b/gcc/testsuite/gcc.target/mips/msa-builtins-err.c @@ -1,6 +1,8 @@ /* Test builtins for MIPS MSA ASE instructions */ /* { dg-do compile } */ -/* { dg-options "-mfp64 -mhard-float -mmsa" } */ +/* { dg-options "-mfp64 -mhard-float -mmsa -ffat-lto-objects" } */ +/* Because this test only uses dg-error, we need to guarantee assembly + generation ourselves by using -ffat-lto-objects. */ #include