From patchwork Fri Feb 11 10:27:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 82731 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]) by ozlabs.org (Postfix) with SMTP id 48CD9B7130 for ; Fri, 11 Feb 2011 21:27:31 +1100 (EST) Received: (qmail 26225 invoked by alias); 11 Feb 2011 10:27:29 -0000 Received: (qmail 26217 invoked by uid 22791); 11 Feb 2011 10:27:28 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 Feb 2011 10:27:23 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 9E98E4F6; Fri, 11 Feb 2011 11:27:21 +0100 (CET) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id oR0H7QGvHFVc; Fri, 11 Feb 2011 11:27:19 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id C385C4F5; Fri, 11 Feb 2011 11:27:19 +0100 (CET) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id p1BARJKd004001; Fri, 11 Feb 2011 11:27:19 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Uros Bizjak , Jakub Jelinek Subject: [testsuite] Skip gcc.target/i386/pr47312.c on non-C99 targets (PR target/47629) Date: Fri, 11 Feb 2011 11:27:18 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes 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 As reported in PR target/47629, the new gcc.target/i386/pr47312.c testcase FAILs on i386-pc-solaris2.9: FAIL: gcc.target/i386/pr47312.c (test for excess errors) Excess errors: Undefined first referenced symbol in file fma /var/tmp//cckpBC57.o fmaf /var/tmp//cckpBC57.o fmal /var/tmp//cckpBC57.o ld: fatal: Symbol referencing errors. No output written to pr47312.exe Those symbols are only present in C99, so the testcase should declare this requirement. The following patch does this. Since some targets need -std=c99 to activate the C99 runtime, asm needs to be replaced by __asm__. Tested with the appropriate runtest invocations on i386-pc-solaris2.9 (where the test is skipped as expected) and i386-pc-solaris2.10 (which has a C99 runtime, where the test passes with -std=c99 added to the other options). Ok for mainline? Rainer 2011-02-11 Rainer Orth PR target/47629 * gcc.target/i386/pr47312.c: Use dg-require-effective-target c99_runtime, dg-add-options c99_runtime. (main): Use __asm__. Index: pr47312.c =================================================================== --- pr47312.c (revision 170046) +++ pr47312.c (working copy) @@ -2,7 +2,9 @@ /* { dg-do link } */ /* { dg-require-effective-target lto } */ /* { dg-require-effective-target xop } */ +/* { dg-require-effective-target c99_runtime } */ /* { dg-options "-O -flto -mno-sse3 -mxop" } */ +/* { dg-add-options c99_runtime } */ extern double fma (double, double, double); extern float fmaf (float, float, float); @@ -18,6 +20,6 @@ f = fmaf (f, f, f); d = fma (d, d, d); ld = fmal (ld, ld, ld); - asm volatile ("" : : "r" (&f), "r" (&d), "r" (&ld) : "memory"); + __asm__ volatile ("" : : "r" (&f), "r" (&d), "r" (&ld) : "memory"); return 0; }