public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106829] New: OpenMP offload internal compiler error: in gimplify_expr, at gimplify.cc:16222
@ 2022-09-05 5:03 xw111luoye at gmail dot com
2022-09-05 10:14 ` [Bug c++/106829] " jakub at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: xw111luoye at gmail dot com @ 2022-09-05 5:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106829
Bug ID: 106829
Summary: OpenMP offload internal compiler error: in
gimplify_expr, at gimplify.cc:16222
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: xw111luoye at gmail dot com
Target Milestone: ---
Created attachment 53537
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53537&action=edit
reproducer source code
A minimal source code MultiDiracDeterminant.one.cpp is attached.
$ g++ -march=native -fopenmp -foffload=nvptx-none -foffload-options="-lm
-latomic" -O3 -DNDEBUG -std=c++17 MultiDiracDeterminant.one.cpp -c
/home/yeluo/opt/qmcpack/src/QMCWaveFunctions/Fermion/MultiDiracDeterminant.2.cpp:
In static member function ‘static void
qmcplusplus::MultiDiracDeterminant::mw_evaluateDetsForPtclMove(const
qmcplusplus::RefVectorWithLeader<qmcplusplus::MultiDiracDeterminant>&, const
qmcplusplus::RefVectorWithLeader<qmcplusplus::ParticleSet>&, int)’:
/home/yeluo/opt/qmcpack/src/QMCWaveFunctions/Fermion/MultiDiracDeterminant.2.cpp:125:9:
internal compiler error: in gimplify_expr, at gimplify.cc:16222
125 | PRAGMA_OFFLOAD("omp target teams distribute map(always,
from:curRatio_list_ptr[:nw]) \
| ^~~
0x868378 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc/gcc/gimplify.cc:16222
0x102b4d9 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc/gcc/gimplify.cc:15514
0x102d6fc gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc/gcc/gimplify.cc:15330
0x1042ea4 gimplify_scan_omp_clauses
../../gcc/gcc/gimplify.cc:10293
0x1051438 gimplify_omp_workshare
../../gcc/gcc/gimplify.cc:14244
0x102aa32 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc/gcc/gimplify.cc:15751
0x102ee1a gimplify_stmt(tree_node**, gimple**)
../../gcc/gcc/gimplify.cc:7156
0x102beab gimplify_statement_list
../../gcc/gcc/gimplify.cc:2025
0x102beab gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc/gcc/gimplify.cc:15654
0x102ee1a gimplify_stmt(tree_node**, gimple**)
../../gcc/gcc/gimplify.cc:7156
0x102f640 gimplify_bind_expr
../../gcc/gcc/gimplify.cc:1434
0x102bdce gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc/gcc/gimplify.cc:15410
0x102ee1a gimplify_stmt(tree_node**, gimple**)
../../gcc/gcc/gimplify.cc:7156
0x102beab gimplify_statement_list
../../gcc/gcc/gimplify.cc:2025
0x102beab gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc/gcc/gimplify.cc:15654
0x102ee1a gimplify_stmt(tree_node**, gimple**)
../../gcc/gcc/gimplify.cc:7156
0x102b266 gimplify_and_add(tree_node*, gimple**)
../../gcc/gcc/gimplify.cc:496
0x102b266 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc/gcc/gimplify.cc:15561
0x102ee1a gimplify_stmt(tree_node**, gimple**)
../../gcc/gcc/gimplify.cc:7156
0x102beab gimplify_statement_list
../../gcc/gcc/gimplify.cc:2025
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/106829] OpenMP offload internal compiler error: in gimplify_expr, at gimplify.cc:16222
2022-09-05 5:03 [Bug c++/106829] New: OpenMP offload internal compiler error: in gimplify_expr, at gimplify.cc:16222 xw111luoye at gmail dot com
@ 2022-09-05 10:14 ` jakub at gcc dot gnu.org
2022-09-05 10:51 ` [Bug c++/106829] [12/13 Regression] OpenMP offload internal compiler error: in gimplify_expr, at gimplify.cc:16222 since r12-5835 jakub at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-09-05 10:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106829
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reducing and bisecting now.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/106829] [12/13 Regression] OpenMP offload internal compiler error: in gimplify_expr, at gimplify.cc:16222 since r12-5835
2022-09-05 5:03 [Bug c++/106829] New: OpenMP offload internal compiler error: in gimplify_expr, at gimplify.cc:16222 xw111luoye at gmail dot com
2022-09-05 10:14 ` [Bug c++/106829] " jakub at gcc dot gnu.org
@ 2022-09-05 10:51 ` jakub at gcc dot gnu.org
2022-09-06 13:29 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-09-05 10:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106829
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|OpenMP offload internal |[12/13 Regression] OpenMP
|compiler error: in |offload internal compiler
|gimplify_expr, at |error: in gimplify_expr, at
|gimplify.cc:16222 |gimplify.cc:16222 since
| |r12-5835
Ever confirmed|0 |1
CC| |cltang at gcc dot gnu.org
Target Milestone|--- |12.3
Status|UNCONFIRMED |NEW
Priority|P3 |P2
Last reconfirmed| |2022-09-05
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r12-5835-g0ab29cf0bb68960c1f87
Reduced testcase:
template <typename> class complex;
template <> struct complex<double> { complex(double); _Complex double d; };
struct S { void static foo (); };
void S::foo ()
{
#pragma omp target
complex<double> c = 0.0;
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/106829] [12/13 Regression] OpenMP offload internal compiler error: in gimplify_expr, at gimplify.cc:16222 since r12-5835
2022-09-05 5:03 [Bug c++/106829] New: OpenMP offload internal compiler error: in gimplify_expr, at gimplify.cc:16222 xw111luoye at gmail dot com
2022-09-05 10:14 ` [Bug c++/106829] " jakub at gcc dot gnu.org
2022-09-05 10:51 ` [Bug c++/106829] [12/13 Regression] OpenMP offload internal compiler error: in gimplify_expr, at gimplify.cc:16222 since r12-5835 jakub at gcc dot gnu.org
@ 2022-09-06 13:29 ` jakub at gcc dot gnu.org
2022-09-07 6:57 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-09-06 13:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106829
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 53544
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53544&action=edit
gcc13-pr106829.patch
Untested fix.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/106829] [12/13 Regression] OpenMP offload internal compiler error: in gimplify_expr, at gimplify.cc:16222 since r12-5835
2022-09-05 5:03 [Bug c++/106829] New: OpenMP offload internal compiler error: in gimplify_expr, at gimplify.cc:16222 xw111luoye at gmail dot com
` (2 preceding siblings ...)
2022-09-06 13:29 ` jakub at gcc dot gnu.org
@ 2022-09-07 6:57 ` cvs-commit at gcc dot gnu.org
2022-09-07 19:18 ` xw111luoye at gmail dot com
2022-11-03 0:22 ` cvs-commit at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-09-07 6:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106829
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:e90af965e5c858ba02c0cdfbac35d0a19da1c2f6
commit r13-2509-ge90af965e5c858ba02c0cdfbac35d0a19da1c2f6
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Sep 7 08:54:13 2022 +0200
openmp: Fix handling of target constructs in static member functions
[PR106829]
Just calling current_nonlambda_class_type in static member functions
returns
non-NULL, but something that isn't *this and if unlucky can match part of
the
IL and can be added to target clauses.
if (DECL_NONSTATIC_MEMBER_P (decl)
&& current_class_ptr)
is a guard used elsewhere (in check_accessibility_of_qualified_id).
2022-09-07 Jakub Jelinek <jakub@redhat.com>
PR c++/106829
* semantics.cc (finish_omp_target_clauses): If
current_function_decl
isn't a nonstatic member function, don't set data.current_object to
non-NULL.
* g++.dg/gomp/pr106829.C: New test.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/106829] [12/13 Regression] OpenMP offload internal compiler error: in gimplify_expr, at gimplify.cc:16222 since r12-5835
2022-09-05 5:03 [Bug c++/106829] New: OpenMP offload internal compiler error: in gimplify_expr, at gimplify.cc:16222 xw111luoye at gmail dot com
` (3 preceding siblings ...)
2022-09-07 6:57 ` cvs-commit at gcc dot gnu.org
@ 2022-09-07 19:18 ` xw111luoye at gmail dot com
2022-11-03 0:22 ` cvs-commit at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: xw111luoye at gmail dot com @ 2022-09-07 19:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106829
Ye Luo <xw111luoye at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Ye Luo <xw111luoye at gmail dot com> ---
Now all works well in my tests.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/106829] [12/13 Regression] OpenMP offload internal compiler error: in gimplify_expr, at gimplify.cc:16222 since r12-5835
2022-09-05 5:03 [Bug c++/106829] New: OpenMP offload internal compiler error: in gimplify_expr, at gimplify.cc:16222 xw111luoye at gmail dot com
` (4 preceding siblings ...)
2022-09-07 19:18 ` xw111luoye at gmail dot com
@ 2022-11-03 0:22 ` cvs-commit at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-11-03 0:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106829
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:f755e367117ca43c96235ef47d4915c3746a3483
commit r12-8883-gf755e367117ca43c96235ef47d4915c3746a3483
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Sep 7 08:54:13 2022 +0200
openmp: Fix handling of target constructs in static member functions
[PR106829]
Just calling current_nonlambda_class_type in static member functions
returns
non-NULL, but something that isn't *this and if unlucky can match part of
the
IL and can be added to target clauses.
if (DECL_NONSTATIC_MEMBER_P (decl)
&& current_class_ptr)
is a guard used elsewhere (in check_accessibility_of_qualified_id).
2022-09-07 Jakub Jelinek <jakub@redhat.com>
PR c++/106829
* semantics.cc (finish_omp_target_clauses): If
current_function_decl
isn't a nonstatic member function, don't set data.current_object to
non-NULL.
* g++.dg/gomp/pr106829.C: New test.
(cherry picked from commit e90af965e5c858ba02c0cdfbac35d0a19da1c2f6)
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-11-03 0:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-05 5:03 [Bug c++/106829] New: OpenMP offload internal compiler error: in gimplify_expr, at gimplify.cc:16222 xw111luoye at gmail dot com
2022-09-05 10:14 ` [Bug c++/106829] " jakub at gcc dot gnu.org
2022-09-05 10:51 ` [Bug c++/106829] [12/13 Regression] OpenMP offload internal compiler error: in gimplify_expr, at gimplify.cc:16222 since r12-5835 jakub at gcc dot gnu.org
2022-09-06 13:29 ` jakub at gcc dot gnu.org
2022-09-07 6:57 ` cvs-commit at gcc dot gnu.org
2022-09-07 19:18 ` xw111luoye at gmail dot com
2022-11-03 0:22 ` cvs-commit 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).