public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52386] New: ICE in gfc_conv_descriptor_dtyp
@ 2012-02-26 8:35 reuter at physik dot uni-freiburg.de
2012-02-26 11:40 ` [Bug fortran/52386] [4.6/4.7 Regression] ICE in gfc_conv_descriptor_dtyp (realloc LHS related) burnus at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: reuter at physik dot uni-freiburg.de @ 2012-02-26 8:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52386
Bug #: 52386
Summary: ICE in gfc_conv_descriptor_dtyp
Classification: Unclassified
Product: gcc
Version: 4.6.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: reuter@physik.uni-freiburg.de
Created attachment 26755
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26755
Code triggering the ICE.
This is a regression in gfortran 4.6.x of a bug not being present in the gcc
4.5.x versions of the compiler. When compiling the 13 line of codes below I
get:
gfortran -c cascades.f90
cascades.f90: In function ‘reduced’:
cascades.f90:11:0: internal compiler error: in gfc_conv_descriptor_dtype, at
fortran/trans-array.c:239
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
The error arises in the pack function. I did not test whether this is still be
present in gfortran 4.7.0. Here is the code:
module cascades
implicit none
private
contains
function reduced (array)
integer, dimension(:), allocatable :: reduced
integer, dimension(:), intent(in) :: array
logical, dimension(size(array)) :: mask
mask = .true.
allocate (reduced (count (mask)))
reduced = pack (array, mask)
end function reduced
end module cascades
I also add the code as attachment.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/52386] [4.6/4.7 Regression] ICE in gfc_conv_descriptor_dtyp (realloc LHS related)
2012-02-26 8:35 [Bug fortran/52386] New: ICE in gfc_conv_descriptor_dtyp reuter at physik dot uni-freiburg.de
@ 2012-02-26 11:40 ` burnus at gcc dot gnu.org
2012-02-27 10:47 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-02-26 11:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52386
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
CC| |burnus at gcc dot gnu.org,
| |pault at gcc dot gnu.org
Target Milestone|--- |4.6.3
Summary|ICE in |[4.6/4.7 Regression] ICE in
|gfc_conv_descriptor_dtyp |gfc_conv_descriptor_dtyp
| |(realloc LHS related)
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-26 11:17:39 UTC ---
Work around: -fno-realloc-lhs.
I tried the following as one has a NOP expr, but I think one needs more. After
removing the nop, one still has:
(gdb) p debug_tree (desc)
<parm_decl 0x2aaaacbed5d8 __result
type <reference_type 0x2aaaacd10348
type <record_type 0x2aaaacd0dc78 array1_integer(kind=4) type_1 BLK
size <integer_cst 0x2aaaacd06180 constant 384>
unit size <integer_cst 0x2aaaacce7c00 constant 48>
align 64 symtab 0 alias set -1 canonical type 0x2aaaacd0dd20 fields
<field_decl 0x2aaaacd05390 data>
pointer_to_this <pointer_type 0x2aaaacd10150> reference_to_this
<reference_type 0x2aaaacd10348> chain <type_decl 0x2aaaacc10a10 D.1859>>
unsigned DI
size <integer_cst 0x2aaaacbe5ec0 constant 64>
unit size <integer_cst 0x2aaaacbe5ee0 constant 8>
align 64 symtab 0 alias set -1 canonical type 0x2aaaacd103f0>
readonly used unsigned DI file hj4faf.f90 line 5 col 0 size <integer_cst
0x2aaaacbe5ec0 64> unit size <integer_cst 0x2aaaacbe5ee0 8>
align 64 context <function_decl 0x2aaaacd0e300 reduced> arg-type
<reference_type 0x2aaaacd10348> chain <parm_decl 0x2aaaacbed660 array>>
--- trans-expr.c (Revision 184582)
+++ trans-expr.c
@@ -6299,6 +6301,7 @@ fcncall_realloc_result (gfc_se *se, int rank)
/* Use the allocation done by the library. Substitute the lhs
descriptor with a copy, whose data field is nulled.*/
desc = build_fold_indirect_ref_loc (input_location, se->expr);
+ STRIP_NOPS (desc);
/* Unallocated, the descriptor does not have a dtype. */
tmp = gfc_conv_descriptor_dtype (desc);
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/52386] [4.6/4.7 Regression] ICE in gfc_conv_descriptor_dtyp (realloc LHS related)
2012-02-26 8:35 [Bug fortran/52386] New: ICE in gfc_conv_descriptor_dtyp reuter at physik dot uni-freiburg.de
2012-02-26 11:40 ` [Bug fortran/52386] [4.6/4.7 Regression] ICE in gfc_conv_descriptor_dtyp (realloc LHS related) burnus at gcc dot gnu.org
@ 2012-02-27 10:47 ` rguenth at gcc dot gnu.org
2012-02-29 7:40 ` pault at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-02-27 10:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52386
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/52386] [4.6/4.7 Regression] ICE in gfc_conv_descriptor_dtyp (realloc LHS related)
2012-02-26 8:35 [Bug fortran/52386] New: ICE in gfc_conv_descriptor_dtyp reuter at physik dot uni-freiburg.de
2012-02-26 11:40 ` [Bug fortran/52386] [4.6/4.7 Regression] ICE in gfc_conv_descriptor_dtyp (realloc LHS related) burnus at gcc dot gnu.org
2012-02-27 10:47 ` rguenth at gcc dot gnu.org
@ 2012-02-29 7:40 ` pault at gcc dot gnu.org
2012-02-29 21:26 ` pault at gcc dot gnu.org
2012-02-29 21:44 ` pault at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu.org @ 2012-02-29 7:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52386
--- Comment #2 from Paul Thomas <pault at gcc dot gnu.org> 2012-02-29 07:21:43 UTC ---
Author: pault
Date: Wed Feb 29 07:21:38 2012
New Revision: 184651
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184651
Log:
2012-02-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/52386
* trans-expr.c (fcncall_realloc_result): Dereference the
descriptor if needed.
2012-02-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/52386
* gfortran.dg/realloc_on_assign_13.f90 : New test.
Added:
trunk/gcc/testsuite/gfortran.dg/realloc_on_assign_13.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/52386] [4.6/4.7 Regression] ICE in gfc_conv_descriptor_dtyp (realloc LHS related)
2012-02-26 8:35 [Bug fortran/52386] New: ICE in gfc_conv_descriptor_dtyp reuter at physik dot uni-freiburg.de
` (2 preceding siblings ...)
2012-02-29 7:40 ` pault at gcc dot gnu.org
@ 2012-02-29 21:26 ` pault at gcc dot gnu.org
2012-02-29 21:44 ` pault at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu.org @ 2012-02-29 21:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52386
--- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> 2012-02-29 21:24:11 UTC ---
Author: pault
Date: Wed Feb 29 21:24:05 2012
New Revision: 184673
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184673
Log:
2012-02-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/52386
* trans-expr.c (fcncall_realloc_result): Dereference the
descriptor if needed.
2012-02-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/52386
* gfortran.dg/realloc_on_assign_13.f90 : New test.
Added:
branches/gcc-4_6-branch/gcc/testsuite/gfortran.dg/realloc_on_assign_13.f90
Modified:
branches/gcc-4_6-branch/gcc/fortran/ChangeLog
branches/gcc-4_6-branch/gcc/fortran/trans-expr.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/52386] [4.6/4.7 Regression] ICE in gfc_conv_descriptor_dtyp (realloc LHS related)
2012-02-26 8:35 [Bug fortran/52386] New: ICE in gfc_conv_descriptor_dtyp reuter at physik dot uni-freiburg.de
` (3 preceding siblings ...)
2012-02-29 21:26 ` pault at gcc dot gnu.org
@ 2012-02-29 21:44 ` pault at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu.org @ 2012-02-29 21:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52386
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> 2012-02-29 21:25:14 UTC ---
Fixed on trunk and 4.6.
Thanks for the report, Juergen.
Paul
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-02-29 21:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-26 8:35 [Bug fortran/52386] New: ICE in gfc_conv_descriptor_dtyp reuter at physik dot uni-freiburg.de
2012-02-26 11:40 ` [Bug fortran/52386] [4.6/4.7 Regression] ICE in gfc_conv_descriptor_dtyp (realloc LHS related) burnus at gcc dot gnu.org
2012-02-27 10:47 ` rguenth at gcc dot gnu.org
2012-02-29 7:40 ` pault at gcc dot gnu.org
2012-02-29 21:26 ` pault at gcc dot gnu.org
2012-02-29 21:44 ` pault at gcc dot gnu.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).