]> gcc.gnu.org Git - gcc.git/commitdiff
re PR fortran/40018 (ICE in output_constructor)
authorPaul Thomas <pault@gcc.gnu.org>
Sun, 10 May 2009 10:22:37 +0000 (10:22 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Sun, 10 May 2009 10:22:37 +0000 (10:22 +0000)
2009-05-10  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/40018
* trans-array.c (gfc_trans_array_constructor_value): Fold
convert numeric constants.
(gfc_build_constant_array_constructor): The same.

2009-05-10  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/40018
* gfortran.dg/array_constructor_31.f90: New test.

From-SVN: r147332

gcc/testsuite/gfortran.dg/array_constructor_31.f90 [new file with mode: 0644]

diff --git a/gcc/testsuite/gfortran.dg/array_constructor_31.f90 b/gcc/testsuite/gfortran.dg/array_constructor_31.f90
new file mode 100644 (file)
index 0000000..0293634
--- /dev/null
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! Test the fix for pr40018 in which the elements in the array
+! constructor would be of default type and this would cause an
+! ICE in the backend because of the type mistmatch with 'i'.
+!
+! Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+!
+  integer(kind=8) :: i
+  write(*,*) [(i, i = 1, 10)]
+  end
This page took 0.07193 seconds and 5 git commands to generate.