This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/60606] ICE [ARM] error: insn does not satisfy its constraints
- From: "rearnsha at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 26 Mar 2014 15:03:17 +0000
- Subject: [Bug target/60606] ICE [ARM] error: insn does not satisfy its constraints
- Auto-submitted: auto-generated
- References: <bug-60606-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60606
Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |WONTFIX
--- Comment #3 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
> 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.
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.