This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Fix gnat.dg/test_nested_subtype_byref.adb

The new alias analysis engine (namely nonaliasing_component_refs_p) is more 
aggressive than the old one to disambiguate component references.  This makes 
the attached patch necessary for Ada.

Tested on i586-suse-linux, applied on the mainline.

2009-04-04  Eric Botcazou  <>

	* gcc-interface/utils.c (finish_record_type): Force structural equality
	checks if the record type is discriminated.

Eric Botcazou
Index: gcc-interface/utils.c
--- gcc-interface/utils.c	(revision 145500)
+++ gcc-interface/utils.c	(working copy)
@@ -977,6 +977,11 @@ finish_record_type (tree record_type, tr
   if (code == QUAL_UNION_TYPE)
     nreverse (fieldlist);
+  /* If the type is discriminated, it can be used to access all its
+     constrained subtypes, so force structural equality checks.  */
   if (rep_level < 2)
       /* If this is a padding record, we never want to make the size smaller

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]