This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31919] ICE in fold_binary in fold-const.c
- From: "dfranke at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 May 2007 15:39:55 -0000
- Subject: [Bug fortran/31919] ICE in fold_binary in fold-const.c
- References: <bug-31919-12778@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from dfranke at gcc dot gnu dot org 2007-05-14 16:39 -------
The problem is the handling of arrays in the MIN intrinsic. The reporter
probably wanted "MIN(MINVAL(x%kinenergy), MINVAL(x%realspeed))" as the
dimensions of REALSPEED and KINENERGY are not conformable.
$> sunf95 pr31919.f90
"pr31919.f90", Line = 10, Column = 35: ERROR: All of the actual arguments to
this intrinsic call are not conformable to each other.
Slightly reduced testcase:
$> cat pr31919.f90
module materials
type md_field
real,dimension(10, 10) :: realspeed
real,dimension(10) :: mass,kinenergy
end type md_field
contains
real function getTemperature(x)
type(md_field),intent(in) :: x;
print *, min(x%kinenergy, x%realspeed)
end function getTemperature
end module materials
(gdb) bt
#0 integer_zerop (expr=0x0) at ../../../svn/gcc/gcc/tree.c:1295
#1 0x080b7b66 in gfc_conv_array_index_offset (se=0xbfc63db4, info=0x887d540,
dim=1, i=1, ar=0x887d2bc,
stride=0xb7cb9540) at ../../../svn/gcc/gcc/fortran/trans-array.c:2145
#2 0x080b7faa in gfc_trans_preloop_setup (loop=0xbfc63e3c, dim=0, flag=1,
pblock=0xbfc63ec8)
at ../../../svn/gcc/gcc/fortran/trans-array.c:2365
#3 0x080b82fb in gfc_start_scalarized_body (loop=0xbfc63e3c, pbody=0xbfc63f4c)
at ../../../svn/gcc/gcc/fortran/trans-array.c:2406
#4 0x080dd7cf in gfc_trans_transfer (code=0x8842510) at
../../../svn/gcc/gcc/fortran/trans-io.c:1854
#5 0x080b2cf5 in gfc_trans_code (code=0x8842510) at
../../../svn/gcc/gcc/fortran/trans.c:605
#6 0x080dfeb3 in build_dt (function=0xb7cb4580, code=0x887d408) at
../../../svn/gcc/gcc/fortran/trans-io.c:1507
#7 0x080b2d17 in gfc_trans_code (code=0x887d408) at
../../../svn/gcc/gcc/fortran/trans.c:581
#8 0x080c8973 in gfc_generate_function_code (ns=0x887c600) at
../../../svn/gcc/gcc/fortran/trans-decl.c:3181
#9 0x080b1cb8 in gfc_generate_module_code (ns=0x88421b0) at
../../../svn/gcc/gcc/fortran/trans.c:693
#10 0x0808d63e in gfc_parse_file () at
../../../svn/gcc/gcc/fortran/parse.c:3259
#11 0x080ad70d in gfc_be_parse_file (set_yydebug=0) at
../../../svn/gcc/gcc/fortran/f95-lang.c:305
#12 0x082fc538 in toplev_main (argc=2, argv=0xbfc64284) at
../../../svn/gcc/gcc/toplev.c:1051
#13 0x080f063f in main (argc=Cannot access memory at address 0x1
) at ../../../svn/gcc/gcc/main.c:35
$> gfortran-svn -v
gcc version 4.3.0 20070502 (experimental)
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dfranke at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-invalid-code
Known to fail| |4.1.2 4.2.0 4.3.0
Last reconfirmed|0000-00-00 00:00:00 |2007-05-14 16:39:55
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31919