! File: cyclic_specs1.f90
! Public domain 2004 James Van Buskirk
! Leads to internal compiler error in g95
! Windows download of 12/18/04

module cyclic
   implicit none
   contains
      function ouch(x,y)
         implicit character(len(ouch)) (x)
         implicit character(len(x)+1) (y)
         implicit character(len(y)-1) (o)
         intent(in) x,y
         character(len(y)-1) ouch
         integer i

         do i = 1, len(ouch)
            ouch(i:i) = achar(ieor(iachar(x(i:i)),iachar(y(i:i))))
         end do
      end function ouch
end module cyclic

program test
   use cyclic
   implicit none

   write(*,*) ouch('YOW!','     ')   
end program test
