Bug 9233 - ICE for inline asm call to function taking a reference parameter
Summary: ICE for inline asm call to function taking a reference parameter
Status: RESOLVED DUPLICATE of bug 8788
Alias: None
Product: gcc
Classification: Unclassified
Component: inline-asm (show other bugs)
Version: 3.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2003-01-08 13:06 UTC by j.vanbemmel
Modified: 2003-08-18 19:41 UTC (History)
2 users (show)

See Also:
Host:
Target: i?86-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-08-09 01:16:27


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description j.vanbemmel 2003-01-08 13:06:01 UTC
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;
}

Release:
gcc version 3.2 20020927 (prerelease) under cygwin

Environment:
cygwin under Win2000

How-To-Repeat:
gcc -c test.cpp
Comment 1 j.vanbemmel 2003-01-08 13:06:01 UTC
Fix:
probably edit expr.c :)
Comment 2 Dara Hazeghi 2003-05-09 22:25:04 UTC
From: Dara Hazeghi <dhazeghi@yahoo.com>
To: gcc-gnats@gcc.gnu.org, j.vanbemmel@home.nl
Cc:  
Subject: Re: inline-asm/9233: ICE for inline asm call to function taking a reference parameter
Date: Fri, 9 May 2003 22:25:04 -0700

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- 
 trail&database=gcc&pr=9233
 
 Hello,
 
 I can confirm that this bug is still present and 3.2.3, 3.3 branch and  
 mainline (20030509) all ICE on the testcase.
 
 Dara
 
Comment 3 Giovanni Bajo 2003-05-12 11:34:09 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed with current CVS.
Comment 4 Dara Hazeghi 2003-06-05 04:11:52 UTC
Reconfirmed with gcc 3.3 branch and mainline (20030604).
Comment 5 Dara Hazeghi 2003-07-11 21:28:09 UTC
Reconfirmed with current branch and mainline on i686-linux. This problem is not
specific to cygwin, so changing target appropriately.
Comment 6 Falk Hueffner 2003-08-18 19:41:29 UTC

*** This bug has been marked as a duplicate of 8788 ***