From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89495 invoked by alias); 22 May 2015 02:36:12 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 89462 invoked by uid 48); 22 May 2015 02:36:07 -0000 From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/66226] Incorrect code generation ppc, later assignment causes calling argument corruption Date: Fri, 22 May 2015 02:36:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.9.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-05/txt/msg01863.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66226 Martin Sebor changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |msebor at gcc dot gnu.org Resolution|--- |INVALID --- Comment #2 from Martin Sebor --- Both AIX and POSIX require that: In this hints structure, all members other than ai_flags, ai_eflags ai_family, ai_socktype, and ai_protocol must be zero or a NULL pointer. The program fails to set to zero the ai_addrlen member which causes the function to fail (with both gcc and xlc). Once ai_addrlen is set to zero, the program behaves as you expect.