http://llvm.org/bugs/show_bug.cgi?id=9520

Chris Lattner <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|                            |INVALID

--- Comment #2 from Chris Lattner <[email protected]> 2011-03-21 13:25:10 CDT 
---
The actual problem here is that you're looking for some additional semantic
that is not visible to the compiler.  The fix for this is to mark the variable
as "attribute(used)" in addition to specifying a section.  For example:


void trial(int arg) {
    static int __attribute__ ((used, __section__ (".init.data"))) var = 42;
    if (arg)
        var = 0;
    printf("%i\n", var);
}

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to