diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2006-02-01 01:03:52 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2006-01-31 17:03:52 -0800 |
commit | f51a281b458a3fd4433a339f99a3ec29504b8959 (patch) | |
tree | e83f3620b518a00126b9852a9bbf074173c665d6 /gcc/testsuite/gfortran.dg | |
parent | 60ec1aa4bc17d19e0a89c9b369caa1cc5b30b0ea (diff) | |
download | gcc-f51a281b458a3fd4433a339f99a3ec29504b8959.zip gcc-f51a281b458a3fd4433a339f99a3ec29504b8959.tar.gz gcc-f51a281b458a3fd4433a339f99a3ec29504b8959.tar.bz2 |
re PR middle-end/26001 (expand uses the wrong part of the string for array accesses)
2006-01-31 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/26001
* gfortran.dg/data_char_2.f90: New.
2006-01-31 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/26001
* expr.c (expand_expr_real_1) <case ARRAY_REF>:
Use the corrected index for the character
out of the string constant.
From-SVN: r110465
Diffstat (limited to 'gcc/testsuite/gfortran.dg')
-rw-r--r-- | gcc/testsuite/gfortran.dg/data_char_2.f90 | 12 |
1 files changed, 12 insertions, 0 deletions
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 |