diff mbox

Additional tests for 69987, 69989, 69740

Message ID 56D5C1CF.1050007@redhat.com
State New
Headers show

Commit Message

Jeff Law March 1, 2016, 4:22 p.m. UTC
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

Comments

Dominik Vogt March 2, 2016, noon UTC | #1
On Tue, Mar 01, 2016 at 09:22:39AM -0700, Jeff Law wrote:
> 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.

This on fails on s390x with -m31 (but works with -m64).  (Without
trying it I assume it also fails on s390).

> +++ b/gcc/testsuite/gfortran.dg/pr69987.f90

FAIL: gfortran.dg/pr69987.f90   -O  (test for excess errors)
Excess errors:
f951: Warning: -fprefetch-loop-arrays not supported for this target (try -march switches)

Ciao

Dominik ^_^  ^_^
Richard Biener March 2, 2016, 12:43 p.m. UTC | #2
On Wed, Mar 2, 2016 at 1:00 PM, Dominik Vogt <vogt@linux.vnet.ibm.com> wrote:
> On Tue, Mar 01, 2016 at 09:22:39AM -0700, Jeff Law wrote:
>> 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.
>
> This on fails on s390x with -m31 (but works with -m64).  (Without
> trying it I assume it also fails on s390).
>
>> +++ b/gcc/testsuite/gfortran.dg/pr69987.f90
>
> FAIL: gfortran.dg/pr69987.f90   -O  (test for excess errors)
> Excess errors:
> f951: Warning: -fprefetch-loop-arrays not supported for this target (try -march switches)
>
> Ciao
>
> Dominik ^_^  ^_^

Other testcases simply add -w when using -fprefetch-loop-arrays....

Richard.

> --
>
> Dominik Vogt
> IBM Germany
>
Jeff Law March 2, 2016, 6:42 p.m. UTC | #3
On 03/02/2016 05:43 AM, Richard Biener wrote:
> On Wed, Mar 2, 2016 at 1:00 PM, Dominik Vogt <vogt@linux.vnet.ibm.com> wrote:
>> On Tue, Mar 01, 2016 at 09:22:39AM -0700, Jeff Law wrote:
>>> 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.
>>
>> This on fails on s390x with -m31 (but works with -m64).  (Without
>> trying it I assume it also fails on s390).
>>
>>> +++ b/gcc/testsuite/gfortran.dg/pr69987.f90
>>
>> FAIL: gfortran.dg/pr69987.f90   -O  (test for excess errors)
>> Excess errors:
>> f951: Warning: -fprefetch-loop-arrays not supported for this target (try -march switches)
>>
>> Ciao
>>
>> Dominik ^_^  ^_^
>
> Other testcases simply add -w when using -fprefetch-loop-arrays....
That seems to work (tested with cross compiler).  I'll commit shortly.

Thanks,
jeff
diff mbox

Patch

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  <law@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  <polacek@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
+