This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/24332] asm label declaration may be missing aliasing info
- From: "wilson at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Oct 2005 23:22:00 -0000
- Subject: [Bug middle-end/24332] asm label declaration may be missing aliasing info
- References: <bug-24332-11514@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from wilson at gcc dot gnu dot org 2005-10-12 23:22 -------
It isn't true that variable i and variable j have the same symbol name. The
asm means that the symbol name of j will be "i" always. However, the symbol
name of i will be the string "i" with various target dependent and command line
option dependent transformations applied.
The easiest way to see this is to compile with -fleading-underscore and note
that we now have two variables "i" and "_i", and there is no aliasing.
-fleading-underscore is the default for some targets.
Since these symbol name string transformations are applied late, when emitting
assembly language, it currently isn't possible for the compiler to do anything
useful here.
Also, like most GCC extensions, no one probably considered the implications of
what should happen with an input like this, so we can't really do much more
than say that it is undefined, and that you can't expect any particular
behaviour here.
Ideally we should emit an error message, but it is probably not possible with
current sources, and probably not worth the trouble to rewrite to make it
possible.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24332