[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Bug optimization/11635] [3.3/3.4 regression] Unnecessary store onto stack

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-22 22:59 -------
I forgot to attach the reduced sources:
typedef unsigned int __uint32_t;
typedef unsigned int __socklen_t;
typedef __socklen_t socklen_t;

typedef unsigned short int sa_family_t;

struct sockaddr
    sa_family_t sa_family;
    char sa_data[14];
struct sockaddr_storage
    sa_family_t ss_family;
    __uint32_t __ss_align;
    char __ss_padding[(128 - (2 * sizeof (__uint32_t)))];

typedef union { struct sockaddr *__restrict __sockaddr__; struct sockaddr_at *__restrict 
t__; struct sockaddr_ax25 *__restrict __sockaddr_ax25__; struct sockaddr_dl *__restrict 
__; struct sockaddr_eon *__restrict __sockaddr_eon__; struct sockaddr_in *__restrict 
 struct sockaddr_in6 *__restrict __sockaddr_in6__; struct sockaddr_inarp *__restrict 
__; struct sockaddr_ipx *__restrict __sockaddr_ipx__; struct sockaddr_iso *__restrict 
_; struct sockaddr_ns *__restrict __sockaddr_ns__; struct sockaddr_un *__restrict __sockaddr_un__; 
ruct sockaddr_x25 *__restrict __sockaddr_x25__;
       } __SOCKADDR_ARG __attribute__ ((__transparent_union__));
extern int getpeername (int __fd, __SOCKADDR_ARG __addr,
   socklen_t *__restrict __len) ;

 struct sockaddr_storage from;
 struct sockaddr *const fromp = (void *)&from;
 socklen_t fromlen;

 fromlen = sizeof(from);

 if (getpeername(0, fromp, &fromlen) < 0) {
  return 1;

 return 0;

------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.

Reply to: