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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [boz_4.f90] - Blame information for rev 193

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

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do compile }
2
! Test that the conversion of a BOZ constant that is too large for the
3
! integer variable is caught by the compiler.
4
program boz
5
 
6
   implicit none
7
 
8
   integer(1), parameter :: &
9
   &  b1 = b'0101010110101010'  ! { dg-error "overflow converting" }
10
   integer(2), parameter :: &
11
   &  b2 = b'01110000111100001111000011110000'  ! { dg-error "overflow converting" }
12
   integer(4), parameter :: &
13
   &  b4 = b'0111000011110000111100001111000011110000111100001111000011110000'  ! { dg-error "overflow converting" }
14
 
15
   integer(1), parameter :: &
16
   &  o1 = o'1234567076543210'  ! { dg-error "overflow converting" }
17
   integer(2), parameter :: &
18
   &  o2 = o'1234567076543210'  ! { dg-error "overflow converting" }
19
   integer(4), parameter :: &
20
   &  o4 = o'1234567076543210'  ! { dg-error "overflow converting" }
21
 
22
   integer(1), parameter :: &
23
   &  z1 = z'deadbeef'  ! { dg-error "overflow converting" }
24
   integer(2), parameter :: &
25
   &  z2 = z'deadbeef'  ! { dg-error "overflow converting" }
26
   integer(4), parameter :: &
27
   &  z4 = z'deadbeeffeed'  ! { dg-error "overflow converting" }
28
 
29
end program boz

powered by: WebSVN 2.1.0

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