From: Giovanni Bajo Date: Thu, 26 Feb 2004 02:17:26 +0000 (+0000) Subject: re PR c++/14246 (Problems with templates, ice in write_template_arg_literal) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3cc8f5878378f33c0f79929b993b0d0504fc5c50;p=gcc.git re PR c++/14246 (Problems with templates, ice in write_template_arg_literal) PR c++/14246 * mangle.c (write_template_arg_literal): Don't rely on identity for boolean constants. From-SVN: r78478 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 44add64734a..85ee089dbd5 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2004-02-26 Giovanni Bajo + + PR c++/14246 + * mangle.c (write_template_arg_literal): Don't rely on identity for + boolean constants. + 2004-02-24 Jason Merrill * tree.c (build_exception_variant): Use check_qualified_type. diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index a41c14108f3..2580d39866f 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -2121,9 +2121,9 @@ write_template_arg_literal (const tree value) { if (same_type_p (type, boolean_type_node)) { - if (value == boolean_false_node || integer_zerop (value)) + if (integer_zerop (value)) write_unsigned_number (0); - else if (value == boolean_true_node) + else if (integer_onep (value)) write_unsigned_number (1); else abort ();