Commit f56000ed by Eric Botcazou Committed by Eric Botcazou

gimple.c (gimple_types_compatible_p): Treat bounds of domain types as equal if…

gimple.c (gimple_types_compatible_p): Treat bounds of domain types as equal if they are both PLACEHOLDER_EXPRs.

	* gimple.c (gimple_types_compatible_p) <ARRAY_TYPE>: Treat bounds of
	domain types as equal if they are both PLACEHOLDER_EXPRs.

From-SVN: r159185
parent 901ad63f
2010-05-08 Eric Botcazou <ebotcazou@adacore.com>
* gimple.c (gimple_types_compatible_p) <ARRAY_TYPE>: Treat bounds of
domain types as equal if they are both PLACEHOLDER_EXPRs.
2010-05-08 Richard Guenther <rguenther@suse.de>
* lto-wrapper.c (run_gcc): Remove linker output from
......
......@@ -3305,9 +3305,15 @@ gimple_types_compatible_p (tree t1, tree t2)
/* The minimum/maximum values have to be the same. */
if ((min1 == min2
|| (min1 && min2 && operand_equal_p (min1, min2, 0)))
|| (min1 && min2
&& ((TREE_CODE (min1) == PLACEHOLDER_EXPR
&& TREE_CODE (min2) == PLACEHOLDER_EXPR)
|| operand_equal_p (min1, min2, 0))))
&& (max1 == max2
|| (max1 && max2 && operand_equal_p (max1, max2, 0))))
|| (max1 && max2
&& ((TREE_CODE (max1) == PLACEHOLDER_EXPR
&& TREE_CODE (max2) == PLACEHOLDER_EXPR)
|| operand_equal_p (max1, max2, 0)))))
goto same_types;
else
goto different_types;
......
2010-05-08 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/lto6.adb: New test.
* gnat.dg/lto6_pkg.ads: New helper.
2010-05-08 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/lto5.adb: New test.
* gnat.dg/lto5_pkg.ad[sb]: New helper.
......
-- { dg-do run }
-- { dg-options "-gnat05 -O2 -flto" }
with Lto6_Pkg; use Lto6_Pkg;
procedure Lto6 is
type Enum is (A, B, C, D);
Table : array (B .. C, 1 .. 1) of F_String := (others => (others => Null_String));
begin
Table := (others => (others => Null_String));
end;
with Ada.Finalization; use Ada.Finalization;
package Lto6_Pkg is
type F_String is new Controlled with record
Data : access String;
end record;
Null_String : constant F_String := (Controlled with Data => null);
end Lto6_Pkg;
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