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]

Re: addressability checks in the gimplifier


As a followup to my previous message enquiring about the intent
underlying various addressability checks in the gimplifier, attached
is an example of patch which addresses the issues we're observing.

It for instance fixes an ICE in in expand_expr_addr_expr_1 on the
testcase below:

   procedure P5 is

      type Long_Message is record
	 Data : String (1 .. 16);
      end record;

      type Short_Message is record
	 B : Boolean;
	 Data : String (1 .. 4);
      end record;
      pragma Pack (Short_Message);

      procedure Process (LM : Long_Message; Size : Natural) is
	 SM : Short_Message;
	 SM.Data (1 .. Size) := LM.Data (1 .. Size);


which is the one producing the tree excerpt quoted in the previous
message (for SM.Data (1 .. Size) in Process).

The patch bootstraps fine with languages="all,ada" on i686-pc-linux-gnu,
and introduces no new regression.

Regarding gimple predicates typically not recursing down trees (in
accordance with the grammar), as I said

<< I'm pretty sure I'm missing implicit assumptions and/or bits of design
   intents in various places, so would appreciate input on the case and
   puzzles described above.
So this patch is posted here primarily for discussion purposes.  I'd
welcome suggestions on better ways to address this, if the approach is
indeed considered inappropriate.

Thanks in advance for your help,

With Kind Regards,


Attachment: gimple_addressable.dif
Description: Text document

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