https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110311

--- Comment #35 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to anlauf from comment #33)
> (In reply to Jakub Jelinek from comment #32)
> > Then maybe r13-6361-g8020c9c42349f51f75239b
> > is the commit that changed it?
> > Would be good to put a breakpoint at that instruction and see in which
> > iteration it results in NaN and what operands it had...
> 
> Program received signal SIGFPE, Arithmetic exception.
> 0x0000000000678f1a in rng_stream.rng_stream_s::mmm_mod (x1=330289839997,
> x2=4294967087) at rng_stream_sub.f90:336
> 336         res = mod (x1, x2)
> (gdb) p x1
> $1 = 330289839997
> (gdb) p x2
> $2 = 4294967087
> 
> Strangely enough, a small testcase with these arguments does not fail...

Please show the FP registers (and coprocessor state, 'info float') just before
the FPREM instruction. These two values (as shown) are nothing special, but
perhaps FP register value contains something that FPREM does not like. Also,
please show the state after FPREM is executed. Please note that FPREM is
performed in the loop, so perhaps a couple of trips through the loop will be
needed.

Reply via email to