backport: re PR c++/80984 (ICE with label/variable ambiguity)
Backported from mainline 2017-06-13 Jakub Jelinek <jakub@redhat.com> PR c++/80984 * cp-gimplify.c (cp_genericize): Only look for VAR_DECLs in BLOCK_VARS (outer) chain. (cxx_omp_const_qual_no_mutable): Likewise. * g++.dg/opt/nrv18.C: New test. From-SVN: r249478
This commit is contained in:
parent
dedf5c8523
commit
6bf3d75c40
|
@ -1,3 +1,13 @@
|
|||
2017-06-21 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
Backported from mainline
|
||||
2017-06-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/80984
|
||||
* cp-gimplify.c (cp_genericize): Only look for VAR_DECLs in
|
||||
BLOCK_VARS (outer) chain.
|
||||
(cxx_omp_const_qual_no_mutable): Likewise.
|
||||
|
||||
2017-06-20 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/80972 - C++17 ICE with attribute packed.
|
||||
|
|
|
@ -1622,7 +1622,8 @@ cp_genericize (tree fndecl)
|
|||
|
||||
if (outer)
|
||||
for (var = BLOCK_VARS (outer); var; var = DECL_CHAIN (var))
|
||||
if (DECL_NAME (t) == DECL_NAME (var)
|
||||
if (VAR_P (var)
|
||||
&& DECL_NAME (t) == DECL_NAME (var)
|
||||
&& DECL_HAS_VALUE_EXPR_P (var)
|
||||
&& DECL_VALUE_EXPR (var) == t)
|
||||
{
|
||||
|
@ -1869,7 +1870,8 @@ cxx_omp_const_qual_no_mutable (tree decl)
|
|||
|
||||
if (outer)
|
||||
for (var = BLOCK_VARS (outer); var; var = DECL_CHAIN (var))
|
||||
if (DECL_NAME (decl) == DECL_NAME (var)
|
||||
if (VAR_P (var)
|
||||
&& DECL_NAME (decl) == DECL_NAME (var)
|
||||
&& (TYPE_MAIN_VARIANT (type)
|
||||
== TYPE_MAIN_VARIANT (TREE_TYPE (var))))
|
||||
{
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
2017-06-21 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
Backported from mainline
|
||||
2017-06-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/80984
|
||||
* g++.dg/opt/nrv18.C: New test.
|
||||
|
||||
2017-06-19 James Greenhalgh <james.greenhalgh@arm.com>
|
||||
|
||||
Backport from mainline
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
// PR c++/80984
|
||||
// { dg-do compile }
|
||||
|
||||
struct A { ~A (); };
|
||||
|
||||
A
|
||||
foo ()
|
||||
{
|
||||
A a;
|
||||
a:
|
||||
return a;
|
||||
}
|
Loading…
Reference in New Issue