[xsd-users] ICE

Boris Kolpackov boris at codesynthesis.com
Thu Jun 22 11:13:57 EDT 2006


Hi Andrew,

Andrew Ward <andy.ward at hevday.com> writes:

> I have come across a VC 7.1 internal compiler error while making a call
> into some XSD generated code. Although I am sure the XSD code is fine, I
> thought I would bring it to your attention in case you want to generate
> code that avoids the situation.

Yes, definitely. Thanks for letting me know!


> template <class Base>
> struct A : public Base::MngCursor {
>  typedef typename Base::MngCursor Inherited;
> };
>
> template <class Base>
> struct B : public Base::MngCursor {
>  typedef  typename Base::MngCursor Inherited;
> };
>
> template <class Base>
> struct C {
>  typedef B <Base> MngCursor;
>  friend struct B <Base>;
> };
>
> class D {};
>
> struct E {
>  typedef D MngCursor;
> };
>
> A<C<E> > k;

Hm, I can't think of any places where we have such a convoluted
structure.


> I am getting the ICE when making a call like this:
> int s;
> s = x.A().get().B().get();
>
> x is a const reference to a generated type
> A is an optional<>
> B is an optional<> with a base type of int

I tried to reproduce this problem using the following test case:

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <xsd:complexType name="A">
    <xsd:sequence>
      <xsd:element name="i" type="xsd:int" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="C">
    <xsd:sequence>
      <xsd:element name="a" type="A" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:element name="root" type="C"/>

</xsd:schema>


#include "test.hxx"

void
f (C const& x)
{
  int i;
  i = x.a ().get ().i ().get ();
}

It does not result in the ICE you observe (xsd-2.1.1, cl.exe 13.10.3077).
Would it be possible for you to provide a small test case that reproduces
the problem?

thanks,
-boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20060622/1422a6f1/attachment.pgp


More information about the xsd-users mailing list