aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2009-05-10 10:22:37 +0000
committerPaul Thomas <pault@gcc.gnu.org>2009-05-10 10:22:37 +0000
commit082b1749a179b056f33db0e6971ad1edeca17cdc (patch)
tree971cb8f34212da898379b9b1229f40cf1e017303 /gcc
parent110ea21a35fb1ef78b0f6a38567446417f04e364 (diff)
downloadgcc-082b1749a179b056f33db0e6971ad1edeca17cdc.zip
gcc-082b1749a179b056f33db0e6971ad1edeca17cdc.tar.gz
gcc-082b1749a179b056f33db0e6971ad1edeca17cdc.tar.bz2
re PR fortran/40018 (ICE in output_constructor)
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_31.f9010
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_31.f90 b/gcc/testsuite/gfortran.dg/array_constructor_31.f90
new file mode 100644
index 0000000..0293634
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_constructor_31.f90
@@ -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