Commit 8d9cf0a3 by Ed Schonberg Committed by Pierre-Marie de Rodat

[Ada] Spurious warning about change of representastion in call

2019-12-12  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* sem_ch13.adb (Same_Reprewentation): if the actual in a call is
	a generic actual type, use its bsae type to determine whether a
	change of representastion may be necessary for proper parameter
	passing.

From-SVN: r279305
parent 4dd8320f
2019-12-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Same_Reprewentation): if the actual in a call is
a generic actual type, use its bsae type to determine whether a
change of representastion may be necessary for proper parameter
passing.
2019-12-12 Ed Schonberg <schonberg@adacore.com>
* sem_type.adb (Find_Unique_Type): A call to the universal
access equality operator requires one operand to be a universal
access, and the other to be an access type. There is no
......
......@@ -13448,6 +13448,14 @@ package body Sem_Ch13 is
and then Base_Type (T1) = Full_View (Base_Type (T2))
then
return True;
-- If T2 is a generic actual it is declared as a subtype, so
-- check against its base type.
elsif Is_Generic_Actual_Type (T1)
and then Same_Representation (Base_Type (T1), T2)
then
return True;
end if;
-- Tagged types always have the same representation, because it is not
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment