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
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
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.
--- /dev/null
+// 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;
+ }
+}
--- /dev/null
+/* 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;
+ }
+}