This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++, OpenMP] Crash when OpenMP target's array section handling is used with templates
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Thomas Schwinge <thomas at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 10 Sep 2014 12:23:04 +0200
- Subject: Re: [C++, OpenMP] Crash when OpenMP target's array section handling is used with templates
- Authentication-results: sourceware.org; auth=none
- References: <87zje7rdho dot fsf at schwinge dot name>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Sep 10, 2014 at 12:12:03PM +0200, Thomas Schwinge wrote:
> Are the following issues known?
No, please file a PR. Supposedly either we should call cp_omp_mappable_type
only for non-type-dependent expressions, or not at all if
processing_template_decl and only do that once finish_omp_clauses is called
with !processing_template_decl.
>
> template <typename T>
> void f(T A, T B)
> {
> extern int *v;
> T a = 2;
> T b = 4;
>
> #pragma omp target map(to: v[a:b])
> v[a] = 0;
>
> #pragma omp target map(to: v[A:B])
> v[a] = 0;
> }
>
> void g()
> {
> f(1, 5);
> }
Jakub