On 11/05/2015 04:41 PM, Martin Sebor wrote:
On 11/05/2015 11:13 AM, Jason Merrill wrote:
OK, thanks.

I'm afraid the last patch that I just committed breaks libstdc++
bootstrap with the following error:

I committed a slightly more robust fix that avoids assuming that
either the size of the object or its type is known.  Those were
both bugs in the patch.

What seems unexpected to me that given the following declarations,
DECL_SIZE_UNIT(s) is null but TYPE_SIZE_UNIT (TREE_TYPE (s)) is
not.  The code is derived from the libstdc++ translation unit that
caused the ICE.  Is it because GCC conservatively assumes that
S<char> could be explicitly specialized in another translation
unit?  If so, then I would expect TYPE_SIZE_UNIT (TREE_TYPE (s))
to also be null.  What am I missing?

  template <class> struct S { int i; };

  extern struct S<char> s;

Martin

Reply via email to