public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/24426]  New: gfortran ICE for valid derived type definition with default initialization
@ 2005-10-18 11:03 sven dot buijssen at math dot uni-dortmund dot de
  2005-10-18 13:42 ` [Bug fortran/24426] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: sven dot buijssen at math dot uni-dortmund dot de @ 2005-10-18 11:03 UTC (permalink / raw)
  To: gcc-bugs

The following testcase gives an internal compiler error with both gfortran
4.0.2 and gfortran 4.1.0 20051015:

module crash
  implicit none
  type foo
    integer :: i = 0
    type (foo), pointer :: next
  end type foo
  type (foo), save :: bar
end module crash

Remove the default initialization with 0 and it compiles just fine.
(Remove the pointer declaration in the derived type and it compiles fine.
 Remove the declaration of variable bar and it compiles fine.)

It reminds me a bit of bug 16606, but is different as the compiler crashes.

Test case compiles fine with ifort Version 9.0 Build 20050809Z, G95 (GCC 4.0.1
(g95!) Oct 16 2005).

-- gfortran 4.1 20051015 output: --
% /usr/local/gcc-4.1-20051015/bin/gfortran -v -save-temps -c
bug-gfortran-4.1.f90
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.1-20051015/configure --enable-shared
--prefix=/usr/local/gcc-4.1-20051015 --enable-languages=c,c++,fortran
--enable-threads --enable-__cxa_atexit
Thread model: posix
gcc version 4.1.0 20051015 (experimental)
 /usr/local/gcc-4.1-20051015/libexec/gcc/i686-pc-linux-gnu/4.1.0/f951
bug-gfortran-4.1.f90 -quiet -dumpbase bug-gfortran-4.1.f90 -mtune=pentiumpro
-auxbase bug-gfortran-4.1 -version -o bug-gfortran-4.1.s
GNU F95 version 4.1.0 20051015 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 4.1.0 20051015 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
bug-gfortran-4.1.f90:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.


-- gfortran 4.0.2 output: --
/usr/local/gcc-4.0.2/bin/gfortran -v -save-temps -c bug-gfortran-4.1.f90
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.0.2/configure --enable-shared
--prefix=/usr/local/gcc-4.0.2 --enable-languages=c,c++,f95 --enable-threads
--enable-__cxa_atexit
Thread model: posix
gcc version 4.0.2
 /usr/local/gcc-4.0.2/libexec/gcc/i686-pc-linux-gnu/4.0.2/f951
bug-gfortran-4.1.f90 -quiet -dumpbase bug-gfortran-4.1.f90 -mtune=pentiumpro
-auxbase bug-gfortran-4.1 -version -o bug-gfortran-4.1.s
GNU F95 version 4.0.2 (i686-pc-linux-gnu)
        compiled by GNU C version 4.0.2.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
bug-gfortran-4.1.f90:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.


Environment:
System: Linux antares 2.6.8-24.17-bigsmp #1 SMP Tue Jul 19 08:56:33 UTC 2005
i686 unknown unknown GNU/Linux
Architecture: i686
Linux 2.6.8-24.17-bigsmp
glibc 2.3.4
SuSE 9.2
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu

% cat /proc/cpuinfo  | grep "model name"
model name      : AMD Opteron(tm) Processor 250


-- 
           Summary: gfortran ICE for valid derived type definition with
                    default initialization
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sven dot buijssen at math dot uni-dortmund dot de
 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=24426


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

* [Bug fortran/24426] gfortran ICE for valid derived type definition with default initialization
  2005-10-18 11:03 [Bug fortran/24426] New: gfortran ICE for valid derived type definition with default initialization sven dot buijssen at math dot uni-dortmund dot de
@ 2005-10-18 13:42 ` pinskia at gcc dot gnu dot org
  2005-10-18 13:46 ` pinskia 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-10-18 13:42 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal


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


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

* [Bug fortran/24426] gfortran ICE for valid derived type definition with default initialization
  2005-10-18 11:03 [Bug fortran/24426] New: gfortran ICE for valid derived type definition with default initialization sven dot buijssen at math dot uni-dortmund dot de
  2005-10-18 13:42 ` [Bug fortran/24426] " pinskia at gcc dot gnu dot org
@ 2005-10-18 13:46 ` pinskia at gcc dot gnu dot org
  2005-10-21 12:03 ` erik dot edelmann at iki dot fi
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-18 13:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-10-18 13:46 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
  GCC build triplet|i686-pc-linux-gnu           |
   GCC host triplet|i686-pc-linux-gnu           |
 GCC target triplet|i686-pc-linux-gnu           |
   Last reconfirmed|0000-00-00 00:00:00         |2005-10-18 13:46:07
               date|                            |


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


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

* [Bug fortran/24426] gfortran ICE for valid derived type definition with default initialization
  2005-10-18 11:03 [Bug fortran/24426] New: gfortran ICE for valid derived type definition with default initialization sven dot buijssen at math dot uni-dortmund dot de
  2005-10-18 13:42 ` [Bug fortran/24426] " pinskia at gcc dot gnu dot org
  2005-10-18 13:46 ` pinskia at gcc dot gnu dot org
@ 2005-10-21 12:03 ` erik dot edelmann at iki dot fi
  2005-10-21 14:57 ` erik dot edelmann at iki dot fi
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: erik dot edelmann at iki dot fi @ 2005-10-21 12:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from erik dot edelmann at iki dot fi  2005-10-21 12:03 -------
(In reply to comment #0)
> It reminds me a bit of bug 16606 but is different as the compiler crashes.

It's indeed basically the same problem as in PR 16606; we assign a default
initializer to variables of derived types even when they are pointers.  The
only difference between this and PR 16606 is that that was for independent
variables, and this is for type components.  I'll think I can write a patch
today or tomorrow.


-- 

erik dot edelmann at iki dot fi changed:

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


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


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

* [Bug fortran/24426] gfortran ICE for valid derived type definition with default initialization
  2005-10-18 11:03 [Bug fortran/24426] New: gfortran ICE for valid derived type definition with default initialization sven dot buijssen at math dot uni-dortmund dot de
                   ` (2 preceding siblings ...)
  2005-10-21 12:03 ` erik dot edelmann at iki dot fi
@ 2005-10-21 14:57 ` erik dot edelmann at iki dot fi
  2005-10-22 17:02 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: erik dot edelmann at iki dot fi @ 2005-10-21 14:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from erik dot edelmann at iki dot fi  2005-10-21 14:57 -------
Patch here: http://gcc.gnu.org/ml/fortran/2005-10/msg00481.html


-- 


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


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

* [Bug fortran/24426] gfortran ICE for valid derived type definition with default initialization
  2005-10-18 11:03 [Bug fortran/24426] New: gfortran ICE for valid derived type definition with default initialization sven dot buijssen at math dot uni-dortmund dot de
                   ` (3 preceding siblings ...)
  2005-10-21 14:57 ` erik dot edelmann at iki dot fi
@ 2005-10-22 17:02 ` cvs-commit at gcc dot gnu dot org
  2005-10-22 17:09 ` cvs-commit at gcc dot gnu dot org
  2005-10-22 21:22 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-22 17:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from cvs-commit at gcc dot gnu dot org  2005-10-22 17:02 -------
Subject: Bug 24426

CVSROOT:        /cvs/gcc
Module name:    gcc
Changes by:     eedelman@gcc.gnu.org    2005-10-22 17:02:42

Modified files:
        gcc/fortran    : ChangeLog decl.c 
        gcc/testsuite  : ChangeLog 
Added files:
        gcc/testsuite/gfortran.dg: der_pointer_4.f90 

Log message:
        2005-10-22  Erik Edelmann  <eedelman@gcc.gnu.org>

        PR fortran/24426
        * decl.c (variable_decl): Don't assign default initializers to
        pointers.

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

        PR fortran/24426
        * gfortran.dg/der_pointer_4.f90: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.591&r2=1.592
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/decl.c.diff?cvsroot=gcc&r1=1.43&r2=1.44
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6230&r2=1.6231
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/der_pointer_4.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1


-- 


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


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

* [Bug fortran/24426] gfortran ICE for valid derived type definition with default initialization
  2005-10-18 11:03 [Bug fortran/24426] New: gfortran ICE for valid derived type definition with default initialization sven dot buijssen at math dot uni-dortmund dot de
                   ` (4 preceding siblings ...)
  2005-10-22 17:02 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-22 17:09 ` cvs-commit at gcc dot gnu dot org
  2005-10-22 21:22 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-22 17:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from cvs-commit at gcc dot gnu dot org  2005-10-22 17:09 -------
Subject: Bug 24426

CVSROOT:        /cvs/gcc
Module name:    gcc
Branch:         gcc-4_0-branch
Changes by:     eedelman@gcc.gnu.org    2005-10-22 17:09:04

Modified files:
        gcc/fortran    : ChangeLog decl.c 
        gcc/testsuite  : ChangeLog 
Added files:
        gcc/testsuite/gfortran.dg: der_pointer_4.f90 

Log message:
        2005-10-22  Erik Edelmann  <eedelman@gcc.gnu.org>

        PR fortran/24426
        * decl.c (variable_decl): Don't assign default initializers to
        pointers.

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

        PR fortran/24426
        * gfortran.dg/der_pointer_4.f90: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.335.2.132&r2=1.335.2.133
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.31.2.6&r2=1.31.2.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.479&r2=1.5084.2.480
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/der_pointer_4.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1


-- 


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


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

* [Bug fortran/24426] gfortran ICE for valid derived type definition with default initialization
  2005-10-18 11:03 [Bug fortran/24426] New: gfortran ICE for valid derived type definition with default initialization sven dot buijssen at math dot uni-dortmund dot de
                   ` (5 preceding siblings ...)
  2005-10-22 17:09 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-22 21:22 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-22 21:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2005-10-22 21:22 -------
Fixed in 4.0.3 and above.


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2005-10-22 21:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-18 11:03 [Bug fortran/24426] New: gfortran ICE for valid derived type definition with default initialization sven dot buijssen at math dot uni-dortmund dot de
2005-10-18 13:42 ` [Bug fortran/24426] " pinskia at gcc dot gnu dot org
2005-10-18 13:46 ` pinskia at gcc dot gnu dot org
2005-10-21 12:03 ` erik dot edelmann at iki dot fi
2005-10-21 14:57 ` erik dot edelmann at iki dot fi
2005-10-22 17:02 ` cvs-commit at gcc dot gnu dot org
2005-10-22 17:09 ` cvs-commit at gcc dot gnu dot org
2005-10-22 21:22 ` 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).