This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Testsuite patch]: new array conformance test


Hi,

Following test verifies if the shape of arrays in operation are same.
This test is part of a pr 23209 I opened back in august.

Is this ok?

- Uttam

2005-11-11  Uttam Pawar  <uttamp@us.ibm.com>

       * gfortran.dg/array_1.f90: New test.


diff -urN gcc.testsuite/gfortran.dg/array_1.f90
gcc_mine.testsuite/gfortran.dg/array_1.f90
--- gcc.testsuite/gfortran.dg/array_1.f90       1969-12-31
16:00:00.000000000 -0800
+++ gcc_mine.testsuite/gfortran.dg/array_1.f90  2005-11-11
08:37:14.000000000 -0800
@@ -0,0 +1,11 @@
+! { dg-do compile }
+! array shape conformance test
+
+program test_array_conformance
+      integer ::a(2,2)
+      real :: b(4,4)
+      a=1
+      b=2.0
+      b = b + a        ! { dg-error "Shapes for operands" " }
+end program test_array_conformance


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]