annotate gcc/testsuite/gfortran.dg/f2c_2.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! Some basic testing that calls to the library still work correctly with
kono
parents:
diff changeset
2 ! -ff2c
kono
parents:
diff changeset
3 !
kono
parents:
diff changeset
4 ! Once the library has support for f2c calling conventions (i.e. passing
kono
parents:
diff changeset
5 ! a REAL(kind=4) or COMPLEX-valued intrinsic as procedure argument works), we
kono
parents:
diff changeset
6 ! can simply add -ff2c to the list of options to cycle through, and get
kono
parents:
diff changeset
7 ! complete coverage. As of 2005-03-05 this doesn't work.
kono
parents:
diff changeset
8 ! { dg-do run }
kono
parents:
diff changeset
9 ! { dg-options "-ff2c" }
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 complex c
kono
parents:
diff changeset
12 double complex d
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 x = 2.
kono
parents:
diff changeset
15 if ((sqrt(x) - 1.41)**2 > 1.e-4) call abort ()
kono
parents:
diff changeset
16 x = 1.
kono
parents:
diff changeset
17 if ((atan(x) - 3.14/4) ** 2 > 1.e-4) call abort ()
kono
parents:
diff changeset
18 c = (-1.,0.)
kono
parents:
diff changeset
19 if (sqrt(c) /= (0., 1.)) call abort ()
kono
parents:
diff changeset
20 d = c
kono
parents:
diff changeset
21 if (sqrt(d) /= (0._8, 1._8)) call abort ()
kono
parents:
diff changeset
22 end
kono
parents:
diff changeset
23