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]

inline-asm/9233: ICE for inline asm call to function taking a reference parameter


>Number:         9233
>Category:       inline-asm
>Synopsis:       ICE for inline asm call to function taking a reference parameter
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 08 13:06:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     j.vanbemmel@home.nl
>Release:        gcc version 3.2 20020927 (prerelease) under cygwin
>Organization:
>Environment:
cygwin under Win2000
>Description:
Code below will trigger an ICE:
src/test.cpp:22: Internal compiler error in emit_move_insn, at expr.c:2769

struct X {
   short a,b,c,d;
   short e,f,g,h; // without these, I get "impossible register constraint"
};

class I
{
public:
   virtual bool f( X& p1 ) const = 0;
};

class C : public I
{
   virtual bool f( X& p1 ) const;

   static void g( X& p1 ) asm( "g" );
};

bool
C::f( X& p1 ) const
{
   __asm__ __volatile__( "call g" :  : "r"(p1) : "memory" );
   return true;
}
>How-To-Repeat:
gcc -c test.cpp
>Fix:
probably edit expr.c :)
>Release-Note:
>Audit-Trail:
>Unformatted:


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