On Fri, Oct 11, 2024 at 06:35:26PM +0200, Martin Uecker wrote: > > I like to ping this patch.
I'm a little bit worried about cases like: int *p; struct S { int *s; }; int *bar (int *s; }; int *baz (void); void foo (void) { struct S a = { bar (&a.s) }; struct S b = { (p = &a.s, baz ()) }; } So, perhaps when restoring in_decl_init scan the initializer and if it only contains references to the decl in some simple contexts like address of itr, address of its field and similar, have the new behavior, otherwise if the address or address of its components or similar is passed to a function, or escapes into another variable and the like keep previous behavior (i.e. set DECL_READ_P (in_decl_init) = 1). Jakub