[Bug c/52862] ICE convert_to_pointer, at convert.c:50
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Apr 4 11:57:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52862
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-04 11:56:31 UTC ---
Reduced testcase, fails with -O:
typedef struct _AVLPVNodeCore {
void * Key;
} AVLPVNODECORE;
void ASMAtomicWritePtrVoid(void * volatile *ppv, const void *pv);
typedef struct RTTHREADINT {
AVLPVNODECORE Core;
} *PRTTHREADINT;
void rtThreadDestroy(PRTTHREADINT pThread)
{
__typeof__(*(&pThread->Core.Key)) volatile * const ppvTypeChecked =
(&pThread->Core.Key);
__typeof__(*(&pThread->Core.Key)) const pvTypeChecked = ((void *)0);
ASMAtomicWritePtrVoid((void * volatile *)(ppvTypeChecked), (void
*)(pvTypeChecked));
}
We ICE here:
47 /* Propagate overflow to the NULL pointer. */
48 if (integer_zerop (expr))
49 return force_fit_type_double (type, double_int_zero, 0,
50 TREE_OVERFLOW (expr));
with expr being NON_LVALUE_EXPR <0B>.
More information about the Gcc-bugs
mailing list