re PR tree-optimization/49343 (ICE on field with variable offset)
authorMartin Jambor <mjambor@suse.cz>
Thu, 16 Jun 2011 20:21:21 +0000 (22:21 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Thu, 16 Jun 2011 20:21:21 +0000 (22:21 +0200)
commitee460e75424c78db2684a8f4dec1c993b0c05758
tree148334680920f915f20b2a6b506202f76d398ff5
parenta285ba2ef9a4ebdd613b12bca42576816fe6251f
re PR tree-optimization/49343 (ICE on field with variable offset)

2011-06-16  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/49343
* tree-sra.c (build_ref_for_model): Use component_ref_field_offset to
calculate offset, provide 2nd operand for the new COMPONENT_REF.

* testsuite/gnat.dg/discr31.adb: New test.
* testsuite/gnat.dg/discr31.ads: Likewise.

From-SVN: r175111
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/discr31.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/discr31.ads [new file with mode: 0644]
gcc/tree-sra.c