The fix for PR tree-opt/44972 has introduced regressions in Ada, specifically: (sra_modify_assign): Removed ref_expr_for_all_replacements_p checks, checks for return values of build_ref_for_offset. This is a third example, potentially a duplicate of PR tree-opt/46351, but it can be reproduced on 32-bit targets: eric@atlantis:~/build/gcc/native32> gcc/xgcc -Bgcc -S -O opt11.adb +===========================GNAT BUG DETECTED==============================+ | 4.6.0 20101105 (experimental) [trunk revision 166350] (i586-suse-linux-gnu) GCC error:| | in build_ref_for_offset, at tree-sra.c:1345 | | Error detected around opt11.adb:12:1 The testcase is suitable for addition to the gnat.dg testsuite.
Created attachment 22332 [details] opt11.adb
Created attachment 22333 [details] opt11.ads
Also mine.
Patch submitted to the mailing list: http://gcc.gnu.org/ml/gcc-patches/2010-11/msg00933.html
Author: jamborm Date: Wed Nov 10 12:52:27 2010 New Revision: 166535 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166535 Log: 2010-11-10 Martin Jambor <mjambor@suse.cz> PR tree-optimization/46351 PR tree-optimization/46377 * tree-sra.c (type_internals_preclude_sra_p): Disqualify types with aggregate bit-fields. * testsuite/gnat.dg/opt10.adb: New file. * testsuite/gnat.dg/opt10_pkg.ads: Likewise. * testsuite/gnat.dg/opt11.adb: Likewise. * testsuite/gnat.dg/opt11.ads: Likewise. Added: trunk/gcc/testsuite/gnat.dg/opt10.adb trunk/gcc/testsuite/gnat.dg/opt10_pkg.ads trunk/gcc/testsuite/gnat.dg/opt11.adb trunk/gcc/testsuite/gnat.dg/opt11.ads Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-sra.c
Fixed.