digitalmars.D.bugs - [Issue 227] New: Internal Compiler error: array concatenation/append on struct
- d-bugmail puremagic.com (41/60) Jun 26 2006 http://d.puremagic.com/issues/show_bug.cgi?id=227
 - Thomas Kuehne (17/44) Jul 04 2006 -----BEGIN PGP SIGNED MESSAGE-----
 - Russ Lewis (4/64) Jul 05 2006 Thomas, where can we submit changes to dstress? I know of 5 different
 - Thomas Kuehne (15/17) Jul 06 2006 -----BEGIN PGP SIGNED MESSAGE-----
 - d-bugmail puremagic.com (6/6) Sep 25 2006 http://d.puremagic.com/issues/show_bug.cgi?id=227
 - d-bugmail puremagic.com (9/9) Oct 02 2007 http://d.puremagic.com/issues/show_bug.cgi?id=227
 
http://d.puremagic.com/issues/show_bug.cgi?id=227
           Summary: Internal Compiler error: array concatenation/append on
                    struct
           Product: D
           Version: 0.161
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: godaves yahoo.com
icee wrote:
 struct SPoint{
 double x,y;
 SPoint create(double x,double y){
 SPoint p;
 p.x=x;
 p.y=y;
 return p;
 }
 }
 ..
 SPoint[] sps;
 sps~=SPoint.create(2,4);//OK.
 
 sps=sps~SPoint.create(2,4);//Internal error: ..\ztc\type.c 308, dmd v0.161
 
 int[] a;
 a~=2;//OK.
 a=a~2;//OK.
 
Just to help narrow the problem down, this works:
import std.stdio;
struct SPoint
{
  double x,y;
  static SPoint create(double x,double y)
  {
    SPoint p;
    p.x = x;
    p.y = y;
    return p;
  }
}
void main()
{
  SPoint[] sps;
  sps ~= SPoint.create(1,2);
//sps = sps ~ SPoint.create(2,4);  //Internal error: ..\ztc\type.c 308
  SPoint sp = SPoint.create(2,4);  //This works
  sps = sps ~ sp;
  int[] a;
  a ~= 2;
  a = a ~ 2;
  foreach(p; sps)
    writefln(p.x,",",p.y);
}
-- 
 Jun 26 2006
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 d-bugmail puremagic.com schrieb am 2006-06-27:http://d.puremagic.com/issues/show_bug.cgi?id=227Just to help narrow the problem down, this works: import std.stdio; struct SPoint { double x,y; static SPoint create(double x,double y) { SPoint p; p.x = x; p.y = y; return p; } } void main() { SPoint[] sps; sps ~= SPoint.create(1,2); //sps = sps ~ SPoint.create(2,4); //Internal error: ..\ztc\type.c 308 SPoint sp = SPoint.create(2,4); //This works sps = sps ~ sp; int[] a; a ~= 2; a = a ~ 2; foreach(p; sps) writefln(p.x,",",p.y); }Added to DStress as http://dstress.kuehne.cn/run/b/bug_type_308_B.d http://dstress.kuehne.cn/run/b/bug_type_308_C.d http://dstress.kuehne.cn/run/b/bug_type_308_D.d http://dstress.kuehne.cn/run/b/bug_type_308_E.d http://dstress.kuehne.cn/run/b/bug_type_308_F.d http://dstress.kuehne.cn/nocompile/b/bug_type_308_G.d http://dstress.kuehne.cn/nocompile/b/bug_type_308_H.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFEqjaMLK5blCcjpWoRArKlAJ4kOFINnniRG6lb5iNnjkm7Az3A2wCfcB8D Ddjc+XY0QtVEIzwIoBZ/WMY= =NFfA -----END PGP SIGNATURE-----
 Jul 04 2006
Thomas, where can we submit changes to dstress? I know of 5 different broken files. Russ Thomas Kuehne wrote:-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 d-bugmail puremagic.com schrieb am 2006-06-27:http://d.puremagic.com/issues/show_bug.cgi?id=227Just to help narrow the problem down, this works: import std.stdio; struct SPoint { double x,y; static SPoint create(double x,double y) { SPoint p; p.x = x; p.y = y; return p; } } void main() { SPoint[] sps; sps ~= SPoint.create(1,2); //sps = sps ~ SPoint.create(2,4); //Internal error: ..\ztc\type.c 308 SPoint sp = SPoint.create(2,4); //This works sps = sps ~ sp; int[] a; a ~= 2; a = a ~ 2; foreach(p; sps) writefln(p.x,",",p.y); }Added to DStress as http://dstress.kuehne.cn/run/b/bug_type_308_B.d http://dstress.kuehne.cn/run/b/bug_type_308_C.d http://dstress.kuehne.cn/run/b/bug_type_308_D.d http://dstress.kuehne.cn/run/b/bug_type_308_E.d http://dstress.kuehne.cn/run/b/bug_type_308_F.d http://dstress.kuehne.cn/nocompile/b/bug_type_308_G.d http://dstress.kuehne.cn/nocompile/b/bug_type_308_H.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFEqjaMLK5blCcjpWoRArKlAJ4kOFINnniRG6lb5iNnjkm7Az3A2wCfcB8D Ddjc+XY0QtVEIzwIoBZ/WMY= =NFfA -----END PGP SIGNATURE-----
 Jul 05 2006
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Russ Lewis schrieb am 2006-07-05:Thomas, where can we submit changes to dstress? I know of 5 different broken files.If it is a non-trivial issue and the test case is already mentioned in DMD's issuezilla, please post it in that thread. If the DMD/GDC bug the test case should exercise isn't fixed and there isn't yet a issuzilla entry, please file a DMD/GDC bug and post the test case issue there. For all other test case issues, please use Puremagics's issuzilla and select the product DStress. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFErNeLLK5blCcjpWoRAt93AJ9eo9nSsm2p1fEaqe+WJZ2T+wLDEwCdEfsd GVWZUkRJYMpoVAs9YzjIgCE= =px7T -----END PGP SIGNATURE-----
 Jul 06 2006
http://d.puremagic.com/issues/show_bug.cgi?id=227 this seems not representable on dmd 0.167, but the official changelog does not mention it, should this be marked as RESOLVED? --
 Sep 25 2006
http://d.puremagic.com/issues/show_bug.cgi?id=227
bugzilla digitalmars.com changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME
Not reproducible with DMD 1.021 and 2.004.
-- 
 Oct 02 2007








 
 
 
 Thomas Kuehne <thomas-dloop.nozilla kuehne.cn> 