From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31838 invoked by alias); 13 Dec 2001 03:56:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 31812 invoked by uid 71); 13 Dec 2001 03:56:01 -0000 Resent-Date: 13 Dec 2001 03:56:01 -0000 Resent-Message-ID: <20011213035601.31810.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, lindsayd@cisco.com Received:(qmail 29078 invoked by uid 61); 13 Dec 2001 03:50:09 -0000 Message-Id:<20011213035009.29077.qmail@sources.redhat.com> Date: Wed, 12 Dec 2001 19:56:00 -0000 From: lindsayd@cisco.com Reply-To: lindsayd@cisco.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.2 (1.1.1.1.2.21) Subject: middle-end/5099: m68k-aout/3.0.2/cc1 aborts on asm("movw sr,%0":"=hd"(a)); X-SW-Source: 2001-12/txt/msg00772.txt.bz2 List-Id: >Number: 5099 >Category: middle-end >Synopsis: m68k-aout/3.0.2/cc1 aborts on asm("movw sr,%0":"=hd"(a)); >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-illegal-code >Submitter-Id: net >Arrival-Date: Wed Dec 12 19:56:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Don Lindsay >Release: 3.0.2 >Organization: >Environment: sparc-sun-solaris2.6 x m68k-aout Configuration options were: --with-gnu-as --with-gnu-ld --with-newlib --enable-languages=c++ --disable-shared --with-headers=$MERGE/newlib/libc/include --target m68k-aout >Description: Internal compiler error in instantiate_virtual_regs_1, at function.c:3904 >How-To-Repeat: gcc.68k -S foo.c where foo.c is: typedef unsigned short ushort; ushort set_ipl() { ushort retval; asm ("movw sr,%0" : "=hd" (retval)); return retval; } The killer being the illegal "h" constraint. >Fix: Not sure. The "h" constraint is illegal on the 68k, and should be ignored or complained about. GCC 2.95.3 ignored it, in the sense that the "h" didn't affect the generated .s file for the original guilty program. GDB showed GCC 3.0.2 hit expand_asm_operands, who called parse_output_constraint, and both go through the default case arm when they switch on 'h'. But something caught up with the compiler later on: presumably a consequence of something done by the default case arm. I'd vote for an error message about "unknown constraint". Which would of course have to be coded in a macro supplied by the back ends, like EXTRA_CONSTRAINT, since the backends know what extended contraints they do and don't add. >Release-Note: >Audit-Trail: >Unformatted: