[LLVMbugs] [Bug 6736] New: missing error detection in support for variable alias attribute

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 29 07:24:38 PDT 2010


           Summary: missing error detection in support for variable alias
           Product: clang
           Version: 2.6
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: hkultala at cs.tut.fi
                CC: llvmbugs at cs.uiuc.edu

There is and attribute to specify variable to be alias of another variable

__attribute__ ((alias ("variable2"))); 

This makes this variable alias to location variable2

It seems that the correctness of the symbol where the alias is created is not
checked in clang:

__attribute__ ((alias ("variable2 + 2"))); 

should cause a compiler error, but it passes, and creates a bogus reference to
a variable named "variable2 + 2". 

At least newlib seems to use this broken syntax(because gcc can actually do the
calculation), which then goes thru configure check(because the error is not
detected when compiling) but fails on actual linking, which causes newlib to
not work when compiled with clang.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list