* [Bug fortran/51966] internal compiler error
2012-01-23 14:08 [Bug fortran/51966] New: internal compiler error peter.tromso at gmail dot com
@ 2012-01-23 15:02 ` peter.tromso at gmail dot com
2012-01-23 15:19 ` [Bug fortran/51966] [4.6/4.7 Regression] ICE in gfc_conv_array_constructor_expr burnus at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: peter.tromso at gmail dot com @ 2012-01-23 15:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51966
--- Comment #1 from Peter Wind <peter.tromso at gmail dot com> 2012-01-23 14:51:46 UTC ---
Created attachment 26431
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26431
compile with gfortran fails
small code that exposes the same problem (internal compiler error)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/51966] [4.6/4.7 Regression] ICE in gfc_conv_array_constructor_expr
2012-01-23 14:08 [Bug fortran/51966] New: internal compiler error peter.tromso at gmail dot com
2012-01-23 15:02 ` [Bug fortran/51966] " peter.tromso at gmail dot com
@ 2012-01-23 15:19 ` burnus at gcc dot gnu.org
2012-01-23 15:21 ` dominiq at lps dot ens.fr
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-23 15:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51966
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
CC| |burnus at gcc dot gnu.org
Known to work| |4.1.2, 4.3.4, 4.4.0, 4.5.3
Target Milestone|--- |4.6.3
Summary|internal compiler error |[4.6/4.7 Regression] ICE in
| |gfc_conv_array_constructor_
| |expr
Known to fail| |4.6.2, 4.7.0
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-23 15:06:13 UTC ---
Fails at the assert of gfc_conv_array_constructor_expr at
fortran/trans-expr.c:4753:
4753 gcc_assert (ss != NULL && ss != gfc_ss_terminator);
as ss == NULL.
Backtrace:
#1 gfc_conv_expr (se=0x7fffffffd260, expr=0x16bf0b0) at trans-expr.c:5421
#2 0x00000000005d0dfe in gfc_trans_subcomponent_assign (expr=0x16bf0b0,
cm=0x16bf270, dest=0x2aaaacf250a8)
at fortran/trans-expr.c:5179
#3 gfc_trans_structure_assign (dest=0x2aaaace26280, expr=Unhandled dwarf
expression opcode 0xfa
)
at fortran/trans-expr.c:5230
#4 0x00000000005d1cb4 in gfc_conv_structure (se=0x7fffffffd740,
expr=0x16c0810, init=0)
at fortran/trans-expr.c:5257
#5 0x00000000005d241c in gfc_trans_assignment_1 (expr1=0x16c0090,
expr2=0x16c0810, init_flag=false, dealloc=true)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/51966] [4.6/4.7 Regression] ICE in gfc_conv_array_constructor_expr
2012-01-23 14:08 [Bug fortran/51966] New: internal compiler error peter.tromso at gmail dot com
2012-01-23 15:02 ` [Bug fortran/51966] " peter.tromso at gmail dot com
2012-01-23 15:19 ` [Bug fortran/51966] [4.6/4.7 Regression] ICE in gfc_conv_array_constructor_expr burnus at gcc dot gnu.org
@ 2012-01-23 15:21 ` dominiq at lps dot ens.fr
2012-01-23 16:53 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-23 15:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51966
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-01-23
Ever Confirmed|0 |1
--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-23 15:13:18 UTC ---
Confirmed on trunk and 4.6.2. The failure is the same as in pr51864.
Revision 162456 is OK,
revision 164728 gives the ICE.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/51966] [4.6/4.7 Regression] ICE in gfc_conv_array_constructor_expr
2012-01-23 14:08 [Bug fortran/51966] New: internal compiler error peter.tromso at gmail dot com
` (2 preceding siblings ...)
2012-01-23 15:21 ` dominiq at lps dot ens.fr
@ 2012-01-23 16:53 ` jakub at gcc dot gnu.org
2012-01-24 10:13 ` burnus at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-23 16:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51966
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
CC| |jakub at gcc dot gnu.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/51966] [4.6/4.7 Regression] ICE in gfc_conv_array_constructor_expr
2012-01-23 14:08 [Bug fortran/51966] New: internal compiler error peter.tromso at gmail dot com
` (3 preceding siblings ...)
2012-01-23 16:53 ` jakub at gcc dot gnu.org
@ 2012-01-24 10:13 ` burnus at gcc dot gnu.org
2012-01-24 10:20 ` burnus at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-24 10:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51966
--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-24 09:26:56 UTC ---
Reduced test case, which also illustrates another ICE:
module EcoSystem_ml
implicit none
type, public:: Deriv
character(len=10) :: name
end type
character(len=8), public, dimension(1), parameter :: &
DEF_ECOSYSTEMS = (/ "Grid " /)
type(Deriv), save :: DepEcoSystem != Deriv(DEF_ECOSYSTEMS(1))
! ^^^^ ICE in gfc_conv_string_init
contains
subroutine Init_EcoSystems()
DepEcoSystem = Deriv(DEF_ECOSYSTEMS(1))
! ^^^ ICE in gfc_conv_array_constructor_expr
end subroutine Init_EcoSystems
end module EcoSystem_ml
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/51966] [4.6/4.7 Regression] ICE in gfc_conv_array_constructor_expr
2012-01-23 14:08 [Bug fortran/51966] New: internal compiler error peter.tromso at gmail dot com
` (4 preceding siblings ...)
2012-01-24 10:13 ` burnus at gcc dot gnu.org
@ 2012-01-24 10:20 ` burnus at gcc dot gnu.org
2012-01-25 8:39 ` burnus at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-24 10:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51966
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-24 09:48:28 UTC ---
(In reply to comment #4)
> type(Deriv), save :: DepEcoSystem = Deriv(DEF_ECOSYSTEMS(1))
Here, the problem is that in
#0 gfc_conv_string_init (length=0x2aaaacf3b720, expr=0x16c1170)
expr->type == EXPR_ARRAY. Hence, the following fails:
gcc_assert (expr->expr_type == EXPR_CONSTANT);
#1 in gfc_conv_initializer at fortran/trans-expr.c:4940
#2 in gfc_conv_structure at fortran/trans-expr.c:5396
#3 in gfc_conv_initializer at fortran/trans-expr.c:4933
#4 in gfc_get_symbol_decl at fortran/trans-decl.c:1476
Also that version works with GCC 4.5.
(In reply to comment #3)
> [2009-07-23] Revision 162456 is OK,
> [2010-09-29] revision 164728 gives the ICE.
Also 2010-08-28-r163612 fails.
I wonder whether the patch for PR 44857 (2010-08-04, Rev. 162863) is the
culprit:
http://gcc.gnu.org/ml/fortran/2010-08/msg00034.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/51966] [4.6/4.7 Regression] ICE in gfc_conv_array_constructor_expr
2012-01-23 14:08 [Bug fortran/51966] New: internal compiler error peter.tromso at gmail dot com
` (5 preceding siblings ...)
2012-01-24 10:20 ` burnus at gcc dot gnu.org
@ 2012-01-25 8:39 ` burnus at gcc dot gnu.org
2012-01-25 8:50 ` burnus at gcc dot gnu.org
2012-01-25 8:53 ` burnus at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-25 8:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51966
--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-25 06:59:25 UTC ---
Author: burnus
Date: Wed Jan 25 06:59:21 2012
New Revision: 183510
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183510
Log:
2012-01-24 Tobias Burnus <burnus@net-b.de>
PR fortran/51966
* resolve.c (resolve_structure_cons): Only create an
array constructors for nonscalars.
2012-01-24 Tobias Burnus <burnus@net-b.de>
PR fortran/51966
* gfortran.dg/derived_constructor_char_3.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/derived_constructor_char_3.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/51966] [4.6/4.7 Regression] ICE in gfc_conv_array_constructor_expr
2012-01-23 14:08 [Bug fortran/51966] New: internal compiler error peter.tromso at gmail dot com
` (6 preceding siblings ...)
2012-01-25 8:39 ` burnus at gcc dot gnu.org
@ 2012-01-25 8:50 ` burnus at gcc dot gnu.org
2012-01-25 8:53 ` burnus at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-25 8:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51966
--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-25 08:12:02 UTC ---
Author: burnus
Date: Wed Jan 25 08:11:56 2012
New Revision: 183511
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183511
Log:
2012-01-25 Tobias Burnus <burnus@net-b.de>
PR fortran/51966
* resolve.c (resolve_structure_cons): Only create an
array constructors for nonscalars.
2012-01-25 Tobias Burnus <burnus@net-b.de>
PR fortran/51966
* gfortran.dg/derived_constructor_char_3.f90: New.
Added:
branches/gcc-4_6-branch/gcc/testsuite/gfortran.dg/derived_constructor_char_3.f90
Modified:
branches/gcc-4_6-branch/gcc/fortran/ChangeLog
branches/gcc-4_6-branch/gcc/fortran/resolve.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/51966] [4.6/4.7 Regression] ICE in gfc_conv_array_constructor_expr
2012-01-23 14:08 [Bug fortran/51966] New: internal compiler error peter.tromso at gmail dot com
` (7 preceding siblings ...)
2012-01-25 8:50 ` burnus at gcc dot gnu.org
@ 2012-01-25 8:53 ` burnus at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-25 8:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51966
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-25 08:26:16 UTC ---
FIXED on the trunk (for 4.7) and on the 4.6 branch.
Thanks for the report!
If the issue blocks you, you could consider downgrading to 4.5. Alternatively,
you could build GCC yourself or download a newer [than today] 4.6 or pre-4.7.0
build. (Cf. http://gcc.gnu.org/wiki/GFortranBinaries and
http://gcc.gnu.org/wiki/GFortranDistros )
^ permalink raw reply [flat|nested] 10+ messages in thread