summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/vector_subscript_4.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/vector_subscript_4.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/vector_subscript_4.f9013
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/vector_subscript_4.f90 b/gcc/testsuite/gfortran.dg/vector_subscript_4.f90
new file mode 100644
index 000000000..5c341dab4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/vector_subscript_4.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! Test the fix for PR37903, in which the temporary for the vector index
+! got the wrong size.
+!
+! Contributed by Mikael Morin <mikael.morin@tele2.fr>
+!
+ integer :: i(-1:1) = 1, j(3) = 1, k(3)
+ k = j((/1,1,1/)+i)
+ end
+! { dg-final { scan-tree-dump-times "A\.2\\\[3\\\]" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }