public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: rth@gcc.gnu.org To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, peter@frix.fri.utc.sk Subject: Re: c++/3545: ICE passing a class object to inline assembly Date: Thu, 04 Apr 2002 04:07:00 -0000 [thread overview] Message-ID: <20020404120755.26737.qmail@sources.redhat.com> (raw) 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
next reply other threads:[~2002-04-04 12:07 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-04-04 4:07 rth [this message] 2002-04-06 8:06 Peter Skvarenina 2002-04-12 19:32 rodrigc
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020404120755.26737.qmail@sources.redhat.com \ --to=rth@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ --cc=gcc-gnats@gcc.gnu.org \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ --cc=peter@frix.fri.utc.sk \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).