From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46630 invoked by alias); 16 Jan 2020 13:47:21 -0000 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 Received: (qmail 46622 invoked by uid 89); 16 Jan 2020 13:47:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 spammy=HTo:U*thomas, HContent-Transfer-Encoding:8bit X-HELO: esa2.mentor.iphmx.com Received: from esa2.mentor.iphmx.com (HELO esa2.mentor.iphmx.com) (68.232.141.98) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 16 Jan 2020 13:47:11 +0000 IronPort-SDR: P8VznB826hvv/Ad8J3XEhl2TVRJm6fv2BmzxaTUbeSp7Z48qFAyc4nmen6ST+HAeTYz99uUMhd Quczi4sURsvgpSxut60BURIsj8zdfFBN62frIR1XOSlKwt3s3cqxhVUCw8qXL8VKq0NRO9ixUU Ytf9PwAmQ5yryJt7zOTFbdNtGpiBXpqed1f5Fuhl9lIC8LnVpXuvj8AJtWuGvUjdEZxRwvu+lC 6p80nQdi3/60rz3xOhozCs+GKrY8OoY2i8eEbCO2el1UCYJFzLvdCvP6h8A/m+4XBV/MJ5qVWg KB0= Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 16 Jan 2020 05:47:09 -0800 IronPort-SDR: 2erY3Oyt+gKMslFE/W+6karNXONB7Bej89VAJohdwI1QaleP4jmUgus2GJ29ZuxDVaS9c0eBwD AMnIRnXA/wbHbI366OuSsXzWZvqO21T1sSxOfNBwBb+QCF9/dRzVf64vUG1V5huoFWw3B4Nu7s 0X3HGvsHbr8SEEePeF9aYM6adu99lUw4FerZsxjI+VCgbKrtEi9tRN+XXOto6rjKbd9ClD6pEY 3UpP1G34zVtG+83DBu115NWjZq5uNIIzsHswmqTxRdrqJ9Y1Tub6MAJyqbtS0Pf39Bv7C1BXdY ywQ= Subject: Re: [patch, openacc] Fix ICE verifying gimple References: To: "gcc-patches@gcc.gnu.org" , Thomas Schwinge From: Andrew Stubbs Message-ID: <13160d0e-315a-891c-100d-e86de9ad2ead@codesourcery.com> Date: Thu, 16 Jan 2020 14:44:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Return-Path: ams@codesourcery.com X-SW-Source: 2020-01/txt/msg00959.txt.bz2 Ping. On 22/11/2019 11:06, Andrew Stubbs wrote: > This test case causes an ICE (reformatted for email): > >   void test(int k) >   { >     unsigned int x = 1; >   #pragma acc parallel loop async(x) >     for (int i = 0; i < k; i++) { } >   } > >   t.c: In function 'test': >   t.c:4:9: error: invalid argument to gimple call >       4 | #pragma acc parallel loop async(x) >         |         ^~~ >   (int) x >   __builtin_GOACC_parallel_keyed (-1, test._omp_fn.0, 1, >                                   &.omp_data_arr.3, &.omp_data_sizes.4, >                                   &.omp_data_kinds.5, 536936447, >                                  (int) x, 0); >   during GIMPLE pass: ompexp >   dump file: t.c.013t.ompexp >   t.c:4:9: internal compiler error: verify_gimple failed > > The problem is that "x" needs to be cast to "int" (from "unsigned int") > before calling the function, and that's not valid in a gimple call. > > The attached patch assigns the "(int) x" to a temporary and passes that > to the function instead. > > OK to commit? >