Commit 0948e392 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/20023 (internal compiler error: Segmentation fault)

	PR c++/20023
	PR tree-optimization/20009
	* convert.c (convert_to_integer): Revert 2005-02-16 change.

	* gcc.c-torture/compile/20050217-1.c: New test.
	* g++.dg/opt/switch3.C: New test.

From-SVN: r95208
parent 58203599
2005-02-18 Jakub Jelinek <jakub@redhat.com>
PR c++/20023
PR tree-optimization/20009
* convert.c (convert_to_integer): Revert 2005-02-16 change.
PR tree-optimization/18947
* cgraphunit.c (cgraph_finalize_function): When redefining an extern
inline, remove all nodes that are inlined into the extern inline
......
......@@ -387,8 +387,7 @@ convert_to_integer (tree type, tree expr)
expr = integer_zero_node;
else
expr = fold (build1 (CONVERT_EXPR,
lang_hooks.types.type_for_size
(POINTER_SIZE, TYPE_UNSIGNED (type)),
lang_hooks.types.type_for_size (POINTER_SIZE, 0),
expr));
return convert_to_integer (type, expr);
......
2005-02-18 Jakub Jelinek <jakub@redhat.com>
PR c++/20023
PR tree-optimization/20009
* gcc.c-torture/compile/20050217-1.c: New test.
* g++.dg/opt/switch3.C: New test.
PR tree-optimization/18947
* gcc.c-torture/compile/20050215-1.c: New test.
* gcc.c-torture/compile/20050215-2.c: New test.
......
// PR c++/20023
// { dg-do compile }
// { dg-options "-O2" }
void f (void);
typedef __SIZE_TYPE__ size_t;
void g (void *a)
{
size_t b = (size_t) a;
switch (b)
{
case 1:
f ();
break;
}
}
/* PR c++/20023 */
void f (void);
typedef __SIZE_TYPE__ size_t;
void g (void *a)
{
size_t b = (size_t) a;
switch (b)
{
case 1:
f ();
break;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment