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 middle-end/11498] New: asm can't be used to give a variable its own name


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11498

           Summary: asm can't be used to give a variable its own name
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: geoffk at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: any
  GCC host triplet: any
GCC target triplet: any

This doesn't work:

int foo(void)
{
  static int x asm ("x") = 3;
  return x++;
}

because of the hacky way that make_decl_rtl tries to determine if
DECL_ASSEMBLER_NAME has already been set.  It shouldn't be in that business at
all, that code should be in lhd_set_decl_assembler_name.


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