cvt.c (cp_convert_to_pointer): Call force_fit_type for null pointers.

* cvt.c (cp_convert_to_pointer): Call force_fit_type for null
        pointers.

From-SVN: r55273
This commit is contained in:
Jason Merrill 2002-07-05 18:11:38 -04:00 committed by Jason Merrill
parent 582c64face
commit beed37972f
2 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,9 @@
2002-07-05 Jason Merrill <jason@redhat.com>
* cvt.c (cp_convert_to_pointer): Call force_fit_type for null
pointers.
PR optimization/7145
* tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.

View File

@ -249,6 +249,8 @@ cp_convert_to_pointer (type, expr, force)
else
expr = build_int_2 (0, 0);
TREE_TYPE (expr) = type;
/* Fix up the representation of -1 if appropriate. */
force_fit_type (expr, 0);
return expr;
}