Two additional regression tests for problems exposed by the 69740 patches. They tickle a different path than the test HJ already checked in. Obviously the idea is to have these in place so that when we attack 69740 again, we don't regress these issues.
Installed on the trunk after verifying they PASS on the trunk. Jeff
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 27e134f..83a41c7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2016-02-29 Jeff Law <l...@redhat.com> + + PR tree-optimization/69987 + * gfortran.dg/pr69987.f90: New test. + + PR tree-optimization/69989 + * gcc.c-torture/compile/pr69989-2.c: New test. + 2016-03-01 Marek Polacek <pola...@redhat.com> PR c++/69795 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr69989-2.c b/gcc/testsuite/gcc.c-torture/compile/pr69989-2.c new file mode 100644 index 0000000..39cd516 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr69989-2.c @@ -0,0 +1,16 @@ +int a, b, d; +short c[] = {4073709551611, 1, 4, 4}; + +void fn1() { + if (a) + goto LABEL_vhvhP; + for (;;) { + for (; b; b++) + d = c[b + 3] | c[b]; + LABEL_vhvhP: + if (d) + break; + } +} + +int main() { return 0; } diff --git a/gcc/testsuite/gfortran.dg/pr69987.f90 b/gcc/testsuite/gfortran.dg/pr69987.f90 new file mode 100644 index 0000000..6efc100 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr69987.f90 @@ -0,0 +1,28 @@ +! { dg-do compile } +! { dg-options "-O3 -fprefetch-loop-arrays" } + +MODULE cp_lbfgs + INTEGER, PARAMETER :: dp=8 +CONTAINS + SUBROUTINE mainlb(n, m, x, l, u, nbd, f, g, factr, pgtol, ws, wy, & + csave, lsave, isave, dsave) + REAL(KIND=dp) :: x(n), l(n), u(n) + REAL(KIND=dp) :: f, g(n), factr, pgtol, ws(n, m), wy(n, m), sy(m, m), & + ss(m, m), wt(m, m), wn(2*m, 2*m), snd(2*m, 2*m), z(n), r(n), d(n), & + t(n), wa(8*m) + CHARACTER(len=60) :: task + IF (task == 'START') THEN + IF (task(1:5) == 'FG_LN') GOTO 666 + ENDIF +222 CONTINUE + DO 40 i = 1, n + d(i) = z(i) - x(i) +40 ENDDO +666 CONTINUE + IF (info /= 0 .OR. iback >= 20) THEN + CALL dcopy(n,r,1,g,1) + ENDIF + GOTO 222 + END SUBROUTINE mainlb +END MODULE cp_lbfgs +