public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/21063] New: internal compiler error in gfc_conv_ss_descriptor, at fortran/trans-array.c:1224 after using maxloc function
@ 2005-04-16 22:51 guillemborrell at yahoo dot es
  2005-04-16 23:22 ` [Bug fortran/21063] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: guillemborrell at yahoo dot es @ 2005-04-16 22:51 UTC (permalink / raw)
  To: gcc-bugs

Here's the piece of code:

program bug

real, dimension(100) :: dummy
real, dimension(100) :: foo
integer :: i

do i=1,100
  call random_number(dummy(i))
  call random_number(foo(i))
end do

write(*,*) foo(maxloc(dummy))

end program

and the output.
bash-2.05b$ gfc bug.f90
bug.f90: In function 'MAIN__':
bug.f90:12: internal compiler error: in gfc_conv_ss_descriptor, at
fortran/trans-array.c:1224
Please submit a full bug report,

bash-2.05b$ gfc --version
GNU Fortran 95 (GCC 4.1.0 20050416 (experimental))
Copyright (C) 2005 Free Software Foundation, Inc.

-- 
           Summary: internal compiler error in gfc_conv_ss_descriptor, at
                    fortran/trans-array.c:1224 after using maxloc function
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: guillemborrell at yahoo dot es
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug fortran/21063] internal compiler error in gfc_conv_ss_descriptor, at fortran/trans-array.c:1224 after using maxloc function
  2005-04-16 22:51 [Bug fortran/21063] New: internal compiler error in gfc_conv_ss_descriptor, at fortran/trans-array.c:1224 after using maxloc function guillemborrell at yahoo dot es
@ 2005-04-16 23:22 ` pinskia at gcc dot gnu dot org
  2005-05-29 12:23 ` [Bug fortran/21063] ICE " aj at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-16 23:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-16 23:22 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2005-04-16 23:22:45
               date|                            |


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


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

* [Bug fortran/21063] ICE in gfc_conv_ss_descriptor, at fortran/trans-array.c:1224 after using maxloc function
  2005-04-16 22:51 [Bug fortran/21063] New: internal compiler error in gfc_conv_ss_descriptor, at fortran/trans-array.c:1224 after using maxloc function guillemborrell at yahoo dot es
  2005-04-16 23:22 ` [Bug fortran/21063] " pinskia at gcc dot gnu dot org
@ 2005-05-29 12:23 ` aj at gcc dot gnu dot org
  2005-06-08  8:24 ` c dot lemmen at fz-juelich dot de
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: aj at gcc dot gnu dot org @ 2005-05-29 12:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From aj at gcc dot gnu dot org  2005-05-29 08:44 -------
This ICE happens also with one of the SPEC CPU 2005 candidate benchmarks.

I used:
GNU Fortran 95 (GCC 4.0.1 20050529 (prerelease))
on Linux/x86-64.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|21359                       |15502
              nThis|                            |


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


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

* [Bug fortran/21063] ICE in gfc_conv_ss_descriptor, at fortran/trans-array.c:1224 after using maxloc function
  2005-04-16 22:51 [Bug fortran/21063] New: internal compiler error in gfc_conv_ss_descriptor, at fortran/trans-array.c:1224 after using maxloc function guillemborrell at yahoo dot es
  2005-04-16 23:22 ` [Bug fortran/21063] " pinskia at gcc dot gnu dot org
  2005-05-29 12:23 ` [Bug fortran/21063] ICE " aj at gcc dot gnu dot org
@ 2005-06-08  8:24 ` c dot lemmen at fz-juelich dot de
  2005-08-02 10:50 ` steven at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: c dot lemmen at fz-juelich dot de @ 2005-06-08  8:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From c dot lemmen at fz-juelich dot de  2005-06-08 08:23 -------
The numerical recipes library seems to be affected by this bug in file
src/wtn.f90 with gcc-Version 4.1.0 20050608 (experimental) on linux-x68-smp

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |c dot lemmen at fz-juelich
                   |                            |dot de


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


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

* [Bug fortran/21063] ICE in gfc_conv_ss_descriptor, at fortran/trans-array.c:1224 after using maxloc function
  2005-04-16 22:51 [Bug fortran/21063] New: internal compiler error in gfc_conv_ss_descriptor, at fortran/trans-array.c:1224 after using maxloc function guillemborrell at yahoo dot es
                   ` (2 preceding siblings ...)
  2005-06-08  8:24 ` c dot lemmen at fz-juelich dot de
@ 2005-08-02 10:50 ` steven at gcc dot gnu dot org
  2005-08-02 10:57 ` steven at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-08-02 10:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-08-02 10:50 -------
This is just a complete mis-handling of vector subscripts.  Even without 
using the maxloc intrinsics this ICEs: 
 
$ cat t.f90 
program bug 
integer, dimension(10) :: foo 
write(*,*) foo((/1,3/)) 
end program 
$ ./f951 -fdump-parse-tree t.f90 
 
        Namespace: A-H: (REAL 4) I-N: (INTEGER 4) O-Z: (REAL 4) 
        symtree: foo  Ambig 0 
        symbol foo (INTEGER 4)(VARIABLE UNKNOWN-INTENT UNKNOWN-ACCESS 
UNKNOWN-PROC DIMENSION) 
        Array spec:(1 AS_EXPLICIT 1 10 ) 
 
        symtree: bug  Ambig 0 
        symbol bug (UNKNOWN 0)(PROGRAM UNKNOWN-INTENT UNKNOWN-ACCESS 
UNKNOWN-PROC) 
 
 
      WRITE UNIT=6 FMT=-1 
      TRANSFER foo((/ 1_8 , 3_8 /)) 
      DT_END 
 
 MAIN__ 
t.f90:3: internal compiler error: in gfc_conv_ss_descriptor, at 
fortran/trans-array.c:1264 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
$  
 
 

-- 


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


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

* [Bug fortran/21063] ICE in gfc_conv_ss_descriptor, at fortran/trans-array.c:1224 after using maxloc function
  2005-04-16 22:51 [Bug fortran/21063] New: internal compiler error in gfc_conv_ss_descriptor, at fortran/trans-array.c:1224 after using maxloc function guillemborrell at yahoo dot es
                   ` (3 preceding siblings ...)
  2005-08-02 10:50 ` steven at gcc dot gnu dot org
@ 2005-08-02 10:57 ` steven at gcc dot gnu dot org
  2005-09-13  2:12 ` pinskia at gcc dot gnu dot org
  2005-09-13 19:19 ` reichelt at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-08-02 10:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-08-02 10:57 -------
We die while looking for an array descriptor for the vector subscript: 
  /* For vector array subscripts we want the size of the vector.  */ 
  vecss = ss; 
  while (vecss->data.info.ref->u.ar.dimen_type[dim] == DIMEN_VECTOR) 
    { 
      vecss = vecss->data.info.subscript[dim]; 
      gcc_assert (vecss && vecss->type == GFC_SS_VECTOR); 
      /* Get the descriptors for the vector subscripts as well.  */ 
      if (!vecss->data.info.descriptor) 
        gfc_conv_ss_descriptor (&loop->pre, vecss, !loop->array_parameter); 
      dim = vecss->data.info.dim[0]; 
    } 
 
But gfc_conv_ss_descriptor starts with: 
static void 
gfc_conv_ss_descriptor (stmtblock_t * block, gfc_ss * ss, int base) 
{ 
  gfc_se se; 
  tree tmp; 
 
  /* Get the descriptor for the array to be scalarized.  */ 
  gcc_assert (ss->expr->expr_type == EXPR_VARIABLE); 
  gfc_init_se (&se, NULL); 
 
That assert triggers.  For my small test case, the expr_type is EXPR_ARRAY 
and for the maxloc test case it is EXPR_FUNCTION. 
 
 

-- 


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


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

* [Bug fortran/21063] ICE in gfc_conv_ss_descriptor, at fortran/trans-array.c:1224 after using maxloc function
  2005-04-16 22:51 [Bug fortran/21063] New: internal compiler error in gfc_conv_ss_descriptor, at fortran/trans-array.c:1224 after using maxloc function guillemborrell at yahoo dot es
                   ` (4 preceding siblings ...)
  2005-08-02 10:57 ` steven at gcc dot gnu dot org
@ 2005-09-13  2:12 ` pinskia at gcc dot gnu dot org
  2005-09-13 19:19 ` reichelt at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-13  2:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-13 02:12 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.1.0


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


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

* [Bug fortran/21063] ICE in gfc_conv_ss_descriptor, at fortran/trans-array.c:1224 after using maxloc function
  2005-04-16 22:51 [Bug fortran/21063] New: internal compiler error in gfc_conv_ss_descriptor, at fortran/trans-array.c:1224 after using maxloc function guillemborrell at yahoo dot es
                   ` (5 preceding siblings ...)
  2005-09-13  2:12 ` pinskia at gcc dot gnu dot org
@ 2005-09-13 19:19 ` reichelt at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-09-13 19:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-09-13 19:19 -------
Just for the record:
This was fixed by Richard Sandiford's patch for PR19239:

http://gcc.gnu.org/ml/gcc-cvs/2005-09/msg00346.html


-- 


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


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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-16 22:51 [Bug fortran/21063] New: internal compiler error in gfc_conv_ss_descriptor, at fortran/trans-array.c:1224 after using maxloc function guillemborrell at yahoo dot es
2005-04-16 23:22 ` [Bug fortran/21063] " pinskia at gcc dot gnu dot org
2005-05-29 12:23 ` [Bug fortran/21063] ICE " aj at gcc dot gnu dot org
2005-06-08  8:24 ` c dot lemmen at fz-juelich dot de
2005-08-02 10:50 ` steven at gcc dot gnu dot org
2005-08-02 10:57 ` steven at gcc dot gnu dot org
2005-09-13  2:12 ` pinskia at gcc dot gnu dot org
2005-09-13 19:19 ` reichelt 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).