Summary: | [4.6/4.7 Regression] ICE with non-allocatable/pointer deferred-shape array | ||
---|---|---|---|
Product: | gcc | Reporter: | Tobias Burnus <burnus> |
Component: | fortran | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | diagnostic, ice-on-invalid-code |
Priority: | P3 | ||
Version: | 4.7.0 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2011-04-29 05:41:59 |
Description
Tobias Burnus
2011-04-28 08:35:30 UTC
(In reply to comment #0) > real :: dr(4) s/dr(4)/dr(:)/ to reproduce the ICE. If one places a break point in resolve_fl_var_and_proc, one sees that for sym->name == "dr", the type is: sym->as->type == AS_ASSUMED_SHAPE -- rather than the expected AS_DEFERRED_SHAPE. If it had the latter, a proper error message would have been printed. My impression is that the problem occurs because "dr" is also a dummy argument; the change from AS_DEFERRED_SHAPE to AS_ASSUMED_SHAPE is done at resolve_formal_arglist for dummy arguments. Maybe one should check for attr.flavor != FL_PROCEDURE before doing the change. Author: burnus Date: Fri Apr 29 16:49:53 2011 New Revision: 173175 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173175 Log: 2011-04-29 Tobias Burnus <burnus@net-b.de> PR fortran/48810 * resolve.c (resolve_typebound_generic_call): Don't check access flags of the specific function. PR fortran/48800 * resolve.c (resolve_formal_arglist): Don't change AS_DEFERRED to AS_ASSUMED_SHAPE for function results. (resolve_fl_var_and_proc): Print also for function results with AS_DEFERRED an error, if they are not a pointer or allocatable. (resolve_types): Make sure arguments of procedures in interface blocks are resolved. 2011-04-29 Tobias Burnus <burnus@net-b.de> PR fortran/48810 * gfortran.dg/typebound_proc_22.f90: New. PR fortran/48800 * gfortran.dg/interface_36.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/interface_36.f90 trunk/gcc/testsuite/gfortran.dg/typebound_proc_22.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog Author: burnus Date: Fri Apr 29 21:26:07 2011 New Revision: 173191 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173191 Log: 2011-04-29 Tobias Burnus <burnus@net-b.de> PR fortran/48810 * resolve.c (resolve_typebound_generic_call): Don't check access flags of the specific function. PR fortran/48800 * resolve.c (resolve_formal_arglist): Don't change AS_DEFERRED to AS_ASSUMED_SHAPE for function results. (resolve_fl_var_and_proc): Print also for function results with AS_DEFERRED an error, if they are not a pointer or allocatable. (resolve_types): Make sure arguments of procedures in interface blocks are resolved. 2011-04-29 Tobias Burnus <burnus@net-b.de> PR fortran/48810 * gfortran.dg/typebound_proc_22.f90: New. PR fortran/48800 * gfortran.dg/interface_36.f90: New. Added: branches/gcc-4_6-branch/gcc/testsuite/gfortran.dg/interface_36.f90 branches/gcc-4_6-branch/gcc/testsuite/gfortran.dg/typebound_proc_22.f90 Modified: branches/gcc-4_6-branch/gcc/fortran/ChangeLog branches/gcc-4_6-branch/gcc/fortran/resolve.c branches/gcc-4_6-branch/gcc/testsuite/ChangeLog FIXED Author: burnus Date: Sat Apr 30 15:54:49 2011 New Revision: 173219 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173219 Log: 2011-04-30 Tobias Burnus <burnus@net-b.de> PR fortran/48800 * decl.c (gfc_match_import): Don't try to find the symbol if already found. 2011-04-30 Tobias Burnus <burnus@net-b.de> PR fortran/48800 * gfortran.dg/interface_37.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/interface_37.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/decl.c trunk/gcc/testsuite/ChangeLog (In reply to comment #6) > New Revision: 173219 > URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173219 Wrong bug number; that was for PR 48821. |