Bug 24748 - substring of implicitly typed variable not rejected
Summary: substring of implicitly typed variable not rejected
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.1.0
: P3 normal
Target Milestone: ---
Assignee: Asher Langton
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2005-11-08 23:56 UTC by Tobias Schlüter
Modified: 2006-06-30 16:48 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-01-27 20:31:05


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Schlüter 2005-11-08 23:56:37 UTC
schluter@pcl247d:~/src/pr/24643> cat implicit_7.f90
subroutine variant
 ybtable=ylocal(1:2)  ! { dg-error "Unclassifiable" }
end
schluter@pcl247d:~/src/pr/24643> ~/src/gcc/build/gcc/f951 implicit_7.f90
 variant In file implicit_7.f90:3

end
  1
 Internal Error at (1):
 gfc_validate_kind(): Got bad kind
schluter@pcl247d:~/src/pr/24643>
Comment 1 eedelman 2005-11-28 21:19:10 UTC
Confirmed.
Comment 2 Asher Langton 2006-06-21 23:40:08 UTC
Here's a proposed fix:

http://gcc.gnu.org/ml/gcc-patches/2006-06/msg01216.html
Comment 3 Asher Langton 2006-06-22 18:30:33 UTC
Subject: Bug 24748

Author: langton
Date: Thu Jun 22 18:30:18 2006
New Revision: 114901

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114901
Log:
	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.


Added:
    trunk/gcc/testsuite/gfortran.dg/implicit_8.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/primary.c
    trunk/gcc/testsuite/ChangeLog

Comment 4 patchapp@dberlin.org 2006-06-29 21:41:08 UTC
Subject: Bug number PR24748

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-06/msg01216.html
Comment 5 Asher Langton 2006-06-30 16:41:50 UTC
Subject: Bug 24748

Author: langton
Date: Fri Jun 30 16:41:11 2006
New Revision: 115092

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115092
Log:
        PR fortran/24748
        * gfortran.dg/implicit_8.f90: New.

        PR fortran/24748
        * primary.c (gfc_match_rvalue): Don't call
        match_substring for implicit non-character types.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/implicit_8.f90
      - copied unchanged from r114901, trunk/gcc/testsuite/gfortran.dg/implicit_8.f90
Modified:
    branches/gcc-4_1-branch/gcc/fortran/ChangeLog
    branches/gcc-4_1-branch/gcc/fortran/primary.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog

Comment 6 Asher Langton 2006-06-30 16:48:04 UTC
Fix backported to 4.1.