OSDN Git Service

2004-02-18 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Feb 2005 14:36:54 +0000 (14:36 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Feb 2005 14:36:54 +0000 (14:36 +0000)
        PR middle-end/20030
        * gfortran.fortran-torture/execute/character_passing.f90: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95227 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.fortran-torture/execute/character_passing.f90 [new file with mode: 0644]

index 7d653ec..581e21a 100644 (file)
@@ -1,3 +1,8 @@
+2004-02-18  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR middle-end/20030
+       * gfortran.fortran-torture/execute/character_passing.f90: New test.
+
 2005-02-18  Alexandre Oliva  <aoliva@redhat.com>
 
        PR c++/20008
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/character_passing.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/character_passing.f90
new file mode 100644 (file)
index 0000000..ade7f9d
--- /dev/null
@@ -0,0 +1,21 @@
+! PR middle-end/20030
+! we were messing up the access in LSAME for
+! the character agruments.
+      program foo
+      character*1 a1, a2, b
+      a1='A'
+      a2='A'
+      b='B'
+      x = LSAME(a1,a2)
+      if ( x.ne.1 ) then
+        call abort  ();
+      endif
+      end
+
+      logical function LSAME( CA, CB )
+      character CA, CB
+      integer   INTA, INTB
+      INTA = ICHAR( CA )
+      INTB = ICHAR( CB )
+      LSAME = INTA.EQ.INTB
+      end