public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/63248] New: Crash when OpenMP target's array section handling is used with templates
@ 2014-09-12 17:36 tschwinge at gcc dot gnu.org
  2014-09-18 16:44 ` [Bug c++/63248] " jakub at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2014-09-12 17:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63248

            Bug ID: 63248
           Summary: Crash when OpenMP target's array section handling is
                    used with templates
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: openmp
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org

Consider:

    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);
    }

GCC doesn't like that template usage:

    ../../openacc/T.C: In function 'void f(T, T)':
    ../../openacc/T.C:8:35: internal compiler error: Segmentation fault
    0xc1833f crash_signal
        ../../source/gcc/toplev.c:339
    0x697f0d tree_class_check
        ../../source/gcc/tree.h:2851
    0x697f0d cp_omp_mappable_type(tree_node*)
        ../../source/gcc/cp/decl2.c:1393
    0x764777 finish_omp_clauses(tree_node*)
        ../../source/gcc/cp/semantics.c:5671
    0x6d3d39 cp_parser_omp_all_clauses
        ../../source/gcc/cp/parser.c:28680
    0x6c6265 cp_parser_omp_target
        ../../source/gcc/cp/parser.c:30649
    [...]

Discussion in
<http://news.gmane.org/find-root.php?message_id=%3C87zje7rdho.fsf%40schwinge.name%3E>.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-18 17:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-12 17:36 [Bug c++/63248] New: Crash when OpenMP target's array section handling is used with templates tschwinge at gcc dot gnu.org
2014-09-18 16:44 ` [Bug c++/63248] " jakub at gcc dot gnu.org
2014-09-18 16:46 ` jakub at gcc dot gnu.org
2014-09-18 17:00 ` jakub at gcc dot gnu.org

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).