This patch fixes a bug where the compiler would give an incorrect error message when an intrinsic operator is called with operands of private type, but with a result of a non-private type. The following test should compile quietly. package Test_Intrinsics is type T is private; X : constant T; function "*" (X, Y : T) return Float; private type T is new Float; X : constant T := 0.0; pragma Import (Intrinsic, "*"); end Test_Intrinsics; with Test_Intrinsics; use Test_Intrinsics; procedure Test_Intrinsics_Main is Y : Float := X * X; begin null; end Test_Intrinsics_Main; Tested on x86_64-pc-linux-gnu, committed on trunk 2011-09-05 Bob Duff * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked conversions instead of normal type conversions in all cases where a type conversion would be illegal. In particular, use unchecked conversions when the operand types are private.