This is the mail archive of the gcc-bugs@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]

[Bug optimization/12800] [tree-ssa] Store dropped after cast to pointer from integer of different size


------- Additional Comments From bryner at brianryner dot com  2003-11-29 01:15 -------
I think this problem, or something similar, occurs even when the pointer and
integer are the same size:

int*
allocint()
{
  unsigned long p = malloc(sizeof(int));
  int *i = (int *) p;
  if (!i)
    return NULL;
                                                                                
  *i = 1;
  return i;
}

does not store to *i before returning on x86, where sizeof(unsigned long) ==
sizeof(int*).


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bryner at brianryner dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12800


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