From patchwork Tue Aug 25 16:24:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 510561 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 309E6140081 for ; Wed, 26 Aug 2015 02:25:08 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Gb28s3lD; 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:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=CGMl4xOjklg5ADg3neHMiFkMIenZeKScl6N0in7pXtp6QAuDLF I9uAmfYcNFnKQZwKSkLMlDb1Gg84lT/fyKaqDjUmQ1fNvy0bDrAFNIweo/6QFYyl df4i+0WeVa03wSduLQTdoUpNVbBJASv+GXDpCKOBxNRwGF6sgZtZ2zaGQ= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=gJed6ka5ymsnJ87+Hz+NT3nzA2g=; b=Gb28s3lDFlQwLSuE36ld l7oIZGi6p7uSUVNJscElq7f+Zil56xJ0FuFKOgAsiNpABQqyIf09HbT+2Reu3bZf zfPZ67Fyh3tl5ZWikC56ZV7E1VmWoVynMROHmSTRBPOn4ULI5g0upqNLX3zXmJxh EkOfpSOU6Qw00XpJLEzZdzM= Received: (qmail 111972 invoked by alias); 25 Aug 2015 16:25:02 -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 111952 invoked by uid 89); 25 Aug 2015 16:25:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=BAYES_00, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-qk0-f172.google.com Received: from mail-qk0-f172.google.com (HELO mail-qk0-f172.google.com) (209.85.220.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 25 Aug 2015 16:25:00 +0000 Received: by qkda128 with SMTP id a128so53610270qkd.3 for ; Tue, 25 Aug 2015 09:24:58 -0700 (PDT) X-Received: by 10.55.217.197 with SMTP id q66mr30206229qkl.14.1440519898270; Tue, 25 Aug 2015 09:24:58 -0700 (PDT) Received: from ?IPv6:2601:181:c000:c497:a2a8:cdff:fe3e:b48? ([2601:181:c000:c497:a2a8:cdff:fe3e:b48]) by smtp.googlemail.com with ESMTPSA id 108sm14102161qgz.17.2015.08.25.09.24.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Aug 2015 09:24:57 -0700 (PDT) To: GCC Patches From: Nathan Sidwell Subject: [nvptx] More gcc testsuite markup Message-ID: <55DC96D8.2010604@acm.org> Date: Tue, 25 Aug 2015 12:24:56 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 I've committed this to markup more test requirements. Most are obvious enough. nvptx doesn't expose a normal stack, so stack-based tests fail. It also requires correct typing on function calls, so lying about that results in assembler errors. Finally, it doesn't accept string constants, requiring expansion to an array of ints. nathan 2015-08-25 Nathan Sidwell * gcc.dg/20001117-1.c: Needs return_address. * gcc.dg/20020415-1.c: Needs alloca. * gcc.dg/graphite/id-pr44676.c: Needs profiling. * gcc.dg/graphite/pr60979.c: Needs nonlocal_goto * gcc.dg/pr63186.c: Needs label_values. * gcc.dg/torture/pr33848.c: Likwise. * lib/target-supports.exp (check_effective_target_fopenacc, check_effective_target_fopenmp): Disable for nvptx. * gcc.dg/graphite/run-id-pr47653.c: Disable for nvptx. * gcc.dg/stack-usage-1.c: Likewise. * gcc.dg/stack-usage-2.c: Likewise. * gcc.dg/unused-5.c: Likewise. * gcc.dg/unwind-1.c: Likewise. Index: gcc.dg/20001117-1.c =================================================================== --- gcc.dg/20001117-1.c (revision 227166) +++ gcc.dg/20001117-1.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O2 -finstrument-functions" } */ +/* { dg-require-effective-target return_address } */ extern void abort (void); extern void exit (int); Index: gcc.dg/20020415-1.c =================================================================== --- gcc.dg/20020415-1.c (revision 227166) +++ gcc.dg/20020415-1.c (working copy) @@ -1,9 +1,9 @@ /* PR target/6303 This testcase ICEd because s390 did not define ASM_SIMPLIFY_DWARF_ADDR hook. */ -/* { dg-require-effective-target alloca } */ /* { dg-do compile { target fpic } } */ /* { dg-options "-O2 -fpic -g" } */ +/* { dg-require-effective-target alloca } */ static inline char * bar (unsigned long x, char *y) Index: gcc.dg/graphite/id-pr44676.c =================================================================== --- gcc.dg/graphite/id-pr44676.c (revision 227166) +++ gcc.dg/graphite/id-pr44676.c (working copy) @@ -1,4 +1,5 @@ /* { dg-options "-O2 -fgraphite-identity -fprofile-generate" } */ +/* { dg-require-profiling "-fprofile-generate" } */ int extend_options (int h, int map, int x, int y, int dx) Index: gcc.dg/graphite/pr60979.c =================================================================== --- gcc.dg/graphite/pr60979.c (revision 227166) +++ gcc.dg/graphite/pr60979.c (working copy) @@ -1,4 +1,5 @@ /* { dg-options "-O -fgraphite-identity" } */ +/* { dg-require-effective-target nonlocal_goto } */ #include Index: gcc.dg/graphite/run-id-pr47653.c =================================================================== --- gcc.dg/graphite/run-id-pr47653.c (revision 227166) +++ gcc.dg/graphite/run-id-pr47653.c (working copy) @@ -1,4 +1,6 @@ /* { dg-options "-O -fstack-check=generic -ftree-pre -fgraphite-identity" } */ +/* nvptx doesn't expose a stack. */ +/* { dg-skip-if "" { nvptx-*-* } { "*" } { "" } } */ int main () { Index: gcc.dg/pr63186.c =================================================================== --- gcc.dg/pr63186.c (revision 227166) +++ gcc.dg/pr63186.c (working copy) @@ -1,5 +1,7 @@ /* { dg-do link } */ /* { dg-options "-O2" } */ +/* { dg-require-effective-target label_values } */ + void *a; int b, c, d; Index: gcc.dg/stack-usage-1.c =================================================================== --- gcc.dg/stack-usage-1.c (revision 227166) +++ gcc.dg/stack-usage-1.c (working copy) @@ -1,5 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-fstack-usage" } */ +/* nvptx doesn't have a reg allocator, and hence no stack usage data. */ +/* { dg-skip-if "" { nvptx-*-* } { "*" } { "" } } */ /* This is aimed at testing basic support for -fstack-usage in the back-ends. See the SPARC back-end for example (grep flag_stack_usage_info in sparc.c). Index: gcc.dg/stack-usage-2.c =================================================================== --- gcc.dg/stack-usage-2.c (revision 227166) +++ gcc.dg/stack-usage-2.c (working copy) @@ -1,5 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-Wstack-usage=512" } */ +/* nvptx gets very upset with mismatched function types. */ +/* { dg-skip-if "" { nvptx-*-* } { "*" } { "" } } */ int foo1 (void) /* { dg-bogus "stack usage" } */ { Index: gcc.dg/torture/pr33848.c =================================================================== --- gcc.dg/torture/pr33848.c (revision 227166) +++ gcc.dg/torture/pr33848.c (working copy) @@ -1,4 +1,3 @@ -/* { dg-require-effective-target label_values } */ /* &&foo should be hoisted, but on most targets, excess register pressure forces it to be rematerialized before "data != &&foo". On targets that have a "branch if registers are equal" instruction, this leads to the @@ -7,6 +6,7 @@ say that &&foo was the target of the branch, and the real target would then be removed as dead. */ /* { dg-do link } */ +/* { dg-require-effective-target label_values } */ #define NVARS 30 #define MULTI(X) \ X( 0), X( 1), X( 2), X( 3), X( 4), X( 5), X( 6), X( 7), X( 8), X( 9), \ Index: gcc.dg/unused-5.c =================================================================== --- gcc.dg/unused-5.c (revision 227166) +++ gcc.dg/unused-5.c (working copy) @@ -1,6 +1,8 @@ /* { dg-do compile } */ /* { dg-options "-Wunused" } */ /* { dg-final { scan-assembler "string_to_look_for" } } */ +/* nvptx outputs strings as array of ints. */ +/* { dg-skip-if "" { nvptx-*-* } { "*" } { "" } } */ /* 'volatile' variables get output and don't produce a warning about being unused. */ Index: gcc.dg/unwind-1.c =================================================================== --- gcc.dg/unwind-1.c (revision 227166) +++ gcc.dg/unwind-1.c (working copy) @@ -1,4 +1,4 @@ -/* { dg-do assemble { target { ! { powerpc-ibm-aix* } } } } */ +/* { dg-do assemble { target { ! { powerpc-ibm-aix* nvptx-*-* } } } } */ /* { dg-options "-fleading-underscore -funwind-tables" } */ void func(void) __asm("_func"); Index: lib/target-supports.exp =================================================================== --- lib/target-supports.exp (revision 227166) +++ lib/target-supports.exp (working copy) @@ -819,6 +819,10 @@ proc check_effective_target_fgraphite {} # code, 0 otherwise. proc check_effective_target_fopenacc {} { + # nvptx can be built with the device-side bits of openacc, but it + # does not make sense to test it as an openacc host. + if [istarget nvptx-*-*] { return 0 } + return [check_no_compiler_messages fopenacc object { void foo (void) { } } "-fopenacc"] @@ -828,6 +832,10 @@ proc check_effective_target_fopenacc {} # code, 0 otherwise. proc check_effective_target_fopenmp {} { + # nvptx can be built with the device-side bits of libgomp, but it + # does not make sense to test it as an openmp host. + if [istarget nvptx-*-*] { return 0 } + return [check_no_compiler_messages fopenmp object { void foo (void) { } } "-fopenmp"]