From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48569 invoked by alias); 10 Jun 2015 13:03:22 -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 48540 invoked by uid 48); 10 Jun 2015 13:03:16 -0000 From: "ruckert at cs dot hm.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/66486] New: MMIX code produced is invalid Date: Wed, 10 Jun 2015 13:03:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.0.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: ruckert at cs dot hm.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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-06/txt/msg00933.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66486 Bug ID: 66486 Summary: MMIX code produced is invalid Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: major Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: ruckert at cs dot hm.edu Target Milestone: --- The following c code: typedef struct node { struct node *next; int i; } node; void InsertEnd(node *p, node **head) { while (*head!=0) head=&((*head)->next); *head=p; } compliled with mmix-gcc -O2 -S bug.c produces: InsertEnd IS @ LDO $15,$1,0 BZ $15,L:9 L:5 IS @ SET $1,$2 LDO $2,$1,0 PBNZ $2,L:5 L:9 IS @ STOU $0,$1,0 POP 0,0 In the first SET instruction $2 is uninitialized. Probably the $15 in the first two instructions should be a $2.