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
This commit is contained in:
parent
5820359990
commit
0948e3921d
@ -1,5 +1,9 @@
|
||||
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);
|
||||
|
@ -1,5 +1,10 @@
|
||||
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.
|
||||
|
16
gcc/testsuite/g++.dg/opt/switch3.C
Normal file
16
gcc/testsuite/g++.dg/opt/switch3.C
Normal file
@ -0,0 +1,16 @@
|
||||
// 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;
|
||||
}
|
||||
}
|
14
gcc/testsuite/gcc.c-torture/compile/20050217-1.c
Normal file
14
gcc/testsuite/gcc.c-torture/compile/20050217-1.c
Normal file
@ -0,0 +1,14 @@
|
||||
/* 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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user