This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/52554] Variable called $1 causes invalid asm to be generated
- From: "rwxr-xr-x at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 29 Mar 2012 11:26:12 +0000
- Subject: [Bug target/52554] Variable called $1 causes invalid asm to be generated
- Auto-submitted: auto-generated
- References: <bug-52554-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52554
--- Comment #6 from Lukas Mai <rwxr-xr-x at gmx dot de> 2012-03-29 11:26:12 UTC ---
>From the gcc documentation:
| However, dollar signs in identifiers are not supported on a few target
| machines, typically because the target assembler does not allow them.
That's nice, but:
| * If the compiler produces invalid assembly code, for any input
| whatever (except an `asm' statement), that is a compiler bug,
| unless the compiler reports errors (not just warnings) which would
| ordinarily prevent the assembler from being run.
| * If the compiler produces valid assembly code that does not
| correctly execute the input source code, that is a compiler bug.
If my target assembler (gas) doesn't allow them, you must produce an error.
Making up asm syntax and handing it to the assembler is not an option.
Alternatively, change the documentation to the effect that invalid assembly
code and valid (but semantically wrong) assembly code aren't necessarily
compiler bugs.