A minimal (C) test case (with "-O -ftree-vectorize") for me is: struct test { unsigned long exp[0]; };
void test (struct test *a, long b, unsigned long bitmask) { if (b > 0) { a->exp[0] &= ~bitmask; a->exp[0] |= b; } else { a->exp[0] &= ~bitmask; } } The problem here is a bug in the data dependency detection when zero- sized arrays are involved in an access. This bug was latent, and got exposed by Ira's patch to improve conditional store sinking: http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01393.html The bug was later fixed (inadvertently) by Richard Guenther's data-dependency fix series, in particular this patch: http://gcc.gnu.org/ml/gcc-patches/2011-08/msg01878.html Since both of these patches are in mainline (and FSF 4.7, and Linaro 4.7), the bug is not appear there. Since FSF 4.6 contains neither of those, the bug is latent (without visible effect) there. The bug does appear in Linaro 4.6, since we backported Ira's patch but not Richard's data-dependency fix. I'll try testing a backport of that fix. ** Changed in: gcc-linaro Status: Triaged => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/972648 Title: ICE (segfault) in gsi_for_stmt To manage notifications about this bug go to: https://bugs.launchpad.net/gcc-linaro/+bug/972648/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs