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
* [Bug c++/63248] Crash when OpenMP target's array section handling is used with templates 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 ` 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 2 siblings, 0 replies; 4+ messages in thread From: jakub at gcc dot gnu.org @ 2014-09-18 16:44 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63248 --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Thu Sep 18 16:43:28 2014 New Revision: 215359 URL: https://gcc.gnu.org/viewcvs?rev=215359&root=gcc&view=rev Log: PR c++/63248 * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type on type of type dependent expressions, and don't call it if handle_omp_array_sections has kept TREE_LIST because something was type dependent. * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>: Use keep_next_level, begin_omp_structured_block and finish_omp_structured_block instead of push_stmt_list and pop_stmt_list. libgomp/ * testsuite/libgomp.c++/pr63248.C: New test. Added: trunk/libgomp/testsuite/libgomp.c++/pr63248.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c trunk/gcc/cp/semantics.c trunk/libgomp/ChangeLog ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/63248] Crash when OpenMP target's array section handling is used with templates 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 2 siblings, 0 replies; 4+ messages in thread From: jakub at gcc dot gnu.org @ 2014-09-18 16:46 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63248 --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Thu Sep 18 16:46:17 2014 New Revision: 215360 URL: https://gcc.gnu.org/viewcvs?rev=215360&root=gcc&view=rev Log: PR c++/63248 * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type on type of type dependent expressions, and don't call it if handle_omp_array_sections has kept TREE_LIST because something was type dependent. * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>: Use keep_next_level, begin_omp_structured_block and finish_omp_structured_block instead of push_stmt_list and pop_stmt_list. libgomp/ * testsuite/libgomp.c++/pr63248.C: New test. Added: branches/gcc-4_9-branch/libgomp/testsuite/libgomp.c++/pr63248.C Modified: branches/gcc-4_9-branch/gcc/cp/ChangeLog branches/gcc-4_9-branch/gcc/cp/pt.c branches/gcc-4_9-branch/gcc/cp/semantics.c branches/gcc-4_9-branch/libgomp/ChangeLog ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/63248] Crash when OpenMP target's array section handling is used with templates 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 2 siblings, 0 replies; 4+ messages in thread From: jakub at gcc dot gnu.org @ 2014-09-18 17:00 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63248 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org Target Milestone|--- |4.9.2 --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Should be fixed now. ^ 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).