aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/associate_17.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.dg/associate_17.f90')
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/associate_17.f9012
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/associate_17.f90 b/gcc-4.9/gcc/testsuite/gfortran.dg/associate_17.f90
new file mode 100644
index 000000000..5c39cf062
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.dg/associate_17.f90
@@ -0,0 +1,12 @@
+! { dg-do run }
+! Test the fix for PR61406
+! Contributed by Adam Hirst <adam@aphirst.karoo.co.uk>
+program test
+ implicit none
+ real :: theta = 1.0
+
+ associate (n => [cos(theta), sin(theta)])
+ if (abs (norm2(n) - 1.0) .gt. 1.0e-4) call abort
+ end associate
+
+end program test