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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [char_length_1.f90] - Blame information for rev 841

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

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do compile }
2
! { dg-options "-Wall -std=f2003" }
3
! Tests the patch for PR27996 and PR27998, in which warnings
4
! or errors were not emitted when the length of character
5
! constants was changed silently.
6
!
7
! Contributed by Tobias Burnus 
8
!
9
program test
10
  character(10) :: a(3)
11
  character(10) :: b(3)= &
12
       (/ 'Takata ', 'Tanaka', 'Hayashi' /) ! { dg-error "same length" }
13
  character(4) :: c = "abcde"  ! { dg-warning "being truncated" }
14
  a =  (/ 'Takata', 'Tanaka ', 'Hayashi' /) ! { dg-error "same length" }
15
  a =  (/ 'Takata ', 'Tanaka ', 'Hayashi' /)
16
  b = "abc"
17
  c = "abcdefg"   ! { dg-warning "will be truncated" }
18
end program test

powered by: WebSVN 2.1.0

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