> On Fri, Dec 10, 2021 at 2:30 AM Roger Sayle <ro...@nextmovesoftware.com> > wrote: > > > > > > This patch fixes PR ipa/103061 which is P1 regression that shows up as > > an ICE in ipa-modref-tree.c's insert_kill when compiling the CSiBE > > benchmark. I believe the underlying cause is that the new kill tracking > > functionality wasn't anticipating memory accesses that are zero bits > > wide!?. The failing source code (test case) contains the unusual lines: > > typedef struct { } spinlock_t; > > and > > q->lock = (spinlock_t) { }; > > Making spinlock_t larger, or removing the assignment work around the issue. > > zero sized accesses (load and stores) should have been removed during > gimplification. Why was it not?
Sadly this does not happen systematically... I already had to fix similar issue with load/store analysis in modref :( > > > > 2021-12-10 Roger Sayle <ro...@nextmovesoftware.com> > > > > gcc/ChangeLog > > PR ipa/103601 > > * ipa-modref-tree.h (useful_for_kill_p): Zero width accesses aren't > > useful for kill tracking. The patch is OK. Even if we make gimplifier smarter about zero width accesses I guess we want to be safe that they are not synthetized from i.e. variable sized arrays. Thanks for fixing this! Honza > > > > gcc/testsuite/ChangeLog > > PR ipa/103601 > > * gcc.dg/ipa/pr103601.c: New test case. > > > > Thanks in advance, > > Roger > > -- > >