This is the mail archive of the gcc-patches@gcc.gnu.org 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: [PATCH] Fix PR rtl-optimization/25654 (P1 4.0/4.1/4.2 Regression)


On Tue, Jan 17, 2006 at 12:28:17PM +0100, Richard Guenther wrote:
> ! 	  if (aggr_i != aggr_j
> ! 	      || !objects_must_conflict_p (type_i, type_j)
> ! 	      || (contains_union
> ! 		  && type_i == type_j))

This isn't sufficient.  All that's required to break this
is two different union types with members with different
alias sets, e.g.

	union u1 { short a; int b; };
	union u2 { short a; int b; };

Or perhaps a struct wrapper around each to avoid getting
flagged by objects_must_conflict_p.

Unless I'm missing something drastic in your explaination.

I think the only short-term viable solution is to prevent
sharing all types containing unions at all.


r~


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