This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/11807] GCC should error out when clobbering the stack or frame pointer
- From: "rth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Nov 2003 08:47:09 -0000
- Subject: [Bug inline-asm/11807] GCC should error out when clobbering the stack or frame pointer
- References: <20030805124527.11807.aw11@os.inf.tu-dresden.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rth at gcc dot gnu dot org 2003-11-21 08:47 -------
(In reply to comment #8)
> + switch (i) {
> + case PIC_OFFSET_TABLE_REGNUM:
Can't use a switch; PIC_OFFSET_TABLE_REGNUM is not constant.
> + case HARD_FRAME_POINTER_REGNUM:
> + error ("Frame pointer register `%s' clobbered in `asm'", regname);
This one's more interesting, since if CAN_DEBUG_WITHOUT_FP we often won't
need or use a frame pointer. I think this error should be delayed until
reload has decided that a frame pointer is necessary.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11807