Re: Fix PR c++/79360

2017-02-06 Thread Jason Merrill
OK. On Sun, Feb 5, 2017 at 11:52 PM, Patrick Palka wrote: > This patch fixes PR c++/79360, a regression from PR c++/70347. > > The TYPE_FIELDS of a type may contain TYPE_DECLs and CONST_DECLs as well > as FIELD_DECLs, but when looking for an NSDMI we are only interested in > the FIELD_DECLs. Oth

Fix PR c++/79360

2017-02-05 Thread Patrick Palka
This patch fixes PR c++/79360, a regression from PR c++/70347. The TYPE_FIELDS of a type may contain TYPE_DECLs and CONST_DECLs as well as FIELD_DECLs, but when looking for an NSDMI we are only interested in the FIELD_DECLs. Otherwise we may try to initialize the union with the DECL_INITIAL of a