This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/81428] New: [7.1 regression] ICE: in build_one_cst, at tree.c:2079 with -O2. Fixed point division.
- From: "jon at beniston dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 13 Jul 2017 09:57:26 +0000
- Subject: [Bug middle-end/81428] New: [7.1 regression] ICE: in build_one_cst, at tree.c:2079 with -O2. Fixed point division.
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81428
Bug ID: 81428
Summary: [7.1 regression] ICE: in build_one_cst, at tree.c:2079
with -O2. Fixed point division.
Product: gcc
Version: 7.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: jon at beniston dot com
Target Milestone: ---
Created attachment 41743
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41743&action=edit
Failing Testcase
The attached fixed point division test case fails for arm-eabi-gcc (and some
other targets, so not target specific) when compiled at -O2 with GCC 7.1.0. GCC
6.1.0 appears to be ok.
arm-eabi-gcc test.c -O2
test.c: In function ‘main’:
test.c:65:5: internal compiler error: in build_one_cst, at tree.c:2079
int main()
^~~~
test.c:65:5: internal compiler error: Aborted
arm-eabi-gcc: internal compiler error: Aborted (program cc1)
Code is:
inline static v2si_t vwfdivr (v2si_t x, v2si_t y)
{
v2si_t r;
int i;
for (i = 0; i < 2; i++)
{
long _Fract t1, t2, t3;
t1 = lrbits(x[i]);
t2 = lrbits(y[i]);
t3 = t1 / t2;
r[i] = bitslr(t3);
}
return r;
}
It appears to be related to the division, as changing that to another
arithmetic operator results in the ICE disappearing.