aboutsummaryrefslogtreecommitdiffstats
path: root/test/FrontendFortran
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-06-27 14:22:20 +0000
committerDuncan Sands <baldrick@free.fr>2008-06-27 14:22:20 +0000
commit3921266559c71717e6d93ae6b6be7e5702826551 (patch)
treea03db03f07a125d5cde25099c84058c75bd1d0b4 /test/FrontendFortran
parentaccdef219faa965320ae317f04773cf63f40bab5 (diff)
downloadexternal_llvm-3921266559c71717e6d93ae6b6be7e5702826551.zip
external_llvm-3921266559c71717e6d93ae6b6be7e5702826551.tar.gz
external_llvm-3921266559c71717e6d93ae6b6be7e5702826551.tar.bz2
Regression test for PR2443.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FrontendFortran')
-rw-r--r--test/FrontendFortran/cpow.f9018
-rw-r--r--test/FrontendFortran/dg.exp6
2 files changed, 24 insertions, 0 deletions
diff --git a/test/FrontendFortran/cpow.f90 b/test/FrontendFortran/cpow.f90
new file mode 100644
index 0000000..19ae378
--- /dev/null
+++ b/test/FrontendFortran/cpow.f90
@@ -0,0 +1,18 @@
+! RUN: %llvmgcc -c %s
+! PR2443
+
+! Program to test the power (**) operator
+program testpow
+ implicit none
+ real(kind=4) r, s, two
+ real(kind=8) :: q
+ complex(kind=4) :: c, z
+ real, parameter :: del = 0.0001
+ integer i, j
+
+ two = 2.0
+
+ c = (2.0, 3.0)
+ c = c ** two
+ if (abs(c - (-5.0, 12.0)) .gt. del) call abort
+end program
diff --git a/test/FrontendFortran/dg.exp b/test/FrontendFortran/dg.exp
new file mode 100644
index 0000000..45bffc6
--- /dev/null
+++ b/test/FrontendFortran/dg.exp
@@ -0,0 +1,6 @@
+load_lib llvm.exp
+
+if [ llvm_gcc_supports fortran ] then {
+ RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{f,f90}]]
+}
+