public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "d.salikhov at samsung dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/60606] ICE [ARM] error: insn does not satisfy its constraints Date: Thu, 27 Mar 2014 05:03:00 -0000 [thread overview] Message-ID: <bug-60606-4-R09L8w6Sk2@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-60606-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60606 D.Salikhov <d.salikhov at samsung dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|WONTFIX |--- --- Comment #4 from D.Salikhov <d.salikhov at samsung dot com> --- (In reply to Richard Earnshaw from comment #3) > > register unsigned long pc asm("pc"); > > I think it's a mistake to permit this sort of construct. > > What does: > > a = pc; > b = a+pc; > > generate for b? Is it exactly twice a (the compiler doesn't see pc > changing, so is free to assume that it doesn't), just more than twice a (how > much more?) or just less than twice a (different scheduling)? What happens > if the user writes > > pc = 3; // ??? > > The point is that while it might be valid to use pc in assembly > instructions, the constructs you get in high-level languages are essentially > meaningless. Well, even if I use PC incorrectly (actually I don't), it shouldn't lead to ICE. At least, there should be a sensible error message from compiler but not internal error. > > As has been pointed out, in the few cases where you really need to extract > the program counter you can write an inline assembly statement that > explicitly references the PC.
next prev parent reply other threads:[~2014-03-27 5:03 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-03-21 8:09 [Bug target/60606] New: " d.salikhov at samsung dot com 2014-03-21 9:10 ` [Bug target/60606] " y.gribov at samsung dot com 2014-03-21 9:28 ` d.salikhov at samsung dot com 2014-03-26 15:03 ` rearnsha at gcc dot gnu.org 2014-03-27 5:03 ` d.salikhov at samsung dot com [this message] 2014-03-27 17:37 ` [Bug target/60606] [ARM] ICE with asm ("mov ...", pc) ramana at gcc dot gnu.org 2014-05-19 4:42 ` d.salikhov at samsung dot com 2014-08-26 17:07 ` jsm28 at gcc dot gnu.org 2014-08-26 17:08 ` jsm28 at gcc dot gnu.org 2014-09-03 7:23 ` yroux at gcc dot gnu.org
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=bug-60606-4-R09L8w6Sk2@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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).