dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] [bug #6123] Accesses to nested structs are compiled in


From: nobody
Subject: [Pnet-developers] [bug #6123] Accesses to nested structs are compiled incorrectly
Date: Thu, 23 Oct 2003 09:51:54 -0400
User-agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

=================== BUG #6123: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6123&group_id=353

Changes by: Anonymous user        Date: Thu 10/23/2003 at 09:51

------------------ Additional Follow-up Comments ----------------------------
The bug was traced to the c_lvalue.tc:291

-if(layout)
+if(layout && 0)

makes it generate 2 ldflda calls . This disables the 
offset based optimisations (or reduces structs to the
standard object overhead). So a workaround solution has
been achieved. (...waits for real solution...)




=================== BUG #6123: FULL BUG SNAPSHOT ===================


Submitted by: None                    Project: DotGNU Portable.NET          
Submitted on: Thu 10/23/2003 at 09:22
Category:  None                       Severity:  5 - Major                  
Bug Group:  None                      Resolution:  None                     
Assigned to:  None                    Status:  Open                         

Summary:  Accesses to nested structs are compiled incorrectly

Original Submission:  In a case where 

struct Foo { int a[10]; }
struct Bar { struct Foo foo; }

struct Bar bar;
int a=bar.foo.a[0];

would do 

        .locals init    (valuetype 'struct container', int32)
        ldloca.s        0
        ldflda  valuetype 'array int[10]' 'struct Foo'::'a'
        ldind.i4
        stloc.1

Which is wrong. it should be 2 field fetches ?

ie 
        ldflda  valuetype 'struct Foo' 'struct Container'::'foo'
        ldflda  valuetype 'array int[10]' 'struct Foo'::'a'

This is currently breaking libjpeg

Follow-up Comments
*******************

-------------------------------------------------------
Date: Thu 10/23/2003 at 09:51       By: None
The bug was traced to the c_lvalue.tc:291

-if(layout)
+if(layout && 0)

makes it generate 2 ldflda calls . This disables the 
offset based optimisations (or reduces structs to the
standard object overhead). So a workaround solution has
been achieved. (...waits for real solution...)



CC list is empty


File Attachments
****************

-------------------------------------------------------
Date: Thu 10/23/2003 at 09:22  Name: test3.c  Size: 0KB   By: None
The test program
http://savannah.gnu.org/bugs/download.php?group_id=353&bug_id=6123&bug_file_id=747


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6123&group_id=353

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]