gcc/ada/
* sem_util.adb (In_Return_Value): Modified to detect when
implicit dereference is specified on the return type of a
function call within the expression being checked.
when N_Function_Call =>
if not In_Function_Call then
In_Function_Call := True;
+
+ -- When the function return type has implicit dereference
+ -- specified we know it cannot directly contribute to the
+ -- return value.
+
+ if Present (Etype (Par))
+ and then Has_Implicit_Dereference
+ (Get_Full_View (Etype (Par)))
+ then
+ return False;
+ end if;
else
return False;
end if;