[Bug fortran/55362] [4.6/4.7/4.8 Regression] ICE with size() on character pointer
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55362 Richard Biener changed: What|Removed |Added Target Milestone|--- |4.6.4
[Bug fortran/55362] [4.6/4.7/4.8 Regression] ICE with size() on character pointer
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55362 Tobias Burnus changed: What|Removed |Added Keywords||ice-on-invalid-code CC||burnus at gcc dot gnu.org --- Comment #2 from Tobias Burnus 2012-12-11 14:46:03 UTC --- Untested patch. However, I think we need to do more. I think it won't cover the DIM= argument and other intrinsics are presumably also affected. --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -3593,4 +3593,11 @@ gfc_try gfc_check_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind) { + if (array->ts.type == BT_PROCEDURE) +{ + gfc_error ("'%s' argument of '%s' intrinsic at %L may not be a procedure", +gfc_current_intrinsic_arg[0]->name, gfc_current_intrinsic, +&array->where); + return FAILURE; +} if (array_check (array, 0) == FAILURE) return FAILURE;
[Bug fortran/55362] [4.6/4.7/4.8 Regression] ICE with size() on character pointer
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55362 Paul Thomas changed: What|Removed |Added CC||pault at gcc dot gnu.org AssignedTo|unassigned at gcc dot |pault at gcc dot gnu.org |gnu.org | --- Comment #3 from Paul Thomas 2013-01-12 16:11:23 UTC --- Applying Tobias' fix to array_check seems to do the job. As to his question about the DIM arg; this and probably many more need such a check. I am surprised that it is not picked up in resolution. ifort gives [pault@localhost pr55789]$ ifort ../pr55362/p*.f90../pr55362/pr55362.f90(3): error #6423: This name has already been used as an external function name. [ERROR_MSG] write(*,*) 'message: ', size(Error_Msg),Error_Msg() ---^ ../pr55362/pr55362.f90(3): error #6361: An array-valued argument is required in this context. [SIZE] write(*,*) 'message: ', size(Error_Msg),Error_Msg() ---^ compilation aborted for ../pr55362/pr55362.f90 (code 1)
[Bug fortran/55362] [4.6/4.7/4.8 Regression] ICE with size() on character pointer
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55362 --- Comment #4 from Paul Thomas 2013-02-09 09:49:52 UTC --- Author: pault Date: Sat Feb 9 09:49:49 2013 New Revision: 195915 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195915 Log: 2013-02-09 Paul Thomas PR fortran/55362 * check.c (array_check): It is an error if a procedure is passed. 2013-02-09 Paul Thomas PR fortran/55362 * gfortran.dg/intrinsic_size_4.f90 : New test. Added: trunk/gcc/testsuite/gfortran.dg/intrinsic_size_4.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/check.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/55362] [4.6/4.7/4.8 Regression] ICE with size() on character pointer
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55362 Dominique d'Humieres changed: What|Removed |Added Priority|P3 |P4 Status|UNCONFIRMED |NEW Last reconfirmed||2012-11-17 Known to work||4.5.3 Ever Confirmed|0 |1 Known to fail||4.6.3, 4.7.2, 4.8.0 --- Comment #1 from Dominique d'Humieres 2012-11-17 10:39:09 UTC --- Marked as NEW.