From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26781 invoked by alias); 4 Apr 2002 12:07:57 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 26739 invoked by uid 61); 4 Apr 2002 12:07:55 -0000 Date: Thu, 04 Apr 2002 04:07:00 -0000 Message-ID: <20020404120755.26737.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, peter@frix.fri.utc.sk From: rth@gcc.gnu.org Reply-To: rth@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, peter@frix.fri.utc.sk, gcc-gnats@gcc.gnu.org Subject: Re: c++/3545: ICE passing a class object to inline assembly X-SW-Source: 2002-04/txt/msg00316.txt.bz2 List-Id: Old Synopsis: ICE in emit_move_insn, at expr.c:2724 New Synopsis: ICE passing a class object to inline assembly State-Changed-From-To: open->analyzed State-Changed-By: rth State-Changed-When: Thu Apr 4 04:07:54 2002 State-Changed-Why: ICE still happens with gcc 3.1 prelease. A reduced test case is class cCislo { public: long Cislo; cCislo () { Cislo = 0; } cCislo (const cCislo &P) { Cislo = P.Cislo; } cCislo (int A) { Cislo = A; } }; void foo(cCislo A, cCislo B) { cCislo Sucet; asm volatile ("AddL %2, %1" : "=g" (Sucet) : "0" (A), "q" (B) : "cc"); } The problem here is that the compiler Really does not want to pass a class to an asm. The fix for this will involve issuing an error for this mistake. What you wanted is to pass "A.Cislo" to the asm, not "A". Similarly for the other asm arguments. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3545