This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++, OpenMP] Crash when OpenMP target's array section handling is used with templates


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]