re PR c/52862 (ICE convert_to_pointer, at convert.c:50)

2012-04-13  Richard Guenther  <rguenther@suse.de>

	PR c/52862
	* convert.c (convert_to_pointer): Remove special-casing of
	zero.

	* gcc.dg/pr52862.c: New testcase.

From-SVN: r186407
This commit is contained in:
Richard Guenther 2012-04-13 09:22:33 +00:00 committed by Richard Biener
parent 572a49c87c
commit 09c2b6d028
4 changed files with 20 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2012-04-13 Richard Guenther <rguenther@suse.de>
PR c/52862
* convert.c (convert_to_pointer): Remove special-casing of
zero.
2012-04-13 Joey Ye <joey.ye@arm.com>
* config/arm/constraints.md (Pe): New constraint.

View File

@ -44,11 +44,6 @@ convert_to_pointer (tree type, tree expr)
if (TREE_TYPE (expr) == type)
return expr;
/* Propagate overflow to the NULL pointer. */
if (integer_zerop (expr))
return force_fit_type_double (type, double_int_zero, 0,
TREE_OVERFLOW (expr));
switch (TREE_CODE (TREE_TYPE (expr)))
{
case POINTER_TYPE:

View File

@ -1,3 +1,8 @@
2012-04-13 Richard Guenther <rguenther@suse.de>
PR c/52862
* gcc.dg/pr52862.c: New testcase.
2012-04-13 Joey Ye <joey.ye@arm.com>
* gcc.target/arm/thumb1-imm.c: New testcase.

View File

@ -0,0 +1,9 @@
/* { dg-do compile } */
/* { dg-options "-O" } */
void ASMAtomicWritePtrVoid(const void *pv);
void rtThreadDestroy(void)
{
void * const pvTypeChecked = ((void *)0);
ASMAtomicWritePtrVoid((void *)(pvTypeChecked));
}