From: Andrew Stubbs <ams@codesourcery.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
Thomas Schwinge <thomas@codesourcery.com>
Subject: Re: [patch, openacc] Fix ICE verifying gimple
Date: Thu, 16 Jan 2020 14:44:00 -0000 [thread overview]
Message-ID: <13160d0e-315a-891c-100d-e86de9ad2ead@codesourcery.com> (raw)
In-Reply-To: <d5b866af-3781-abe5-9561-a33ac32f4913@codesourcery.com>
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?
>
next prev parent reply other threads:[~2020-01-16 13:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-22 11:18 Andrew Stubbs
2020-01-16 14:44 ` Andrew Stubbs [this message]
2020-01-29 12:42 ` [PR93488] [OpenACC] ICE in type-cast 'async', 'wait' clauses (was: [patch, openacc] Fix ICE verifying gimple) Thomas Schwinge
2020-01-29 13:32 ` [PR93488] [OpenACC] ICE in type-cast 'async', 'wait' clauses Andrew Stubbs
2020-01-31 0:05 ` Andrew Stubbs
2020-04-21 9:54 ` Thomas Schwinge
2020-04-23 15:02 ` Andrew Stubbs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=13160d0e-315a-891c-100d-e86de9ad2ead@codesourcery.com \
--to=ams@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=thomas@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).