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] Repair TYPE_REF_CAN_ALIAS_ALL machinery



On May 22, 2006, at 6:06 AM, Eric Botcazou wrote:



As a general statement, we shouldn't need TYPE_REF_CAN_ALIAS_ALL, we
handle the same thing in other languages without it.

No, I don't think we do, see the C testcase I posted.

The C testcase is undefined.


  pf = malloc (sizeof(float));
  pi = (int *)pf;

  *pf = 1.0;
  *pi = 0;

The reason is that once accessed as one type the object becomes that type
or at least that is what I thought.


-- Pinski


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