From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23738 invoked by alias); 21 Jul 2011 21:56:37 -0000 Received: (qmail 23727 invoked by uid 22791); 21 Jul 2011 21:56:36 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_ZJ,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-yx0-f175.google.com (HELO mail-yx0-f175.google.com) (209.85.213.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 21 Jul 2011 21:56:20 +0000 Received: by yxi19 with SMTP id 19so986250yxi.20 for ; Thu, 21 Jul 2011 14:56:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.117.1 with SMTP id p1mr412255wfc.420.1311285379633; Thu, 21 Jul 2011 14:56:19 -0700 (PDT) Received: by 10.142.89.19 with HTTP; Thu, 21 Jul 2011 14:56:19 -0700 (PDT) Date: Thu, 21 Jul 2011 22:23:00 -0000 Message-ID: Subject: [PATCH, testsuite]: Fix detection of ifunc support From: Uros Bizjak To: gcc-patches@gcc.gnu.org Cc: Nathan Sidwell Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg01889.txt.bz2 Hello! Revision 164725 [1] broke detection of ifunc support in the testsuite [2] due to extra "#endif" without if in the test function. Attached patch fixes this up. 2011-07-21 Uros Bizjak * lib/target-supports.exp (check_ifunc_available): Fix test function. The patch is tested on x86_64-pc-linux-gnu, but my toolchain does not support ifunc attribute. Can somebody please test it with ifunc support? OTOH, the patch is kind of obvious, so OK for mainline? [1] http://gcc.gnu.org/viewcvs?view=revision&revision=164725 [2] http://gcc.gnu.org/viewcvs/trunk/gcc/testsuite/lib/target-supports.exp?r1=164725&r2=164724&pathrev=164725 Uros. Index: lib/target-supports.exp =================================================================== --- lib/target-supports.exp (revision 176584) +++ lib/target-supports.exp (working copy) @@ -381,10 +381,8 @@ set obj ifunc[pid].o verbose "check_ifunc_available compiling testfile $src" 2 set f [open $src "w"] - puts $f "#endif" puts $f "#ifdef __cplusplus\nextern \"C\"\n#endif" - puts $f "void g() {}" - puts $f "void f() __attribute__((ifunc(\"g\")));" + puts $f "void g() {} f() __attribute__((ifunc(\"g\")));" close $f set lines [${tool}_target_compile $src $obj object ""] file delete $src