Files
gcc-reflection/gcc/testsuite/gnat.dg/loop_optimization23_pkg.adb
Bernd Edlinger 5953774463 re PR tree-optimization/71083 (Unaligned bit-field address when predictive commoning)
2016-08-11  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR tree-optimization/71083
        * tree-predcom.c (ref_at_iteration): Correctly align the
        reference type.

testsuite:
2016-08-11  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR tree-optimization/71083
        * gcc.c-torture/execute/pr71083.c: New test.
        * gnat.dg/loop_optimization23.adb: New test.
        * gnat.dg/loop_optimization23_pkg.ads: New test.
        * gnat.dg/loop_optimization23_pkg.adb: New test.

From-SVN: r239362
2016-08-11 13:07:29 +00:00

12 lines
280 B
Ada

-- { dg-do compile }
-- { dg-options "-O3" }
-- PR tree-optimization/71083
package body Loop_Optimization23_Pkg is
procedure Foo (X : in out ArrayOfStructB) is
begin
for K in 0..99 loop
X (K+1).b.b := X (K).b.b;
end loop;
end Foo;
end Loop_Optimization23_Pkg;