mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
re PR c++/88988 (ICE: Segmentation fault (in lookup_name_real_1))
PR c++/88988 * lambda.c (is_capture_proxy): Don't return true for DECL_OMP_PRIVATIZED_MEMBER artificial vars. * testsuite/libgomp.c++/pr88988.C: New test. From-SVN: r268407
This commit is contained in:
committed by
Jakub Jelinek
parent
9c5365902a
commit
8b44f8ec4b
@@ -1,3 +1,9 @@
|
||||
2019-01-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/88988
|
||||
* lambda.c (is_capture_proxy): Don't return true for
|
||||
DECL_OMP_PRIVATIZED_MEMBER artificial vars.
|
||||
|
||||
2019-01-30 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/89119 - ICE with value-initialization in template.
|
||||
|
||||
@@ -263,6 +263,9 @@ is_capture_proxy (tree decl)
|
||||
&& !DECL_ANON_UNION_VAR_P (decl)
|
||||
&& !DECL_DECOMPOSITION_P (decl)
|
||||
&& !DECL_FNAME_P (decl)
|
||||
&& !(DECL_ARTIFICIAL (decl)
|
||||
&& DECL_LANG_SPECIFIC (decl)
|
||||
&& DECL_OMP_PRIVATIZED_MEMBER (decl))
|
||||
&& LAMBDA_FUNCTION_P (DECL_CONTEXT (decl)));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2019-01-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/88988
|
||||
* testsuite/libgomp.c++/pr88988.C: New test.
|
||||
|
||||
2019-01-28 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/89002
|
||||
|
||||
28
libgomp/testsuite/libgomp.c++/pr88988.C
Normal file
28
libgomp/testsuite/libgomp.c++/pr88988.C
Normal file
@@ -0,0 +1,28 @@
|
||||
// PR c++/88988
|
||||
// { dg-do compile }
|
||||
// { dg-additional-options "-std=c++14" }
|
||||
|
||||
extern "C" void abort ();
|
||||
|
||||
template <typename T>
|
||||
struct A {
|
||||
A () : a(), b()
|
||||
{
|
||||
[&] ()
|
||||
{
|
||||
#pragma omp task firstprivate (a) shared (b)
|
||||
b = ++a;
|
||||
#pragma omp taskwait
|
||||
} ();
|
||||
}
|
||||
|
||||
T a, b;
|
||||
};
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
A<int> x;
|
||||
if (x.a != 0 || x.b != 1)
|
||||
abort ();
|
||||
}
|
||||
Reference in New Issue
Block a user