On 5/13/21 5:17 PM, Jeff Law via Gcc-patches wrote:
> 
> On 5/13/2021 6:23 AM, Martin Jambor wrote:
>> Hi,
>>
>> When SRA transforms an assignment where the RHS is an aggregate decl
>> that it creates replacements for, the (least efficient) fallback
>> method of dealing with them is to store all the replacements back into
>> the original decl and then let the original assignment takes its
>> course.
>>
>> That of course should not need to be done for TREE_READONLY bases
>> which cannot change contents.  The SRA code handled this situation in
>> one of two necessary places but only for DECL_IN_CONSTANT_POOL const
>> decls, this patch modifies both to check TREE_READONLY.
>>
>> Bootstrapped and tested on aarch64-linux, OK for trunk?
>>
>> Thanks,
>>
>> Martin
>>
>>
>>
>> gcc/ChangeLog:
>>
>> 2021-05-12  Martin Jambor  <mjam...@suse.cz>
>>
>>     PR tree-optimization/100453
>>     * tree-sra.c (sra_modify_assign): All const base accesses do not
>>     need refreshing, not just those from decl_pool.
>>     (sra_modify_assign): Do not refresh into a const base decl.
>>
>> gcc/testsuite/ChangeLog:
>>
>> 2021-05-12  Martin Jambor  <mjam...@suse.cz>
>>
>>     PR tree-optimization/100453
>>     * gcc.dg/tree-ssa/pr100453.c: New test.
> 
> OK
> 
> jeff
> 
> 

Looks like this caused:

                === acats tests ===
FAIL:   c41325a
FAIL:   c45347d
FAIL:   c74402a
FAIL:   c95085m
FAIL:   cc3601a

                === gnat tests ===

FAIL: gnat.dg/addr12.adb (test for excess errors)
UNRESOLVED: gnat.dg/addr12.adb compilation failed to produce executable
FAIL: gnat.dg/addr12_a.adb (test for excess errors)
FAIL: gnat.dg/bip_overlay.adb (test for excess errors)
FAIL: gnat.dg/global.adb (test for excess errors)
FAIL: gnat.dg/spark1.adb  (test for errors, line 8)
FAIL: gnat.dg/spark1.adb (test for excess errors)
FAIL: gnat.dg/sync2.adb (test for excess errors)
FAIL: gnat.dg/synchronized1.adb (test for excess errors)


Bernd.

Reply via email to