While testing the patch for TR15581 I encountered this ICE, which is not strictly related to the patch itself, since I reproduced below with the base compiler. The base compiler should refuse the code, the patched compiler should accept it. [sfilippo@localhost ALLOCATABLE]$ gfortran -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.2-20060715/configure --prefix=/usr/local/gcc42 Thread model: posix gcc version 4.2.0 20060715 (experimental) [sfilippo@localhost ALLOCATABLE]$ gfortran -c test2.f90 test2.f90: In function 'foo': test2.f90:1: internal compiler error: in gfc_conv_descriptor_data_get, at fortran/trans-array.c:148 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Created attachment 11909 [details] test case
Confirmed, and not target-specific.
The fix, as described on the list, is to be found in the latest patch to PR20541 - the TR15581 story. It includes the corrections to the going-out-of-scope cleanup, as well. I am sorry that I cannot deal with it; I hope that Erik is in a position to do so. Paul
(In reply to comment #3) > The fix, as described on the list, is to be found in the latest patch to > PR20541 - the TR15581 story. It includes the corrections to the > going-out-of-scope cleanup, as well. > > I am sorry that I cannot deal with it; I hope that Erik is in a position to do > so. I'll see what I can do about it.
Subject: Bug 28416 Author: eedelman Date: Mon Jul 24 20:15:59 2006 New Revision: 115721 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115721 Log: fortran/ 2006-07-24 Erik Edelmann <eedelman@gcc.gnu.org> PR fortran/28416 * trans-array.c (gfc_conv_array_parameter): Give special treatment for ALLOCATABLEs if they are themselves dummy variables. testsuite/ 2006-07-24 Erik Edelmann <eedelman@gcc.gnu.org> PR fortran/28416 * gfortran.dg/allocatable_dummy_3.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/allocatable_dummy_3.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-array.c trunk/gcc/testsuite/ChangeLog
Fixed on 4.2. (No need to fix it on 4.1, since allocatable dummies aren't supported there.)