fma3d broken, ICE in check_rest
Richard Guenther
richard.guenther@gmail.com
Sat May 19 13:55:00 GMT 2007
On 5/19/07, Daniel Franke <franke.daniel@gmail.com> wrote:
> On Saturday 19 May 2007 12:26:07 Richard Guenther wrote:
> > We segfault compiling SPEC2k fma3d in snprintf here:
> >
> > #4 0x0000000000410529 in check_rest (type=BT_REAL, kind=8, arg=0x11e9850)
> > at /gcc/spec/sb-vangelis-head-64/gcc/gcc/fortran/check.c:1521
> > 1521 snprintf (buffer, 80, "arguments '%s' and '%s' for
> > intrinsic '%s'",
> > (gdb) list
> > 1516 gfc_basic_typename (type), kind);
> > 1517 return FAILURE;
> > 1518 }
> > 1519 }
> > 1520
> > 1521 snprintf (buffer, 80, "arguments '%s' and '%s' for
> > intrinsic '%s'",
> > 1522 gfc_current_intrinsic_arg[0],
> > gfc_current_intrinsic_arg[n-1],
> > 1523 gfc_current_intrinsic);
> > 1524 if (gfc_check_conformance (buffer, first_arg, x) == FAILURE)
> > 1525 return FAILURE;
> > (gdb) print gfc_current_intrinsic_arg
> > $1 = {0xcbe820 "a1", 0xcbe890 "a2", 0xcbd010 "back", 0x0, 0x0}
> > (gdb) print n-1
> > $2 = 13
> > (gdb) print gfc_current_intrinsic
> > $3 = 0xc978f5 "max"
> >
> > because we pass garbage to it. This is a recent failure from about two
> > days ago, very likely caused by
>
> ... me.
>
> Ok, but without a testcase, this is hard to reproduce. SPEC2k seems to be a
> commercial suite? Could someone who has access to it provide a testcase?
Well, it looks simple. As n-1 seems to be 13, but we have
intrinsic.h:#define MAX_INTRINSIC_ARGS 5
intrinsic.h:extern const char *gfc_current_intrinsic_arg[MAX_INTRINSIC_ARGS];
it looks like this could originate from the following snippet appearing
in fma3d:
TIMSIM%DTmax = MAX &
& ( &
& TIMSIM%DTHxx, &
& TIMSIM%DTPnx, &
& TIMSIM%DTTtx, &
& TIMSIM%DTLSx, &
& TIMSIM%DTM3x, &
& TIMSIM%DTM4x, &
& TIMSIM%DTTrx, &
& TIMSIM%DTP3x, &
& TIMSIM%DTP4x, &
& TIMSIM%DTBmx, &
& TIMSIM%DTSpx, &
& TIMSIM%DTDmx, &
& TIMSIM%DTSBx, &
& TIMSIM%DTDBx &
& )
which is the only place with MAX and more than two parameters. Maybe
this helps.
Richard.
More information about the Fortran
mailing list