gcc -maix64 code generated :- lwz r3,116(r31) bl <inet_ntoa> cc -q64 (AIX compiler) code generated :- lwz r3,116(r1) rldicr 3,3,32,31 bl <inet_ntoa>
Environment: System: AIX ibmbj 2 5 000972024C00 host: powerpc-ibm-aix5.2.0.0 build: powerpc-ibm-aix5.2.0.0 target: powerpc-ibm-aix5.2.0.0 configured with: ../gcc-3.3.2/configure : (reconfigured) ../gcc-3.3.2/configure --disable-nls : (reconfigured) ../gcc-3.3.2/configure --disable-nls How-To-Repeat: #include <sys/types.h> #include <stdio.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> main() { char buf[] = { 0xC2, 0x48, 0xA4, 0x47}; struct in_addr ipaddr; char *rfc1006; memcpy(&ipaddr, buf, sizeof(struct in_addr)); rfc1006 = inet_ntoa(ipaddr); printf("Address is : %s\n", rfc1006); } ------- Additional Comments From root at ibmbj dot bj dot co dot uk 2005-01-13 16:13 ------- Fix: None. -- Summary: inet_ntoa returns 0.0.0.0 using -maix64 Product: gcc Version: 3.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: root at ibmbj dot bj dot co dot uk CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: powerpc-ibm-aix5.2.0.0 GCC host triplet: powerpc-ibm-aix5.2.0.0 GCC target triplet: powerpc-ibm-aix5.2.0.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19428