aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/string_null_compare_1.f
blob: 659b3eb3709f597209f022413a7d1bf3bbfc9737 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! { dg-do run }
! { dg-options "-std=legacy" }
!
! PR 27784 - Different strings should compare unequal even if they
!            have CHAR(0) in them.

      program main
      character*3 str1, str2
      call setval(str1, str2)
      if (str1 == str2) call abort
      end

      subroutine setval(str1, str2)
      character*3 str1, str2
      str1 = 'a' // CHAR(0) // 'a'
      str2 = 'a' // CHAR(0) // 'c'
      end