This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/52554] Variable called $1 causes invalid asm to be generated


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]