From f51a281b458a3fd4433a339f99a3ec29504b8959 Mon Sep 17 00:00:00 2001 From: Andrew Pinski Date: Wed, 1 Feb 2006 01:03:52 +0000 Subject: re PR middle-end/26001 (expand uses the wrong part of the string for array accesses) 2006-01-31 Andrew Pinski PR middle-end/26001 * gfortran.dg/data_char_2.f90: New. 2006-01-31 Andrew Pinski PR middle-end/26001 * expr.c (expand_expr_real_1) : Use the corrected index for the character out of the string constant. From-SVN: r110465 --- gcc/testsuite/gfortran.dg/data_char_2.f90 | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/data_char_2.f90 (limited to 'gcc/testsuite/gfortran.dg') diff --git a/gcc/testsuite/gfortran.dg/data_char_2.f90 b/gcc/testsuite/gfortran.dg/data_char_2.f90 new file mode 100644 index 0000000..3e021b1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/data_char_2.f90 @@ -0,0 +1,12 @@ +! { dg-do run } +! Test that getting a character from a +! string data works. + +CHARACTER*10 INTSTR +CHARACTER C1 +DATA INTSTR / '0123456789' / + +C1 = INTSTR(1:1) +if(C1 .ne. '0') call abort() + +end -- cgit v1.1