------- Comment #6 from jespdj at hotmail dot com  2006-09-27 21:12 -------
Created an attachment (id=12343)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12343&action=view)
assembly source without "inline"

This is the assembly file I get when I compile without "inline", so the source
looks like:

#include <stdio.h>

typedef int __attribute__ ((aligned (16))) aint;

// no inline
void function() {
    static const aint x = 123;

    unsigned long a = (unsigned long) &x;
    printf("Address of x: 0x%lX - %s\n", a, a & 15L ? "ALIGNMENT ERROR" :
"ok");
}

int main() {
    function();
    return 0;
}

The bottom of the assembly file now looks like this:

        popl    %ebp
        leal    -4(%ecx), %esp
        ret
        .section .rdata,"dr"
        .align 16
__ZZ8functionvE1x:
        .long   123
        .def    _printf;        .scl    2;      .type   32;     .endef


-- 


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

Reply via email to