public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/37735]  New: Allocatable components in vectors of derived types cause ICE on assignment
@ 2008-10-04 22:45 saw44 at cam dot ac dot uk
  2008-10-05 13:00 ` [Bug fortran/37735] " dominiq at lps dot ens dot fr
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: saw44 at cam dot ac dot uk @ 2008-10-04 22:45 UTC (permalink / raw)
  To: gcc-bugs

$ gfortran-4.exe -v -save-temps -c PrettyPix.f95
Using built-in specs.
Target: i686-pc-cygwin
Configured with: /gnu/gcc/release/gcc4-4.3.2-1/src/gcc-4.3.2/configure
--srcdir=/gnu/gcc/release/gcc4-4.3.2-1/src/gcc-4.3.2 --prefix=/usr
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/sbin
--localstatedir=/var --sysconfdir=/etc --datadir=/usr/share
--infodir=/usr/share/info --mandir=/usr/share/man -v --with-gmp=/usr
--with-mpfr=/usr --enable-bootstrap --enable-version-specific-runtime-libs
--with-slibdir=/usr/bin --libexecdir=/usr/lib --enable-static --enable-shared
--enable-shared-libgcc --enable-__cxa_atexit --with-gnu-ld --with-gnu-as
--with-dwarf2 --disable-sjlj-exceptions
--enable-languages=ada,c,c++,fortran,java,objc,obj-c++ --disable-symvers
--enable-libjava --program-suffix=-4
Thread model: single
gcc version 4.3.2 20080827 (alpha-testing) 1 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-mtune=generic'
 /usr/lib/gcc/i686-pc-cygwin/4.3.2/f951.exe PrettyPix.f95 -quiet -dumpbase
PrettyPix.f95 -mtune=generic -auxbase PrettyPix -version
-fintrinsic-modules-path finclude -o PrettyPix.s
GNU F95 (GCC) version 4.3.2 20080827 (alpha-testing) 1 (i686-pc-cygwin)
        compiled by GNU C version 4.3.2 20080827 (alpha-testing) 1, GMP version
4.2.3, MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
PrettyPix.f95: In function 'scene_set_look_at_path':
PrettyPix.f95:19: internal compiler error: in
gfc_conv_descriptor_data_set_internal, at fortran/trans-array.c:174
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


PrettyPix.f95:
======================

module PrettyPix_module

  implicit none

  type Spline
     real, allocatable, dimension(:) ::y2
  end type Spline

  type Path
     type(Spline) :: r(3)
  end type Path

  type Scene
     type(path) :: look_at_path
  end type Scene

contains

  subroutine scene_set_look_at_path(this,p)
    type(scene), intent(inout) :: this
    type(path),  intent(in)    :: p
    this%look_at_path = p
  end subroutine scene_set_look_at_path

end module PrettyPix_module

===================

The problem seems to disappear if r(3) -> r


-- 
           Summary: Allocatable components in vectors of derived types cause
                    ICE on assignment
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: saw44 at cam dot ac dot uk
 GCC build triplet: 4.3.2 20080827 (alpha-testing) 1 (GCC)
GCC target triplet: i686-pc-cygwin


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


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

* [Bug fortran/37735] Allocatable components in vectors of derived types cause ICE on assignment
  2008-10-04 22:45 [Bug fortran/37735] New: Allocatable components in vectors of derived types cause ICE on assignment saw44 at cam dot ac dot uk
@ 2008-10-05 13:00 ` dominiq at lps dot ens dot fr
  2008-11-22  9:01 ` pault at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens dot fr @ 2008-10-05 13:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dominiq at lps dot ens dot fr  2008-10-05 12:58 -------
Confirmed on (powerpc|i686)-apple-darwin9.


-- 


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


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

* [Bug fortran/37735] Allocatable components in vectors of derived types cause ICE on assignment
  2008-10-04 22:45 [Bug fortran/37735] New: Allocatable components in vectors of derived types cause ICE on assignment saw44 at cam dot ac dot uk
  2008-10-05 13:00 ` [Bug fortran/37735] " dominiq at lps dot ens dot fr
@ 2008-11-22  9:01 ` pault at gcc dot gnu dot org
  2008-11-22  9:11 ` pault at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-11-22  9:01 UTC (permalink / raw)
  To: gcc-bugs



-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-11-22 09:00:28
               date|                            |


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


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

* [Bug fortran/37735] Allocatable components in vectors of derived types cause ICE on assignment
  2008-10-04 22:45 [Bug fortran/37735] New: Allocatable components in vectors of derived types cause ICE on assignment saw44 at cam dot ac dot uk
  2008-10-05 13:00 ` [Bug fortran/37735] " dominiq at lps dot ens dot fr
  2008-11-22  9:01 ` pault at gcc dot gnu dot org
@ 2008-11-22  9:11 ` pault at gcc dot gnu dot org
  2008-11-22 16:58 ` pault at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-11-22  9:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pault at gcc dot gnu dot org  2008-11-22 09:09 -------
Oddly,

  type Path
     type(Spline), allocatable :: r(:)
  end type Path

compiles OK:-)

Given that the ICE is caused by
   gcc_assert (GFC_DESCRIPTOR_TYPE_P (type))

it must be that the type(Spline) :: r(3), which is definitely not a descriptor
type, is incorrectly being treated as if it is.  The allocatable component code
in trans-array.c is meant to handle this, so there is a coding error somewhere.

I'm on to it:-)

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2008-11-22 09:00:28         |2008-11-22 09:09:50
               date|                            |


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


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

* [Bug fortran/37735] Allocatable components in vectors of derived types cause ICE on assignment
  2008-10-04 22:45 [Bug fortran/37735] New: Allocatable components in vectors of derived types cause ICE on assignment saw44 at cam dot ac dot uk
                   ` (2 preceding siblings ...)
  2008-11-22  9:11 ` pault at gcc dot gnu dot org
@ 2008-11-22 16:58 ` pault at gcc dot gnu dot org
  2008-11-23 21:37 ` pault at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-11-22 16:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pault at gcc dot gnu dot org  2008-11-22 16:57 -------
Created an attachment (id=16749)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16749&action=view)
Provisional fix for PR

This is half way through regtesting - have to go to a movie, so will see
later:-)

Paul


-- 


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


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

* [Bug fortran/37735] Allocatable components in vectors of derived types cause ICE on assignment
  2008-10-04 22:45 [Bug fortran/37735] New: Allocatable components in vectors of derived types cause ICE on assignment saw44 at cam dot ac dot uk
                   ` (3 preceding siblings ...)
  2008-11-22 16:58 ` pault at gcc dot gnu dot org
@ 2008-11-23 21:37 ` pault at gcc dot gnu dot org
  2008-11-29 17:53 ` pault at gcc dot gnu dot org
  2008-11-29 17:55 ` pault at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-11-23 21:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pault at gcc dot gnu dot org  2008-11-23 21:36 -------
Subject: Bug 37735

Author: pault
Date: Sun Nov 23 21:34:44 2008
New Revision: 142142

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142142
Log:
2008-11-23  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/37735
        * trans-array.c (structure_alloc_comps): Do not duplicate the
        descriptor if this is a descriptorless array!

2008-11-23  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/37735
        * gfortran.dg/alloc_comp_assign_7.f90: New test.



Added:
    trunk/gcc/testsuite/gfortran.dg/alloc_comp_assign_7.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/37735] Allocatable components in vectors of derived types cause ICE on assignment
  2008-10-04 22:45 [Bug fortran/37735] New: Allocatable components in vectors of derived types cause ICE on assignment saw44 at cam dot ac dot uk
                   ` (4 preceding siblings ...)
  2008-11-23 21:37 ` pault at gcc dot gnu dot org
@ 2008-11-29 17:53 ` pault at gcc dot gnu dot org
  2008-11-29 17:55 ` pault at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-11-29 17:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pault at gcc dot gnu dot org  2008-11-29 17:52 -------
Subject: Bug 37735

Author: pault
Date: Sat Nov 29 17:51:03 2008
New Revision: 142282

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142282
Log:
2008-11-29  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/37735
        * trans-array.c (structure_alloc_comps): Do not duplicate the
        descriptor if this is a descriptorless array!

2008-11-29  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/37735
        * gfortran.dg/alloc_comp_assign_7.f90: New test.



Added:
    branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/alloc_comp_assign_7.f90
Modified:
    branches/gcc-4_3-branch/gcc/fortran/ChangeLog
    branches/gcc-4_3-branch/gcc/fortran/trans-array.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/37735] Allocatable components in vectors of derived types cause ICE on assignment
  2008-10-04 22:45 [Bug fortran/37735] New: Allocatable components in vectors of derived types cause ICE on assignment saw44 at cam dot ac dot uk
                   ` (5 preceding siblings ...)
  2008-11-29 17:53 ` pault at gcc dot gnu dot org
@ 2008-11-29 17:55 ` pault at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-11-29 17:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pault at gcc dot gnu dot org  2008-11-29 17:54 -------
Fixed on trunk and 4.3.

Thanks for the report.

Paul


-- 

pault at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2008-11-29 17:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-04 22:45 [Bug fortran/37735] New: Allocatable components in vectors of derived types cause ICE on assignment saw44 at cam dot ac dot uk
2008-10-05 13:00 ` [Bug fortran/37735] " dominiq at lps dot ens dot fr
2008-11-22  9:01 ` pault at gcc dot gnu dot org
2008-11-22  9:11 ` pault at gcc dot gnu dot org
2008-11-22 16:58 ` pault at gcc dot gnu dot org
2008-11-23 21:37 ` pault at gcc dot gnu dot org
2008-11-29 17:53 ` pault at gcc dot gnu dot org
2008-11-29 17:55 ` pault 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).