This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug inline-asm/33451] New: Collapsing of offsetable memory operands.


Consider the case when a class contains an aggregate member:

struct foo
{
   struct bar
   {
      int one[256];
      int two[256];
   };

   bar my_bar;
};

foo *fooptr;

The members "one" and "two" are clearly offsetable memory operands, yet gcc
does not accept them as operands to asm statements.

asm( "..." : : "o" (fooptr->my_bar.two) ) // ERROR "memory operand not directly
addressable".

The expected behaviour is to generate code like this:

mov fooptr, %eax
mov 256(%eax), ...   // fooptr->my_bar.two


-- 
           Summary: Collapsing of offsetable memory operands.
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: inline-asm
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cschueler at gmx dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33451


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]