------- Comment #16 from ebotcazou at gcc dot gnu dot org 2009-11-30 22:08 ------- > The issue with the boolean_type_node is that the middle-end does not have > a type for a comparison result but implicitly assumes boolean_type_node. > > So for > > D.xxxx_16 = (boolean) D.xxxx_6; > if (D.xxxx_16 != 0) > > with a re-set boolean_type_node we fold this to D.xxxx_6 != 0, with > the original Ada boolean_type_node we do not. The C frontend for > decaying to bool always produces a comparison btw, not the truncation > we see above (and it only truncates to 8 bits).
There is no decaying to bool in Ada, all boolean values come from truth values or other boolean values. However, gigi first generates all the truth values in integer_type_node before converting them to a boolean type. > I think for 4.5 we should admit defeat and disable free-lang-data > unconditionally if not using LTO. That seems sensible to me. I plan on revisiting this boolean stuff for 4.6 (as well as the sizetype thing, but this looks like much trickier). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42088