6 !!!!!! INTEGER BASE !!!!!!
9 print *, 0**(-1) ! { dg-error "Division by zero" }
11 print *, 0**(-huge(0)-1) ! { dg-error "Division by zero" }
13 print *, 0**(-(2_8**32)) ! { dg-error "Division by zero" }
16 print *, 1**(-huge(0)-1)
18 print *, 1**(-huge(0_8)-1_8)
19 print *, (-1)**huge(0)
20 print *, (-1)**(-huge(0)-1)
21 print *, (-1)**huge(0_8)
22 print *, (-1)**(-huge(0_8)-1_8)
24 print *, 2**huge(0) ! { dg-error "Arithmetic overflow" }
25 print *, 2**huge(0_8) ! { dg-error "Arithmetic overflow" }
26 print *, (-2)**huge(0) ! { dg-error "Arithmetic overflow" }
27 print *, (-2)**huge(0_8) ! { dg-error "Arithmetic overflow" }
29 print *, 2**(-huge(0)-1)
30 print *, 2**(-huge(0_8)-1_8)
31 print *, (-2)**(-huge(0)-1)
32 print *, (-2)**(-huge(0_8)-1_8)
34 !!!!!! REAL BASE !!!!!!
35 print *, 0.0**(-1) ! { dg-error "Arithmetic overflow" }
36 print *, 0.0**(-huge(0)-1) ! { dg-error "Arithmetic overflow" }
37 print *, 2.0**huge(0) ! { dg-error "Arithmetic overflow" }
38 print *, nearest(1.0,-1.0)**(-huge(0)) ! { dg-error "Arithmetic overflow" }
40 !!!!!! COMPLEX BASE !!!!!!
41 ! Put these lines back in (and "no-" -> "dg-") prior to gcc-4.5.
42 ! print *, (2.0,-4.3)**huge(0) ! { no-error "Arithmetic overflow" }
43 ! print *, (2.0,-4.3)**huge(0_8) ! { no-error "Arithmetic overflow" }
44 ! print *, (2.0,-4.3)**(-huge(0))
45 ! print *, (2.0,-4.3)**(-huge(0_8))