A gcc build from today (gcc version 4.4.0 20080924) gets an ICE on PowerPC when
building this (admittedly broken) code:

# gcc -m64 -O2 -c test.c

struct foo {
        int a;
        char lock;
};
struct foo *foo;

void testcase()
{
        __sync_lock_test_and_set(&(foo->lock), 0);
}

It compiles if building 32bit. Even so, I wonder if gcc should warn when the
variable is incompatible with __sync_* builtins.


-- 
           Summary: Misuse of __sync_lock_test_and_set causes ICE
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: regression
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anton at samba dot org
GCC target triplet: powerpc-linux


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

Reply via email to