[Bug tree-optimization/105663] [12/13 Regression] ICE (segfault) in operator_bitwise_not::fold_range with O2/O3
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu May 19 16:14:41 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105663
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2022-05-19
Status|UNCONFIRMED |NEW
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase:
typedef __SIZE_TYPE__ size_t;
static
int gggg(void * pNode1, void * pNode2, void * pNode3)
{
size_t temp = (((size_t)pNode1 | (size_t)pNode2 | (size_t)pNode3) & (0xFFFFUL
<< (16U)));
size_t ref = 0U;
if ((size_t)pNode1 != 0U)
{
ref = (size_t)pNode1;
}
else if ((size_t)pNode2 != 0U)
{
ref = (size_t)pNode2;
}
else if ((size_t)pNode3 != 0U)
{
ref = (size_t)pNode3;
}
return temp != ((size_t)ref & (0xFFFFUL << (16U)));
}
int hhh(void* pQList, void * pNewNode)
{
if (pQList == 0)
{
return 1;
}
if (gggg(pQList, pNewNode, ((void *)0)) != 0U)
return 1;
return 0;
}
---- CUT ---
On the trunk we get:
<source>: In function 'hhh':
<source>:34:1: error: invalid types for 'bit_not_expr'
34 | }
| ^
void *
void *
_16 = ~pQList_4(D);
during GIMPLE pass: evrp
More information about the Gcc-bugs
mailing list