diff options
author | Asher Langton <langton2@llnl.gov> | 2006-06-22 18:30:18 +0000 |
---|---|---|
committer | Asher Langton <langton@gcc.gnu.org> | 2006-06-22 18:30:18 +0000 |
commit | 5270c302f0ef520b9f6f96a1c94caa5962754401 (patch) | |
tree | 8305c361f234badfe3ead042bf6a015cb6dea8cd /gcc/testsuite | |
parent | 752c5e547d44cb973eb70f8ec2158107c0f0dc97 (diff) | |
download | gcc-5270c302f0ef520b9f6f96a1c94caa5962754401.zip gcc-5270c302f0ef520b9f6f96a1c94caa5962754401.tar.gz gcc-5270c302f0ef520b9f6f96a1c94caa5962754401.tar.bz2 |
re PR fortran/24748 (substring of implicitly typed variable not rejected)
PR fortran/24748
* primary.c (gfc_match_rvalue): Don't call match_substring for
implicit non-character types.
PR fortran/24748
* gfortran.dg/implicit_8.f90: New.
From-SVN: r114901
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/implicit_8.f90 | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e7d6f9d..8731952 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-06-22 Asher Langton <langton2@llnl.gov> + + PR fortran/24748 + * gfortran.dg/implicit_8.f90: New. + 2006-06-22 Zdenek Dvorak <dvorakz@suse.cz> PR rtl-optimization/28121 diff --git a/gcc/testsuite/gfortran.dg/implicit_8.f90 b/gcc/testsuite/gfortran.dg/implicit_8.f90 new file mode 100644 index 0000000..bdd11e6 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/implicit_8.f90 @@ -0,0 +1,16 @@ +! { dg-do compile } +! PR 24748 + +! The compiler used to crash trying to take a substring of an implicit +! real scalar. +subroutine variant1 + ybtable=ylocal(1:2) ! { dg-error "Syntax error in argument list" } +end + +! We want the behavior to be the same whether ylocal is implicitly +! or explicitly typed. +subroutine variant2 + real ylocal + ybtable=ylocal(1:2) ! { dg-error "Syntax error in argument list" } +end + |