OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [assumed_charlen_in_main.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! Tests the fix for PR28771 in which an assumed character length variable with an initializer could
3
! survive in the main program without causing an error.
4
!
5
! Contributed by Martin Reinecke  
6
! Modified to test fix of regression reported by P.Schaffnit@access.rwth-aachen.de
7
 
8
subroutine poobar ()
9
  ! The regression caused an ICE here
10
  CHARACTER ( LEN = * ), PARAMETER ::   Markers(5) = (/ "Error ", &
11
      &                                                 "Fehler", &
12
      &                                                 "Erreur", &
13
      &                                                 "Stop  ", &
14
      &                                                 "Arret "  /)
15
  character(6) :: recepteur (5)
16
  recepteur = Markers
17
end subroutine poobar
18
 
19
! If the regression persisted, the compilation would stop before getting here
20
program test
21
  character(len=*), parameter :: foo = 'test'     ! Parameters must work.
22
  character(len=4) :: bar = foo
23
  character(len=*) :: foobar = 'This should fail' ! {  dg-error "must be a dummy" }
24
  print *, bar
25
  call poobar ()
26
end
27
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.