2011/5/17 Eric Botcazou <ebotca...@adacore.com>:
>> Hmm, sad. As the a check in tree-cfg for truth-expressions about
>> having type-precision of 1 would be a good way.  What is actual the
>> cause for not setting type-precision here?
>
> But we are setting it:
>
>  /* In Ada, we use an unsigned 8-bit type for the default boolean type.  */
>  boolean_type_node = make_unsigned_type (8);
>  TREE_SET_CODE (boolean_type_node, BOOLEAN_TYPE);
>
> See make_unsigned_type:
>
> /* Create and return a type for unsigned integers of PRECISION bits.  */
>
> tree
> make_unsigned_type (int precision)
> {
>  tree type = make_node (INTEGER_TYPE);
>
>  TYPE_PRECISION (type) = precision;
>
>  fixup_unsigned_type (type);
>  return type;
> }
>
>
> The other languages are changing the precision, but in Ada we need a standard
> scalar (precision == mode size) in order to support invalid values.
>
>> At least in testcases I didn't found a regression caused by this.
>
> Right, I've just installed the attached testcase, it passes with the 
> unmodified
> compiler but fails with your gcc-interface/misc.c change.
>
>
> 2011-05-17  Eric Botcazou  <ebotca...@adacore.com>
>
>        * gnat.dg/invalid1.adb: New test.
>
>
> --
> Eric Botcazou
>

Ok, thanks for explaining it.  So would be patch ok for apply without
the precision setting?

Regards,
Kai

Reply via email to