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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [fmt_with_extra.f] - Blame information for rev 749

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! test case contributed by tobias.burnus@physik.fu-berlin.de
3
! PR28039 Warn when ignoring extra characters in the format specification
4
       implicit none
5
       real :: r
6
       r = 1.0
7
       write(*,'(a),f)') 'Hello', r   ! { dg-warning "Extraneous characters in format at" }
8
       end
9
! Below routine was also submitted by tobias.burnus@physik.fu-berlin.de
10
! It showed up some problems with the initial implementation of this
11
! feature.
12
! This routine should compile without complaint or warning.
13
      SUBROUTINE rw_inp()
14
      CHARACTER(len=100) :: line
15
      integer :: i5
16
      character(100), parameter :: subchapter =
17
     &        '(79("-"),/,5("-")," ",A,/,79("-"),/)'
18
      i5 = 1
19
 
20
      READ(*,FMT="(4x,a)") line
21
 7182 FORMAT (a3)
22
 7130 FORMAT (i3)
23
 
24
      WRITE (6,'(//'' icorr is not correctly transferred.  icorr='',i5)
25
     &    ') 42
26
 
27
      write(*,subchapter) 'test'
28
      END SUBROUTINE rw_inp

powered by: WebSVN 2.1.0

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