public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/18883] New:  ICE in gfc_finish_var_decl
@ 2004-12-08  9:26 Thomas dot Koenig at online dot de
  2004-12-08 14:55 ` [Bug fortran/18883] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Thomas dot Koenig at online dot de @ 2004-12-08  9:26 UTC (permalink / raw)
  To: gcc-bugs

Test case from a post on comp.lang.fortran.

$ cat dud.f90
!From: "James Van Buskirk" <not_valid@comcast.net>
!Newsgroups: comp.lang.fortran
!Subject: Re: sizeof equivalent in fortran 90 programs
!Message-ID: <5wytd.155433$V41.152238@attbi_s52>
!Organization: Comcast Online
!Date: Wed, 08 Dec 2004 08:00:01 GMT
!
!"Rich Townsend" <rhdt@barVOIDtol.udel.edu> wrote in message
!news:cp5v6s$8l6$1@scrotar.nss.udel.edu...
!
!>                                 Apologies for overlooking your post.
!
!No problem.  It just gave me an opportunity to get on my hobby
!horse about initialization expressions.  Regarding my hobby
!horse about specification expressions, try using CVF to compile:
!
module helper
   implicit none
   contains
      function dud(x)
         integer, intent(in) :: x
         character(selected_int_kind(x)+2) dud

         dud = repeat('x',len(dud))
      end function dud
end module helper

program sik
   use helper
   implicit none
   integer i
   integer, parameter :: s(-5:5) = (/(selected_int_kind(i),i=-5,5)/)

   do i = -5, 5
      write(*,'(4i4)') i,selected_int_kind(i),s(i),len(dud(i))-2
   end do
end program sik

!and compare with lf95 or g95.
!
!--
!write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, &
!6.0134700243160014d-154/),(/'x'/)); end
$ gfortran dud.f90
dud.f90: In function 'dud':
dud.f90:20: internal compiler error: in gfc_finish_var_decl, at
fortran/trans-decl.c:416
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
$ gfortran -v
Reading specs from /home/ig25/lib/gcc/i686-pc-linux-gnu/4.0.0/specs
Configured with: ../gcc/configure --prefix=/home/ig25
--enable-languages=c,c++,f95 --disable-shared : (reconfigured) ../gcc/configure
--prefix=/home/ig25 --disable-shared
--with-gcc-version-trigger=/home/ig25/gcc/gcc/version.c
--enable-languages=c,c++,f95 --no-create --no-recursion
Thread model: posix
gcc version 4.0.0 20041206 (experimental)
$

-- 
           Summary:  ICE in gfc_finish_var_decl
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Thomas dot Koenig at online dot de
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug fortran/18883] ICE in gfc_finish_var_decl
  2004-12-08  9:26 [Bug fortran/18883] New: ICE in gfc_finish_var_decl Thomas dot Koenig at online dot de
@ 2004-12-08 14:55 ` pinskia at gcc dot gnu dot org
  2004-12-08 14:56 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-08 14:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-08 14:54 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-12-08 14:54:27
               date|                            |
            Summary| ICE in gfc_finish_var_decl |ICE in gfc_finish_var_decl


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


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

* [Bug fortran/18883] ICE in gfc_finish_var_decl
  2004-12-08  9:26 [Bug fortran/18883] New: ICE in gfc_finish_var_decl Thomas dot Koenig at online dot de
  2004-12-08 14:55 ` [Bug fortran/18883] " pinskia at gcc dot gnu dot org
@ 2004-12-08 14:56 ` pinskia at gcc dot gnu dot org
  2005-02-16  8:35 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-08 14:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-08 14:56 -------
Might be related to PR 15164.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |15164


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


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

* [Bug fortran/18883] ICE in gfc_finish_var_decl
  2004-12-08  9:26 [Bug fortran/18883] New: ICE in gfc_finish_var_decl Thomas dot Koenig at online dot de
  2004-12-08 14:55 ` [Bug fortran/18883] " pinskia at gcc dot gnu dot org
  2004-12-08 14:56 ` pinskia at gcc dot gnu dot org
@ 2005-02-16  8:35 ` pinskia at gcc dot gnu dot org
  2005-02-16  9:14 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-16  8:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-16 03:31 -------
Only the module is needed to reproduce the bug:
module helper
   implicit none
   contains
      function dud(x)
         integer, intent(in) :: x
         character(selected_int_kind(x)+2) dud

         dud(1:1) = 'c'
      end function dud
end module helper

-- 


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


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

* [Bug fortran/18883] ICE in gfc_finish_var_decl
  2004-12-08  9:26 [Bug fortran/18883] New: ICE in gfc_finish_var_decl Thomas dot Koenig at online dot de
                   ` (2 preceding siblings ...)
  2005-02-16  8:35 ` pinskia at gcc dot gnu dot org
@ 2005-02-16  9:14 ` pinskia at gcc dot gnu dot org
  2005-04-21  8:45 ` reichelt at gcc dot gnu dot org
  2005-05-01 14:14 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-16  9:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-16 03:32 -------
*** Bug 19971 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sfilippone at uniroma2 dot
                   |                            |it


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


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

* [Bug fortran/18883] ICE in gfc_finish_var_decl
  2004-12-08  9:26 [Bug fortran/18883] New: ICE in gfc_finish_var_decl Thomas dot Koenig at online dot de
                   ` (3 preceding siblings ...)
  2005-02-16  9:14 ` pinskia at gcc dot gnu dot org
@ 2005-04-21  8:45 ` reichelt at gcc dot gnu dot org
  2005-05-01 14:14 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-04-21  8:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-04-21 08:44 -------
Here's a similar testcase that crashes in the same spot:

======================================
module FOO
contains
    function BAR(X)
        character(*)      :: X
        character(len(X)) :: BAR
        BAR = 'c'
    end function
end
======================================


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
           Keywords|                            |monitored


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


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

* [Bug fortran/18883] ICE in gfc_finish_var_decl
  2004-12-08  9:26 [Bug fortran/18883] New: ICE in gfc_finish_var_decl Thomas dot Koenig at online dot de
                   ` (4 preceding siblings ...)
  2005-04-21  8:45 ` reichelt at gcc dot gnu dot org
@ 2005-05-01 14:14 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-01 14:14 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 18883 depends on bug 15164, which changed state.

Bug 15164 Summary: trans-decl.c:411: gfc_finish_var_decl: Assertion failed
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15164

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

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


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

* [Bug fortran/18883] ICE in gfc_finish_var_decl
       [not found] <bug-18883-9515@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2005-12-27 22:09 ` eedelman at gcc dot gnu dot org
@ 2006-01-01  5:34 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-01  5:34 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.0


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



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

* [Bug fortran/18883] ICE in gfc_finish_var_decl
       [not found] <bug-18883-9515@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2005-11-11 12:18 ` eedelman at gcc dot gnu dot org
@ 2005-12-27 22:09 ` eedelman at gcc dot gnu dot org
  2006-01-01  5:34 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 13+ messages in thread
From: eedelman at gcc dot gnu dot org @ 2005-12-27 22:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from eedelman at gcc dot gnu dot org  2005-12-27 22:09 -------
(In reply to comment #9)
> Fixed on 4.1.  Not yet fixed on 4.0, because it depends on PR 15326 which
> hasn't been fixed for 4.0.

PR 15326 will not be fixed for 4.0, I presume, so neither will this. Thus I
consider this as fixed it is going to get.


-- 

eedelman at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug fortran/18883] ICE in gfc_finish_var_decl
       [not found] <bug-18883-9515@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2005-10-30 22:43 ` eedelman at gcc dot gnu dot org
@ 2005-11-11 12:18 ` eedelman at gcc dot gnu dot org
  2005-12-27 22:09 ` eedelman at gcc dot gnu dot org
  2006-01-01  5:34 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 13+ messages in thread
From: eedelman at gcc dot gnu dot org @ 2005-11-11 12:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from eedelman at gcc dot gnu dot org  2005-11-11 12:18 -------
Fixed on 4.1.  Not yet fixed on 4.0, because it depends on PR 15326 which
hasn't been fixed for 4.0.


-- 

eedelman at gcc dot gnu dot org changed:

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


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


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

* [Bug fortran/18883] ICE in gfc_finish_var_decl
       [not found] <bug-18883-9515@http.gcc.gnu.org/bugzilla/>
  2005-10-27 10:26 ` eedelman at gcc dot gnu dot org
  2005-10-27 10:28 ` eedelman at gcc dot gnu dot org
@ 2005-10-30 22:43 ` eedelman at gcc dot gnu dot org
  2005-11-11 12:18 ` eedelman at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: eedelman at gcc dot gnu dot org @ 2005-10-30 22:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from eedelman at gcc dot gnu dot org  2005-10-30 22:43 -------
Subject: Bug 18883

Author: eedelman
Date: Sun Oct 30 22:43:45 2005
New Revision: 106254

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106254
Log:
fortran/
2005-10-30  Erik Edelmann  <eedelman@gcc.gnu.org>

        PR fortran/18883
        * trans-decl.c (gfc_finish_var_decl): Add decl to the
        current function, rather than the parent.  Make
        assertion accept fake result variables.
        * trans-expr.c (gfc_conv_variable): If the character
        length of an ENTRY isn't set, get the length from
        the master function instead.

testsuite
2005-10-30  Erik Edelmann  <eedelman@gcc.gnu.org>

        PR fortran/18883
        * gfortran.dg/char_result_9.f90: New.
        * gfortran.dg/char_result_10.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/char_result_10.f90
    trunk/gcc/testsuite/gfortran.dg/char_result_9.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/18883] ICE in gfc_finish_var_decl
       [not found] <bug-18883-9515@http.gcc.gnu.org/bugzilla/>
  2005-10-27 10:26 ` eedelman at gcc dot gnu dot org
@ 2005-10-27 10:28 ` eedelman at gcc dot gnu dot org
  2005-10-30 22:43 ` eedelman at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: eedelman at gcc dot gnu dot org @ 2005-10-27 10:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from eedelman at gcc dot gnu dot org  2005-10-27 10:28 -------
Patch here: http://gcc.gnu.org/ml/fortran/2005-10/msg00587.html


-- 

eedelman at gcc dot gnu dot org changed:

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


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


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

* [Bug fortran/18883] ICE in gfc_finish_var_decl
       [not found] <bug-18883-9515@http.gcc.gnu.org/bugzilla/>
@ 2005-10-27 10:26 ` eedelman at gcc dot gnu dot org
  2005-10-27 10:28 ` eedelman at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: eedelman at gcc dot gnu dot org @ 2005-10-27 10:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from eedelman at gcc dot gnu dot org  2005-10-27 10:26 -------
*** Bug 24503 has been marked as a duplicate of this bug. ***


-- 

eedelman at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |r dot butel at epoc dot u-
                   |                            |bordeaux1 dot fr


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


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

end of thread, other threads:[~2006-01-01  5:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-08  9:26 [Bug fortran/18883] New: ICE in gfc_finish_var_decl Thomas dot Koenig at online dot de
2004-12-08 14:55 ` [Bug fortran/18883] " pinskia at gcc dot gnu dot org
2004-12-08 14:56 ` pinskia at gcc dot gnu dot org
2005-02-16  8:35 ` pinskia at gcc dot gnu dot org
2005-02-16  9:14 ` pinskia at gcc dot gnu dot org
2005-04-21  8:45 ` reichelt at gcc dot gnu dot org
2005-05-01 14:14 ` pinskia at gcc dot gnu dot org
     [not found] <bug-18883-9515@http.gcc.gnu.org/bugzilla/>
2005-10-27 10:26 ` eedelman at gcc dot gnu dot org
2005-10-27 10:28 ` eedelman at gcc dot gnu dot org
2005-10-30 22:43 ` eedelman at gcc dot gnu dot org
2005-11-11 12:18 ` eedelman at gcc dot gnu dot org
2005-12-27 22:09 ` eedelman at gcc dot gnu dot org
2006-01-01  5:34 ` pinskia 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).