Bug 28416 - ICE on allocatable codes
Summary: ICE on allocatable codes
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: eedelman
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2006-07-18 07:42 UTC by Salvatore Filippone
Modified: 2006-08-14 19:50 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 4.2.0
Last reconfirmed: 2006-07-18 18:45:00


Attachments
test case (76 bytes, text/plain)
2006-07-18 07:42 UTC, Salvatore Filippone
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Salvatore Filippone 2006-07-18 07:42:04 UTC
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.
Comment 1 Salvatore Filippone 2006-07-18 07:42:49 UTC
Created attachment 11909 [details]
test case
Comment 2 Francois-Xavier Coudert 2006-07-18 10:42:03 UTC
Confirmed, and not target-specific.
Comment 3 Paul Thomas 2006-07-18 14:38:51 UTC
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
Comment 4 eedelman 2006-07-18 18:45:00 UTC
(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.

Comment 5 eedelman 2006-07-24 20:16:10 UTC
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

Comment 6 eedelman 2006-08-14 19:50:22 UTC
Fixed on 4.2. (No need to fix it on 4.1, since allocatable dummies aren't supported there.)