This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/46152] ALLOCATE with type-spec fails for intrinsic types
- From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 25 Oct 2010 04:33:48 +0000
- Subject: [Bug fortran/46152] ALLOCATE with type-spec fails for intrinsic types
- Auto-submitted: auto-generated
- References: <bug-46152-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46152
--- Comment #11 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2010-10-25 04:33:38 UTC ---
On Mon, Oct 25, 2010 at 12:48:10AM +0000, sgk at troutmask dot
apl.washington.edu wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46152
>
> --- Comment #10 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2010-10-25 00:47:49 UTC ---
> Investigating a little more. I could not understand
> why this issue was not caught earlier. Afterall, I
> use 'implicit none' in all the code I write, and I
> wrote a testcase for a type-spec in ALLOACATE. Looking
> in testsuite/ChangeLog I find,
>
The attached patch fixes the problem.
2010-10-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/46152
* testsuite/gfortran.dg/allocate_derived_1.f90: Update test.
* fortran/match.c (match_derived_type_spec): Use gfc_find_symbol()
instead of gfc_match_symbol().
(match_type_spec): Simplify the matching of a derived type. Move
the matching of character length and kind to remove a jump.