[Bug ipa/78599] [7 Regression] hwint.h:292:72: runtime error: shift exponent 64 is too large for 64-bit type 'long int'
prathamesh3492 at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 30 09:46:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78599
--- Comment #3 from prathamesh3492 at gcc dot gnu.org ---
Created attachment 40198
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40198&action=edit
untested patch to check if type is integral or pointer type.
Hi,
Well, this seems to happen for the edge: deque_test/0 ->
_Z4copyIPd1BEvT_S2_T0_.isra.0/9.
void deque_test(double*, double*) (double * p1, double * p2)
{
struct B b;
struct C a;
struct B D.2378;
<bb 2> [100.0%]:
C::C (&a, 0, 0);
b = C::m_fn1 (&a); [return slot optimization]
B::B (&D.2378, &b);
_Z4copyIPd1BEvT_S2_T0_.isra.0 (&D.2378);
D.2378 ={v} {CLOBBER};
a ={v} {CLOBBER};
b ={v} {CLOBBER};
return;
}
The issue is that with -flto in propagate_bits_accross_jump_function(),
ipa_get_type() returns record_type,
and we end up with invalid precision of 0 and pass that to
ipcp_bits_lattice::meet_with(value, mask, precision)
which eventually results in the runtime error.
Gating the type on integral or pointer type works for me (attached patch).
Markus, could you check if this works for you ?
However ipcp_bits_lattice::meet_with (value, mask, precision) is only called
when jfunc->bits.known is true. In ipa_compute_jump_functions_for_edge(), we
set jfunc->bits.known to true only if parameter is of integral or pointer type,
so it shouldn't really happen that
ipcp_bits_lattice::meet_with(value, mask, precision) gets called when parameter
type is record_type. Without -flto, for the above edge, the parameter type is
reference_type, but with -flto it's appearing to be record_type.
Is this possibly the same issue of TYPE_ARG_TYPES returning bogus types during
WPA ?
Thanks,
Prathamesh
More information about the Gcc-bugs
mailing list