<html>
    <head>
      <base href="http://bugzilla.gdcproject.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - ICE: internal compiler error: in make_ssa_name_fn, at tree-ssanames.c:151"
   href="http://bugzilla.gdcproject.org/show_bug.cgi?id=218">218</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ICE: internal compiler error: in make_ssa_name_fn, at tree-ssanames.c:151
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>GDC
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>development
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MinGW
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>major
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>gdc
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>ibuclaw@gdcproject.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sebastien.alaiwan@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The following code crashes the optimizer:

struct S2
{
  this(int* pdata_)
  {
    pdata = pdata_;
  }

  void opIndexAssign(int, size_t) { }
  int* pdata;
};

struct S1
{
  S2 getS2()
  {
    return S2(data.ptr);
  }

  int[] data;
  int[] tab2;
};

S1 f()
{
  S1 r;

  for(int i = 0; i < 1; ++i)
    r.getS2()[0] = 0;

  return r;
}

S1 var;

static this()
{
  var = f();
}

To reproduce:

$ i686-vendor-mingw32-gdc -c -O3 crash_ssa/yo.d
crash_ssa/yo.d: In function '_staticCtor1':
crash_ssa/yo.d:37:1: internal compiler error: in make_ssa_name_fn, at
tree-ssanames.c:151
 static this()
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <<a href="http://gcc.gnu.org/bugs.html">http://gcc.gnu.org/bugs.html</a>> for instructions.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>