From patchwork Thu Feb 8 12:58:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 870870 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-472848-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="p2Kc1zCi"; dkim-atps=neutral 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 3zcdXj21FXz9s7F for ; Thu, 8 Feb 2018 23:58:12 +1100 (AEDT) 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:mime-version:content-type; q=dns; s=default; b=n7q3OXJfe4Ut7HhKfUplkmW18ps8qxsLMHzS9O0eOJZrQbNOjs ngHQK+OQTsUXmrkv5ZQ75yANOJy0ww+jCUorf5lvlSkiLD6+aaU799hirJJ1eLKr nD3EicUiFebudHoMQAmdnTRm0zGKhhcMGFBDXEJciy9nbAvU+OAAaCa4I= 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:mime-version:content-type; s= default; bh=6MOHEOcW9IwUnOb4DJRTi95kmCs=; b=p2Kc1zCijBCQYTv2+/Zo AAR/eN9xGVkNdysZjtayMzZE+BP8+YAkusVfcsQk3hx+lzN3ikRlWN1+g5iDhdsT g9Mk1Kd78GHKUkR6zEDAxO0I8mv+DTW06tSzOV4MvR7DvDVOY4lcfhSF/8DfygtM xoMZPYnlNyFUJcvJdQMeyU4= Received: (qmail 95469 invoked by alias); 8 Feb 2018 12:58:05 -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 95450 invoked by uid 89); 8 Feb 2018 12:58:05 -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=H*UA:https 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; Thu, 08 Feb 2018 12:58:04 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3E1DBAB03 for ; Thu, 8 Feb 2018 12:58:02 +0000 (UTC) From: Martin Jambor To: GCC Patches Cc: Subject: [hsa] Fix PR82416 testcase User-Agent: Notmuch/0.25.1 (https://notmuchmail.org) Emacs/25.3.1 (x86_64-suse-linux-gnu) Date: Thu, 08 Feb 2018 13:58:01 +0100 Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes Hi, the PR82416 was not actually being compiled into HSAIL because the function with target region had noclone attribute, which was the outline function for the region inherited and then the ipa-hsa pass that clones hitherto shared functions (for both the host and an hsa accelerator) refused to clone them. Fixed by rearranging the functions somewhat. The attribute is probably actually not necessary now but let's be future-proof. Martin 2018-02-08 Martin Jambor * testsuite/libgomp.hsa.c/pr82416.c: Make the function with target clonable. --- libgomp/testsuite/libgomp.hsa.c/pr82416.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libgomp/testsuite/libgomp.hsa.c/pr82416.c b/libgomp/testsuite/libgomp.hsa.c/pr82416.c index b89d421e8f3..40378ab12a5 100644 --- a/libgomp/testsuite/libgomp.hsa.c/pr82416.c +++ b/libgomp/testsuite/libgomp.hsa.c/pr82416.c @@ -7,8 +7,8 @@ toup (char X) return X; } -char __attribute__ ((noipa)) -target_toup (char X) +char +target_toup_1 (char X) { char r; #pragma omp target map(to:X) map(from:r) @@ -21,6 +21,12 @@ target_toup (char X) return r; } +char __attribute__ ((noipa)) +target_toup (char X) +{ + return target_toup_1 (X); +} + int main (int argc, char **argv) { char a = 'a';