public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/17584] New: gfortran: ICE with segfault on valid code w/ allocate within derived type
@ 2004-09-21 14:23 anlauf at hep dot tu-darmstadt dot de
2004-09-21 15:01 ` [Bug fortran/17584] " pinskia at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: anlauf at hep dot tu-darmstadt dot de @ 2004-09-21 14:23 UTC (permalink / raw)
To: gcc-bugs
OK guys, here's a nasty one:
module gfcbug12
implicit none
type t2
integer :: i
end type t2
type t1
type (t2), pointer :: k(:)
end type t1
contains
subroutine foo ()
type (t1) :: v
allocate (v% k(3))
end subroutine foo
end module gfcbug12
which gives:
gfcbug12.f90: In function `foo':
gfcbug12.f90:16: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Cheers,
-ha
--
Summary: gfortran: ICE with segfault on valid code w/ allocate
within derived type
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: anlauf at hep dot tu-darmstadt dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-cygwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17584
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/17584] gfortran: ICE with segfault on valid code w/ allocate within derived type
2004-09-21 14:23 [Bug fortran/17584] New: gfortran: ICE with segfault on valid code w/ allocate within derived type anlauf at hep dot tu-darmstadt dot de
@ 2004-09-21 15:01 ` pinskia at gcc dot gnu dot org
2004-09-25 17:40 ` tobi at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-21 15:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-21 15:01 -------
Confirmed, there might be another bug which is a dup of but I cannot find it right now.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-09-21 15:01:55
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17584
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/17584] gfortran: ICE with segfault on valid code w/ allocate within derived type
2004-09-21 14:23 [Bug fortran/17584] New: gfortran: ICE with segfault on valid code w/ allocate within derived type anlauf at hep dot tu-darmstadt dot de
2004-09-21 15:01 ` [Bug fortran/17584] " pinskia at gcc dot gnu dot org
@ 2004-09-25 17:40 ` tobi at gcc dot gnu dot org
2004-11-08 13:31 ` reichelt at gcc dot gnu dot org
2004-11-16 21:38 ` reichelt at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-09-25 17:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-09-25 17:39 -------
Backtrace from the segfault:
#0 tree_swap_operands_p (arg0=0xf6e5d0d8, arg1=0x0, reorder=1 '\001')
at ../../gcc-clean/gcc/fold-const.c:5921
#1 0x082219e8 in fold (expr=0xf6ec7360)
at ../../gcc-clean/gcc/fold-const.c:6080
#2 0x08096c8b in gfc_array_allocate (se=0xfef9d8fc, ref=0xa35e398,
pstat=0xf6e5d0d8) at ../../gcc-clean/gcc/fortran/trans-array.c:2725
#3 0x080b56ea in gfc_trans_allocate (code=0xa35e4c8)
at ../../gcc-clean/gcc/fortran/trans-stmt.c:3054
#4 0x08093228 in gfc_trans_code (code=0xa35e4c8)
at ../../gcc-clean/gcc/fortran/trans.c:573
#5 0x080a1c1e in gfc_generate_function_code (ns=0xa35dc30)
at ../../gcc-clean/gcc/fortran/trans-decl.c:2217
#6 0x080934d2 in gfc_generate_module_code (ns=0xa35d3c0)
at ../../gcc-clean/gcc/fortran/trans.c:708
#7 0x08079ae4 in gfc_parse_file () at ../../gcc-clean/gcc/fortran/parse.c:2618
#8 0x0809052d in gfc_be_parse_file (set_yydebug=0)
at ../../gcc-clean/gcc/fortran/f95-lang.c:265
#9 0x083b3f77 in toplev_main (argc=167, argv=0xfef9db84)
at ../../gcc-clean/gcc/toplev.c:991
#10 0x0030bad4 in __libc_start_main () from /lib/tls/libc.so.6
#11 0x0804ab01 in _start ()
In frame #2, we're here:
(gdb) up
#2 0x08096c48 in gfc_array_init_size (descriptor=0xf6e4a028, rank=1,
poffset=0xfef4785c, lower=0x0, upper=0xa0ce3e8, pblock=0xfef4789c)
at ../../gcc-clean/gcc/fortran/trans-array.c:2725
2725 size = fold (build2 (MULT_EXPR, gfc_array_index_type, stride, tmp));
(gdb) l
2720 }
2721
2722 /* The stride is the number of elements in the array, so multiply by the
2723 size of an element to get the total size. */
2724 tmp = TYPE_SIZE_UNIT (gfc_get_element_type (type));
2725 size = fold (build2 (MULT_EXPR, gfc_array_index_type, stride, tmp));
2726
2727 if (poffset != NULL)
2728 {
2729 offset = gfc_evaluate_now (offset, pblock);
(gdb)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17584
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/17584] gfortran: ICE with segfault on valid code w/ allocate within derived type
2004-09-21 14:23 [Bug fortran/17584] New: gfortran: ICE with segfault on valid code w/ allocate within derived type anlauf at hep dot tu-darmstadt dot de
2004-09-21 15:01 ` [Bug fortran/17584] " pinskia at gcc dot gnu dot org
2004-09-25 17:40 ` tobi at gcc dot gnu dot org
@ 2004-11-08 13:31 ` reichelt at gcc dot gnu dot org
2004-11-16 21:38 ` reichelt at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-11-08 13:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-11-08 13:30 -------
*** Bug 18372 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |sgg at ipp dot mpg dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17584
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/17584] gfortran: ICE with segfault on valid code w/ allocate within derived type
2004-09-21 14:23 [Bug fortran/17584] New: gfortran: ICE with segfault on valid code w/ allocate within derived type anlauf at hep dot tu-darmstadt dot de
` (2 preceding siblings ...)
2004-11-08 13:31 ` reichelt at gcc dot gnu dot org
@ 2004-11-16 21:38 ` reichelt at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-11-16 21:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-11-16 21:38 -------
Fixed by Paul's patch for PR13010.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17584
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-11-16 21:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-21 14:23 [Bug fortran/17584] New: gfortran: ICE with segfault on valid code w/ allocate within derived type anlauf at hep dot tu-darmstadt dot de
2004-09-21 15:01 ` [Bug fortran/17584] " pinskia at gcc dot gnu dot org
2004-09-25 17:40 ` tobi at gcc dot gnu dot org
2004-11-08 13:31 ` reichelt at gcc dot gnu dot org
2004-11-16 21:38 ` 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).