* the code segfaults
* there is no error message, not even a warning
* the docs dont say ebp on the clobber list has undefinied behaviour though you
could argue its common knowledgde that gcc-asm has undefined behavior in general

testcase:
int main(){
    int i;

    asm (
        "xorl %%ebp, %%ebp\n\t"
        "movl %0, %%ebp\n\t"
        :: "m" (i)
        : "%ebp"
    );
    return 0;
}

-- 
           Summary: gcc ignores ebp on the clobber list
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: inline-asm
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: michaelni at gmx dot at
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: x86-linux
  GCC host triplet: x86-linux
GCC target triplet: x86-linux


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

Reply via email to