public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/15809] New: ICE Using Pointer Functions
@ 2004-06-03 20:12 giese025 at tc dot umn dot edu
  2004-06-03 20:13 ` [Bug fortran/15809] " giese025 at tc dot umn dot edu
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: giese025 at tc dot umn dot edu @ 2004-06-03 20:12 UTC (permalink / raw)
  To: gcc-bugs

The file foo.f95 compiles without error nor warning with the NAG f95 compiler
but produces an internal compiler error with g95 (x86 Linux Binary (06/02/04)
from http://www.g95.org).

The error messege produced is:
foo.f95: In function `reallocate_hnv__':
foo.f95:1: internal compiler error: in find_function_data, at function.c:311

This was performed on a Redhat 9 machine.

The program simply contains a function and a subroutine.  The function produces
a pointer of a specified vector length and fills in the array from an input
pointer.  The input pointer is then deallocated.

The function itself will compile fine, but produces the ICE when used in another
subroutine.

foo.f95 will be submitted as an attachment in the next comment.

-- 
           Summary: ICE Using Pointer Functions
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: giese025 at tc dot umn dot edu
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15809


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug fortran/15809] ICE Using Pointer Functions
  2004-06-03 20:12 [Bug fortran/15809] New: ICE Using Pointer Functions giese025 at tc dot umn dot edu
@ 2004-06-03 20:13 ` giese025 at tc dot umn dot edu
  2004-06-03 20:21 ` pinskia at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: giese025 at tc dot umn dot edu @ 2004-06-03 20:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giese025 at tc dot umn dot edu  2004-06-03 20:13 -------
Created an attachment (id=6460)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6460&action=view)
Test program to reproduce ICE

Attached file that reproduces the internal compiler error.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15809


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug fortran/15809] ICE Using Pointer Functions
  2004-06-03 20:12 [Bug fortran/15809] New: ICE Using Pointer Functions giese025 at tc dot umn dot edu
  2004-06-03 20:13 ` [Bug fortran/15809] " giese025 at tc dot umn dot edu
@ 2004-06-03 20:21 ` pinskia at gcc dot gnu dot org
  2004-07-11 17:10 ` tobi at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-03 20:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-03 20:21 -------
There is a different bug in gfortran with this code:
f951: /home/gates/pinskia/src/gnu/gcc/src/gcc/fortran/trans-array.c:184: gfc_conv_descriptor_data: 
Assertion `(__extension__ ({ const tree __t = (type); if (tree_code_type[(int) (((enum tree_code) (__t)-
>common.code))] != ('t')) tree_class_check_failed (__t, ('t'), "/home/gates/pinskia/src/gnu/gcc/src/gcc/
fortran/trans-array.c", 184, __FUNCTION__); __t; })->type.lang_flag_1)' failed.

Note gfortran and g95 are two different projects, gfortran forked off of g95 to so that the source would 
be more available and intergrated with the GCC project, gfortran is now included in snapshots of 3.5.0.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2004-06-03 20:21:06
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15809


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug fortran/15809] ICE Using Pointer Functions
  2004-06-03 20:12 [Bug fortran/15809] New: ICE Using Pointer Functions giese025 at tc dot umn dot edu
  2004-06-03 20:13 ` [Bug fortran/15809] " giese025 at tc dot umn dot edu
  2004-06-03 20:21 ` pinskia at gcc dot gnu dot org
@ 2004-07-11 17:10 ` tobi at gcc dot gnu dot org
  2004-08-25 22:10 ` tobi at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-07-11 17:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-07-11 17:10 -------
Reduced testcase:
  SUBROUTINE A(p,LEN)
    CHARACTER(LEN=LEN), DIMENSION(:), POINTER :: p
    IF ( .NOT. ASSOCIATED(p) ) THEN
    END IF
  END SUBROUTINE A


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15809


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug fortran/15809] ICE Using Pointer Functions
  2004-06-03 20:12 [Bug fortran/15809] New: ICE Using Pointer Functions giese025 at tc dot umn dot edu
                   ` (2 preceding siblings ...)
  2004-07-11 17:10 ` tobi at gcc dot gnu dot org
@ 2004-08-25 22:10 ` tobi at gcc dot gnu dot org
  2004-09-22  7:48 ` c dot lemmen at fz-juelich dot de
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-08-25 22:10 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |17193


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15809


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug fortran/15809] ICE Using Pointer Functions
  2004-06-03 20:12 [Bug fortran/15809] New: ICE Using Pointer Functions giese025 at tc dot umn dot edu
                   ` (3 preceding siblings ...)
  2004-08-25 22:10 ` tobi at gcc dot gnu dot org
@ 2004-09-22  7:48 ` c dot lemmen at fz-juelich dot de
  2004-12-14 17:53 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: c dot lemmen at fz-juelich dot de @ 2004-09-22  7:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From c dot lemmen at fz-juelich dot de  2004-09-22 07:48 -------
Confirmed with GNU F95 version 4.0.0 20040921 on Sep-22, 2004
Problem only occurs when the pointer is an <strong>argument</strong> to the
function and not with logical,real,integer types

Note that this error occurs on line 183 now:
internal compiler error: in gfc_conv_descriptor_data, at fortran/trans-array.c:183


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15809


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug fortran/15809] ICE Using Pointer Functions
  2004-06-03 20:12 [Bug fortran/15809] New: ICE Using Pointer Functions giese025 at tc dot umn dot edu
                   ` (4 preceding siblings ...)
  2004-09-22  7:48 ` c dot lemmen at fz-juelich dot de
@ 2004-12-14 17:53 ` pinskia at gcc dot gnu dot org
  2005-04-03  2:25 ` szalai at mit dot edu
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-14 17:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-14 17:53 -------
*** Bug 18991 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tow21 at cam dot ac dot uk


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15809


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug fortran/15809] ICE Using Pointer Functions
  2004-06-03 20:12 [Bug fortran/15809] New: ICE Using Pointer Functions giese025 at tc dot umn dot edu
                   ` (5 preceding siblings ...)
  2004-12-14 17:53 ` pinskia at gcc dot gnu dot org
@ 2005-04-03  2:25 ` szalai at mit dot edu
  2005-06-05 22:44 ` pault at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: szalai at mit dot edu @ 2005-04-03  2:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From szalai at mit dot edu  2005-04-03 02:25 -------
This also occurs with the MUMPS parallel solver library.  
The testcase testcase in this report now occurs as follows:  
  
test5.f: In function &#8216;a&#8217;:  
test5.f:1: internal compiler error: in gfc_conv_descriptor_data, at  
fortran/trans-array.c:144  
Please submit a full bug report,  
with preprocessed source if appropriate.  
See <URL:http://gcc.gnu.org/bugs.html> for instructions.  
 
The compiler version 
gcc version 4.0.0 20050326 (prerelease) 
(this is a snapshot) 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15809


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug fortran/15809] ICE Using Pointer Functions
  2004-06-03 20:12 [Bug fortran/15809] New: ICE Using Pointer Functions giese025 at tc dot umn dot edu
                   ` (6 preceding siblings ...)
  2005-04-03  2:25 ` szalai at mit dot edu
@ 2005-06-05 22:44 ` pault at gcc dot gnu dot org
  2005-08-30 20:44 ` erik dot edelmann at iki dot fi
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pault at gcc dot gnu dot org @ 2005-06-05 22:44 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 15809 depends on bug 17193, which changed state.

Bug 17193 Summary: [meta-bug] Pointer arguments not working correctly
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17193

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15809


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug fortran/15809] ICE Using Pointer Functions
  2004-06-03 20:12 [Bug fortran/15809] New: ICE Using Pointer Functions giese025 at tc dot umn dot edu
                   ` (7 preceding siblings ...)
  2005-06-05 22:44 ` pault at gcc dot gnu dot org
@ 2005-08-30 20:44 ` erik dot edelmann at iki dot fi
  2005-08-31 19:39 ` tobi at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: erik dot edelmann at iki dot fi @ 2005-08-30 20:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From erik dot edelmann at iki dot fi  2005-08-30 20:28 -------
Hmm ... With current version of gfortran (4.1.0 20050830), the reduced testcase
by Tobias gives the error message

bug.f90: In function 'a':
bug.f90:3: internal compiler error: in gfc_trans_deferred_array, at
fortran/trans-array.c:4005

while the original testcase by Tim gives

bug2.f90: In function 'allocateifneeded_hnv':
bug2.f90:38: internal compiler error: in gfc_conv_function_call, at
fortran/trans-expr.c:1107

I think we are dealing with (at least) two different non-related bugs here.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |erik dot edelmann at iki dot
                   |                            |fi


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15809


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug fortran/15809] ICE Using Pointer Functions
  2004-06-03 20:12 [Bug fortran/15809] New: ICE Using Pointer Functions giese025 at tc dot umn dot edu
                   ` (8 preceding siblings ...)
  2005-08-30 20:44 ` erik dot edelmann at iki dot fi
@ 2005-08-31 19:39 ` tobi at gcc dot gnu dot org
  2005-09-02 11:34 ` tobi at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-08-31 19:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2005-08-31 19:35 -------
Probably Paul Thomas' character fixes play a role in making those two different
bugs.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tobi at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15809


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug fortran/15809] ICE Using Pointer Functions
  2004-06-03 20:12 [Bug fortran/15809] New: ICE Using Pointer Functions giese025 at tc dot umn dot edu
                   ` (9 preceding siblings ...)
  2005-08-31 19:39 ` tobi at gcc dot gnu dot org
@ 2005-09-02 11:34 ` tobi at gcc dot gnu dot org
  2005-09-02 11:58 ` erik dot edelmann at iki dot fi
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-09-02 11:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2005-09-02 11:34 -------
According to Erik Richard's patch for PR15326 fixes one of those two bugs (I
assume the latter?), adding the dependency so that we will keep track of this.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |15326


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15809


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug fortran/15809] ICE Using Pointer Functions
  2004-06-03 20:12 [Bug fortran/15809] New: ICE Using Pointer Functions giese025 at tc dot umn dot edu
                   ` (10 preceding siblings ...)
  2005-09-02 11:34 ` tobi at gcc dot gnu dot org
@ 2005-09-02 11:58 ` erik dot edelmann at iki dot fi
  2005-09-02 15:39 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: erik dot edelmann at iki dot fi @ 2005-09-02 11:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From erik dot edelmann at iki dot fi  2005-09-02 11:56 -------
(In reply to comment #9)
> According to Erik Richard's patch for PR15326 fixes one of those two bugs (I
> assume the latter?), adding the dependency so that we will keep track of this.

Yes, it's the latter bug that Richard's patch fixes.

I could add that I posted a patch to fix the other bug here:
http://gcc.gnu.org/ml/gcc-patches/2005-08/msg01861.html
I'm not yet sure if this is the best way to deal with the problem, though.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15809


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug fortran/15809] ICE Using Pointer Functions
  2004-06-03 20:12 [Bug fortran/15809] New: ICE Using Pointer Functions giese025 at tc dot umn dot edu
                   ` (11 preceding siblings ...)
  2005-09-02 11:58 ` erik dot edelmann at iki dot fi
@ 2005-09-02 15:39 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
  2005-09-06 21:10 ` erik dot edelmann at iki dot fi
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Tobias dot Schlueter at physik dot uni-muenchen dot de @ 2005-09-02 15:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Tobias dot Schlueter at physik dot uni-muenchen dot de  2005-09-02 15:38 -------
Subject: Re:  ICE Using Pointer Functions

erik dot edelmann at iki dot fi wrote:
> Yes, it's the latter bug that Richard's patch fixes.
> 
> I could add that I posted a patch to fix the other bug here:
> http://gcc.gnu.org/ml/gcc-patches/2005-08/msg01861.html
> I'm not yet sure if this is the best way to deal with the problem, though.

I vaguely remember seeing a case where allowing a PARM_DECL fixed a bug, but
wasn't still not quite right.  I'll try to find out what this was (hopefully
I'll have somethign written somewhere on it)

- Tobi


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15809


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug fortran/15809] ICE Using Pointer Functions
  2004-06-03 20:12 [Bug fortran/15809] New: ICE Using Pointer Functions giese025 at tc dot umn dot edu
                   ` (12 preceding siblings ...)
  2005-09-02 15:39 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
@ 2005-09-06 21:10 ` erik dot edelmann at iki dot fi
  2005-09-08 18:51 ` rsandifo at gcc dot gnu dot org
  2005-09-18 19:53 ` tkoenig at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: erik dot edelmann at iki dot fi @ 2005-09-06 21:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From erik dot edelmann at iki dot fi  2005-09-06 21:10 -------
With my patch, the reduced testcase by Tobi compiles, but this slightly longer
testcase doesn't:

$ cat bug7.f90 
SUBROUTINE A(p,LEN)
    CHARACTER(LEN=LEN), DIMENSION(:), POINTER :: p
    IF ( .NOT. ASSOCIATED(p) ) THEN
        allocate(p(1))
    END IF
END SUBROUTINE A
$ gfortran bug7.f90 
bug7.f90: In function 'a':
bug7.f90:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

I'm not yet sure if it is because my patch doesn't solve the bug after all, or
if this is yet another unrelated bug.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15809


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug fortran/15809] ICE Using Pointer Functions
  2004-06-03 20:12 [Bug fortran/15809] New: ICE Using Pointer Functions giese025 at tc dot umn dot edu
                   ` (13 preceding siblings ...)
  2005-09-06 21:10 ` erik dot edelmann at iki dot fi
@ 2005-09-08 18:51 ` rsandifo at gcc dot gnu dot org
  2005-09-18 19:53 ` tkoenig at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2005-09-08 18:51 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 15809 depends on bug 15326, which changed state.

Bug 15326 Summary: ICE with assumed length character strings
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15326

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15809


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug fortran/15809] ICE Using Pointer Functions
  2004-06-03 20:12 [Bug fortran/15809] New: ICE Using Pointer Functions giese025 at tc dot umn dot edu
                   ` (14 preceding siblings ...)
  2005-09-08 18:51 ` rsandifo at gcc dot gnu dot org
@ 2005-09-18 19:53 ` tkoenig at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2005-09-18 19:53 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 15809 depends on bug 15326, which changed state.

Bug 15326 Summary: [4.0 only] ICE with assumed length character strings
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15326

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15809


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2005-09-18 19:53 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-03 20:12 [Bug fortran/15809] New: ICE Using Pointer Functions giese025 at tc dot umn dot edu
2004-06-03 20:13 ` [Bug fortran/15809] " giese025 at tc dot umn dot edu
2004-06-03 20:21 ` pinskia at gcc dot gnu dot org
2004-07-11 17:10 ` tobi at gcc dot gnu dot org
2004-08-25 22:10 ` tobi at gcc dot gnu dot org
2004-09-22  7:48 ` c dot lemmen at fz-juelich dot de
2004-12-14 17:53 ` pinskia at gcc dot gnu dot org
2005-04-03  2:25 ` szalai at mit dot edu
2005-06-05 22:44 ` pault at gcc dot gnu dot org
2005-08-30 20:44 ` erik dot edelmann at iki dot fi
2005-08-31 19:39 ` tobi at gcc dot gnu dot org
2005-09-02 11:34 ` tobi at gcc dot gnu dot org
2005-09-02 11:58 ` erik dot edelmann at iki dot fi
2005-09-02 15:39 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2005-09-06 21:10 ` erik dot edelmann at iki dot fi
2005-09-08 18:51 ` rsandifo at gcc dot gnu dot org
2005-09-18 19:53 ` tkoenig at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).