public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/29804]  New: segfault with -fbounds-check on allocatable derived type components
@ 2006-11-11 21:15 sfilippone at uniroma2 dot it
  2006-11-11 21:16 ` [Bug fortran/29804] " sfilippone at uniroma2 dot it
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: sfilippone at uniroma2 dot it @ 2006-11-11 21:15 UTC (permalink / raw)
  To: gcc-bugs

The attached code generates a segfault when compiled with -fbounds-check, even
if there is no bounds violation nor any other error I can see. (indeed if it's
wrong code I'd love to learn why). 
Session log: 
[sfilippo@localhost bugtest]$ gfortran -v 
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.2-20061107/configure --prefix=/usr/local/gcc42
--with-
mpfr-dir=/home/sfilippo/COMPILERS/GFORTRAN/TEMP/mpfr-2.2.0
--with-mpfr=/home/sfi
lippo/COMPILERS/GFORTRAN/TEMP/mpfr
--with-gmp-dir=/home/sfilippo/COMPILERS/GFORT
RAN/TEMP/gmp-4.2/ --with-gmp=/home/sfilippo/COMPILERS/GFORTRAN/TEMP/gmp
Thread model: posix
gcc version 4.2.0 20061107 (prerelease)
[sfilippo@localhost bugtest]$ gfortran -o dt_bnd  -ggdb dt_bnd.f90
[sfilippo@localhost bugtest]$ ./dt_bnd
Test case :        1

  Description:
 Base
 Type 2 :           2           4           6           8          10         
1
2          14          16          18          20          22          24       
   26          28          30          32          34          36          38   
       40
 Multilevel: Level No           2
 Multilevel:            5          10          15          20          25       
 30          35          40          45          50          55          60     
     65          70          75          80          85          90          95 
        100


Test case :        2

  Description:
 Base
 Type 2 :           2           4           6           8          10         
1
2          14          16          18          20          22          24       
   26          28          30          32          34          36          38   
       40
 Multilevel: Level No           2
 Multilevel:            5          10          15          20          25       
 30          35          40          45          50          55          60     
     65          70          75          80          85          90          95 
        100


[sfilippo@localhost bugtest]$ gfortran -o dt_bnd  -ggdb -fbounds-check
dt_bnd.f90
[sfilippo@localhost bugtest]$ ./dt_bnd
Test case :        1

Segmentation fault (core dumped)
[sfilippo@localhost bugtest]$ gdb dt_bnd -c core.4828 
GNU gdb Red Hat Linux (6.0post-0.20040223.19rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db
lib
rary "/lib/tls/libthread_db.so.1".

Core was generated by `./dt_bnd'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/gcc42/lib/libgfortran.so.2...done.
Loaded symbols for /usr/local/gcc42/lib/libgfortran.so.2
Reading symbols from /lib/tls/libm.so.6...done.
Loaded symbols for /lib/tls/libm.so.6
Reading symbols from /usr/local/gcc42/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/local/gcc42/lib/libgcc_s.so.1
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
#0  0x08048c5a in __pp_type__dppset (p=@0x804e6f8, ptype=@0x804bc86, 
    info=@0xbfe053c0, iv=0x0, rs=0x0, rv=0x0, il=0x804d4c4, nl=0x804d4c4, 
    _ptype=2) at dt_bnd.f90:104
104         if (.not.allocated(p%bv(il_)%ipv)) then


-- 
           Summary: segfault with -fbounds-check on allocatable derived type
                    components
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sfilippone at uniroma2 dot it
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2007-07-12 11:16 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-11 21:15 [Bug fortran/29804] New: segfault with -fbounds-check on allocatable derived type components sfilippone at uniroma2 dot it
2006-11-11 21:16 ` [Bug fortran/29804] " sfilippone at uniroma2 dot it
2006-11-11 22:14 ` burnus at gcc dot gnu dot org
2006-11-11 22:31 ` burnus at gcc dot gnu dot org
2006-11-11 22:32 ` burnus at gcc dot gnu dot org
2006-11-11 22:53 ` pault at gcc dot gnu dot org
2006-11-11 23:12 ` pault at gcc dot gnu dot org
2007-07-07 19:07 ` dfranke at gcc dot gnu dot org
2007-07-10 13:21 ` tkoenig at gcc dot gnu dot org
2007-07-10 13:43   ` Jerry DeLisle
2007-07-10 13:43 ` jvdelisle at verizon dot net
2007-07-12 10:59 ` fxcoudert at gcc dot gnu dot org
2007-07-12 11:16 ` fxcoudert 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).