[Issue 4275] New: Unexpected optlink termination when 'export' attribute is missing

2010-06-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4275

   Summary: Unexpected optlink termination when 'export' attribute
is missing
   Product: D
   Version: unspecified
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: Optlink
AssignedTo: nob...@puremagic.com
ReportedBy: samu...@voliacable.com


--- Comment #0 from Max Samukha samu...@voliacable.com 2010-06-05 01:55:09 
PDT ---
Optlink crashes when 'export' is missing from an imported variable declaration. 

To reproduce, unzip the attached archive into a directory and run build.bat.

Uncomment 'export' in main.d to make the testcase compile.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4275] Unexpected optlink termination when 'export' attribute is missing

2010-06-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4275



--- Comment #1 from Max Samukha samu...@voliacable.com 2010-06-05 01:57:58 
PDT ---
Created an attachment (id=652)
Optlink bug

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2933] Cannot return const/immutable with contracts (out/invariant) enabled

2010-06-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2933


Don clugd...@yahoo.com.au changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #5 from Don clugd...@yahoo.com.au 2010-06-05 03:47:28 PDT ---
Fixed when bug 3667 was fixed, in svn 490 (DMD 2.047).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4274] Better array of inner structs error message

2010-06-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4274


nfx...@gmail.com changed:

   What|Removed |Added

 CC||nfx...@gmail.com


--- Comment #1 from nfx...@gmail.com 2010-06-05 04:33:03 PDT ---
I don't understand why arrays of inner structs shouldn't be possible.
Is this just another seemingly random restriction with no real foundation of
the dmd compiler?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4274] Better array of inner structs error message

2010-06-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4274



--- Comment #2 from bearophile_h...@eml.cc 2010-06-05 04:50:08 PDT ---
Structs defined inside functions keep a hidden pointer field to the function
they are into. If you return the array of nonstatic structs, the scope stops
existing and this pointer points to garbage. To avoid this you need 'struct
closures', but I prefer to avoid them.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4274] Better array of inner structs error message

2010-06-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4274



--- Comment #3 from nfx...@gmail.com 2010-06-05 05:04:20 PDT ---
So what? You _can_ have an array of closures.
Why not an array of nested structs?
The compiler should obviously allocate all variables referenced by the struct
on the heap, just like it is done with closures.
Otherwise, it's an half-implemented garbage feature that should be removed
before it causes any more harm.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4276] New: CTFE error messages use random variable names

2010-06-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4276

   Summary: CTFE error messages use random variable names
   Product: D
   Version: 2.041
  Platform: Other
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: jason.james.ho...@gmail.com


--- Comment #0 from Jason House jason.james.ho...@gmail.com 2010-06-05 
05:04:40 PDT ---
Here's a sample that I hit:

$ dmd -c *.d -offoo
board.d(519): Error: variable __ctmp533 cannot be read at compile time
board.d(519): Error: cannot evaluate __ctmp533.this(global_random) at compile
time

Bugzilla 3801 and Bugzilla 3730 also demonstrate this behavior but are not
about error message quality.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4274] Better array of inner structs error message

2010-06-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4274



--- Comment #4 from nfx...@gmail.com 2010-06-05 05:10:24 PDT ---
I just tested it, and it seems for nested structs, the compiler correctly
allocates upvalues on the heap. The error message you're receiving doesn't make
any sense. At least the reason for it must different.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4277] New: delegate reference wrong scope var value

2010-06-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4277

   Summary: delegate reference wrong scope var value
   Product: D
   Version: 1.057
  Platform: x86
OS/Version: Windows
Status: NEW
  Severity: regression
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: chang...@gmail.com


--- Comment #0 from changlon chang...@gmail.com 2010-06-05 07:27:33 PDT ---
---
extern(C) void printf(char*, ... );

interface MyCall{
void call(int);
}

class MyObject{
MyCall[] list;

void add(MyCall _mycall){
list~= _mycall ;
}

void call(int i){
foreach( c ; list) {
c.call(i);
}
}
}


class MyTest {
public void run(){
MyObject obj= new MyObject ;

test3(obj);
test2(obj);
test1(obj);

obj.call(3);
}

static void test1(char[] name = test1\0 )(MyObject obj){
printf(out: `%s` = `%x` \n\0.ptr ,  name.ptr, cast(void*) obj );
obj.add( new class( delegate(int i){
printf(in: `%s` = `%x` \n\0.ptr ,  name.ptr, cast(void*) obj );
} ) MyCall{
void delegate(int) dg;
this(void delegate(int) _dg){
this.dg= _dg;
}
void call(int i) {
dg(i);
}
} ) ;
}

void test2(MyObject obj){
test1!(test2\0)(obj);
}

void test3(ref MyObject obj){
test1!(test3\0)(obj);
}
}

void main(){
auto t= new MyTest;
t.run;
}
---

out: `test3` = `a42fe0` 
out: `test2` = `a42fe0` 
out: `test1` = `a42fe0` 
in: `test3` = `414204` 
in: `test2` = `414204` 
in: `test1` = `12fe88`

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4276] CTFE error messages use random variable names

2010-06-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4276


Don clugd...@yahoo.com.au changed:

   What|Removed |Added

 CC||clugd...@yahoo.com.au


--- Comment #1 from Don clugd...@yahoo.com.au 2010-06-05 11:35:17 PDT ---
(In reply to comment #0)
 Here's a sample that I hit:
 
 $ dmd -c *.d -offoo
 board.d(519): Error: variable __ctmp533 cannot be read at compile time
 board.d(519): Error: cannot evaluate __ctmp533.this(global_random) at compile
 time
 
 Bugzilla 3801 and Bugzilla 3730 also demonstrate this behavior but are not
 about error message quality.

Such messages are references to compiler generated code. Each is a different
bug; they don't have a common cause. A test case for this particular one would
be valuable.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4263] Header generation omits '@system' attribute

2010-06-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4263



--- Comment #1 from Brad Roberts bra...@puremagic.com 2010-06-05 13:00:25 PDT 
---
Created an attachment (id=653)
Update the header generation to include missing @system and enum attributes

There's likely other attributes that are missing.  I was focused on fixing the
two cases that Sean found.

Also fixes issue 4262.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4262] Header generation omits 'enum' for enum declarations

2010-06-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4262


Brad Roberts bra...@puremagic.com changed:

   What|Removed |Added

 CC||bra...@puremagic.com


--- Comment #1 from Brad Roberts bra...@puremagic.com 2010-06-05 13:01:28 PDT 
---
Fixed in the attachment to bug 4263.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4263] Header generation omits '@system' attribute

2010-06-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4263


Brad Roberts bra...@puremagic.com changed:

   What|Removed |Added

Attachment #654|application/octet-stream|text/plain
  mime type||
 Attachment #654 is|0   |1
  patch||


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---