https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85102
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
CC| |tkoenig at gcc dot gnu.org
--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Interesting.... -fdump-fortran-origial shows
Namespace: A-H: (REAL 4) I-N: (INTEGER 4) O-Z: (REAL 4)
procedure name = p
symtree: 'a' || symbol: 'a'
type spec : (INTEGER 4)
attributes: (PARAMETER IMPLICIT-SAVE DIMENSION)
value: 1
Array spec:(1 [0] AS_EXPLICIT 1 2 )
symtree: 'b' || symbol: 'b'
type spec : (INTEGER 4)
attributes: (PARAMETER IMPLICIT-SAVE)
value: _gfortran_dot_product_i4[[((1) (1))]]
symtree: 'dot_product' || symbol: 'dot_product'
type spec : (REAL 4)
attributes: (PROCEDURE FUNCTION IMPLICIT-TYPE)
result: dot_product
symtree: 'p' || symbol: 'p'
type spec : (UNKNOWN 0)
attributes: (PROGRAM PUBLIC SUBROUTINE)
code:
WRITE UNIT=6 FMT=-1
TRANSFER _gfortran_dot_product_i4[[((1) (1))]]
DT_END
so simplification isn't being run.
The shape is not set when arriving in dot_product:
Breakpoint 1, gfc_simplify_dot_product (vector_a=0x2581410, vector_b=0x2513e80)
at ../../trunk/gcc/fortran/simplify.c:2301
2301 if (vector_a->shape && mpz_get_si (vector_a->shape[0]) == 0)
(gdb) p vector_a->shape
$3 = (mpz_t *) 0x0
which is probably the source of the error.