--- Comment #3 from Kenji Hara <> 2012-01-06 01:34:59 PST ---
In the expression e1.tupleof, if e1 has some side effect, this problem occurs.

The explanation of bug mechanism:

1. e1.tupleof is translated to e1.field0, e1.field1, ..., e1.fieldN
(e1.tupleof.length == N).
But if e1 has some side effect (e.g. e1 is function call), e1 is simply

  funcall().tupleof -> (funcall().field0, funcall, field1, ..., funcall.fieldN)

2. Postblit call on function argument creates hidden temporary variable.

  toRandomAccessTuple(args, hasPostblit)
  toRandomAccessTuple(args, (auto __cpcttmp = hasPostblit, __cpcttmp))

The combination of #1 and #2 causes duplication of hidden variable like

  toRandomAccessTuple(args, hasPostblit).tupleof
  (toRandomAccessTuple(args, (auto __cpcttmp = hasPostblit, __cpcttmp)).a,
   toRandomAccessTuple(args, (auto __cpcttmp = hasPostblit, __cpcttmp)).b,
   toRandomAccessTuple(args, (auto __cpcttmp = hasPostblit, __cpcttmp)).c)

Finally the repetation of __cpcttmp cause ICE in backend.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to