Subject: Re: bug#76559: 31.0.50; [-O3 + PGTK] Crash when 'copying as kill'/'killing word'

From: Po Lu <[email-masked]>
Date: Sat, 01 Mar 2025 19:29:36 +0800

Pip Cet <[email-masked]> writes:

> That does seem to be an actual bug, where SRA does the wrong thing if a
> function is marked with __attribute__ ((optimize (0))).  At first glance
> (-fdump-tree-sra-details) it seems like the whole-structure access in
> that function is ignored, which makes sense if the SRA pass isn't run
> for a non-optimized function but still assumes it has looked at all
> accesses.

Intraprocedural SRA is not so sophisticated as you assume, alas.  It
does not account for data flow at all, only decls and the operands of
GIMPLE statements throughout the totality of a procedure, and it is
undermined by quite a substantial oversight.