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
* [Bug fortran/29804] segfault with -fbounds-check on allocatable derived type components
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 ` sfilippone at uniroma2 dot it
2006-11-11 22:14 ` burnus at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: sfilippone at uniroma2 dot it @ 2006-11-11 21:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from sfilippone at uniroma2 dot it 2006-11-11 21:15 -------
Created an attachment (id=12592)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12592&action=view)
Test case
Very much reduced from a real application code, possibly not minimal yet.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29804
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29804] segfault with -fbounds-check on allocatable derived type components
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
` (8 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: burnus at gcc dot gnu dot org @ 2006-11-11 22:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2006-11-11 22:14 -------
Created an attachment (id=12593)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12593&action=view)
Reduced testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29804
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29804] segfault with -fbounds-check on allocatable derived type components
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
` (7 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: burnus at gcc dot gnu dot org @ 2006-11-11 22:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from burnus at gcc dot gnu dot org 2006-11-11 22:31 -------
Created an attachment (id=12594)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12594&action=view)
Reduced test case
Ignore previous attachment that was the wrong file.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #12593|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29804
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29804] segfault with -fbounds-check on allocatable derived type components
2006-11-11 21:15 [Bug fortran/29804] New: segfault with -fbounds-check on allocatable derived type components sfilippone at uniroma2 dot it
` (2 preceding siblings ...)
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
` (6 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: burnus at gcc dot gnu dot org @ 2006-11-11 22:32 UTC (permalink / raw)
To: gcc-bugs
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-11-11 22:32:34
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29804
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29804] segfault with -fbounds-check on allocatable derived type components
2006-11-11 21:15 [Bug fortran/29804] New: segfault with -fbounds-check on allocatable derived type components sfilippone at uniroma2 dot it
` (3 preceding siblings ...)
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
` (5 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-11-11 22:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pault at gcc dot gnu dot org 2006-11-11 22:52 -------
Salvatore,
When I got round to your off-list email, I foun that it was empty. I was about
to contact you.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29804
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29804] segfault with -fbounds-check on allocatable derived type components
2006-11-11 21:15 [Bug fortran/29804] New: segfault with -fbounds-check on allocatable derived type components sfilippone at uniroma2 dot it
` (4 preceding siblings ...)
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
` (4 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-11-11 23:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pault at gcc dot gnu dot org 2006-11-11 23:12 -------
Rather than segfaulting, with Cywin_NT the progam produces
Inconsistent BV for IL>1! in runtime.
It runs fine withou -founds-check.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29804
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29804] segfault with -fbounds-check on allocatable derived type components
2006-11-11 21:15 [Bug fortran/29804] New: segfault with -fbounds-check on allocatable derived type components sfilippone at uniroma2 dot it
` (5 preceding siblings ...)
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
` (3 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-07-07 19:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from dfranke at gcc dot gnu dot org 2007-07-07 19:07 -------
Salvatore, could you please recheck this one? I can not observe any problems,
neither on dt_bnd.f90 nor on the reduced testcase.
$> gfortran-svn -g -fbounds-check dt_bnd.f90 && ./a.out
[snipped output]
$> valgrind --tool=memcheck --leak-check=full a.out
[...]
==12425== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 1)
==12425== malloc/free: in use at exit: 0 bytes in 0 blocks.
==12425== malloc/free: 24 allocs, 24 frees, 44,703 bytes allocated.
$> gfortran-svn -v
gcc version 4.3.0 20070705 (experimental)
The same holds for:
$> gfortran-4.2 -v
gcc version 4.2.1 20070620 (prerelease)
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dfranke at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29804
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29804] segfault with -fbounds-check on allocatable derived type components
2006-11-11 21:15 [Bug fortran/29804] New: segfault with -fbounds-check on allocatable derived type components sfilippone at uniroma2 dot it
` (6 preceding siblings ...)
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
` (2 subsequent siblings)
10 siblings, 1 reply; 13+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2007-07-10 13:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from tkoenig at gcc dot gnu dot org 2007-07-10 13:20 -------
(In reply to comment #6)
> Salvatore, could you please recheck this one? I can not observe any problems,
> neither on dt_bnd.f90 nor on the reduced testcase.
Neither can I, it seems to have fixed itself.
Should we put it into the test suite to make sure there's no regression?
--
tkoenig at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tkoenig at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29804
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Bug fortran/29804] segfault with -fbounds-check on allocatable derived type components
2007-07-10 13:21 ` tkoenig at gcc dot gnu dot org
@ 2007-07-10 13:43 ` Jerry DeLisle
0 siblings, 0 replies; 13+ messages in thread
From: Jerry DeLisle @ 2007-07-10 13:43 UTC (permalink / raw)
To: gcc-bugzilla; +Cc: gcc-bugs
Have you looked with valgrind or similar to see if there are errors occurring?
Please definitely put in the testsuite. There may be something we don't see yet
going on here.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29804] segfault with -fbounds-check on allocatable derived type components
2006-11-11 21:15 [Bug fortran/29804] New: segfault with -fbounds-check on allocatable derived type components sfilippone at uniroma2 dot it
` (7 preceding siblings ...)
2007-07-10 13:21 ` tkoenig at gcc dot gnu dot org
@ 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
10 siblings, 0 replies; 13+ messages in thread
From: jvdelisle at verizon dot net @ 2007-07-10 13:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jvdelisle at verizon dot net 2007-07-10 13:43 -------
Subject: Re: segfault with -fbounds-check on allocatable
derived type components
Have you looked with valgrind or similar to see if there are errors occurring?
Please definitely put in the testsuite. There may be something we don't see
yet
going on here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29804
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29804] segfault with -fbounds-check on allocatable derived type components
2006-11-11 21:15 [Bug fortran/29804] New: segfault with -fbounds-check on allocatable derived type components sfilippone at uniroma2 dot it
` (8 preceding siblings ...)
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
10 siblings, 0 replies; 13+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-07-12 10:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from fxcoudert at gcc dot gnu dot org 2007-07-12 10:59 -------
Subject: Bug 29804
Author: fxcoudert
Date: Thu Jul 12 10:58:49 2007
New Revision: 126578
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126578
Log:
PR fortran/29804
* gfortran.dg/alloc_comp_misc_1.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/alloc_comp_misc_1.f90
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29804
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/29804] segfault with -fbounds-check on allocatable derived type components
2006-11-11 21:15 [Bug fortran/29804] New: segfault with -fbounds-check on allocatable derived type components sfilippone at uniroma2 dot it
` (9 preceding siblings ...)
2007-07-12 10:59 ` fxcoudert at gcc dot gnu dot org
@ 2007-07-12 11:16 ` fxcoudert at gcc dot gnu dot org
10 siblings, 0 replies; 13+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-07-12 11:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from fxcoudert at gcc dot gnu dot org 2007-07-12 11:16 -------
I can't see this bug on i686-linux nor x86_64-linux, even with valgrind. I
committed the testcase into our testsuite, so that we can see if it ever
reappears.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
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).