inline-asm/4823: gcc reports internal compiler error on legal code

Wolfgang Bangerth bangerth@ticam.utexas.edu
Wed Jan 8 01:36:00 GMT 2003


The following reply was made to PR inline-asm/4823; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: gcc-bugs@gcc.gnu.org, <gcc-gnats@gcc.gnu.org>
Cc:  
Subject: Re: inline-asm/4823: gcc reports internal compiler error on legal
 code
Date: Tue, 7 Jan 2003 19:33:19 -0600 (CST)

 This is also visible on x86-linux. A short testcase is this:
 ---------------------------------
 void f() {
    double result;
    asm volatile (
       "  faddp    %0, %1  \n\t"
    :  "=&t" (result)
    :  "u"   (result),
       "0"   (result)
    :  "%st",    "%st(1)", "%st(2)", "%st(3)",
       "%st(4)", "%st(5)", "%st(6)", "%st(7)"
    );
 }
 -------------------------
 
 It crashes like so:
 tmp/g> /home/bangerth/bin/gcc-3.4-pre/bin/gcc temp.c
 temp.c: In function `f':
 temp.c:3: error: output constraint 0 cannot be specified together with 
 "st" clobber
 temp.c:11: internal compiler error: in convert_regs_1, at reg-stack.c:2740
 
 
 The crash is in fact a regression since it worked in gcc2.95. gcc3.0.4 
 issued this, differing, message:
 
 tmp/g> /home/bangerth/bin/gcc-3.0.4/bin/gcc temp.c
 temp.c: In function `f':
 temp.c:11: Internal compiler error in emit_swap_insn, at reg-stack.c:951
 
 
 gcc3.2 crashes (with the internal error replaced with "bailing out"), as 
 well as 3.3 and 3.4.
 
 W.
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth             email:            bangerth@ticam.utexas.edu
                               www: http://www.ticam.utexas.edu/~bangerth/
 
 



More information about the Gcc-prs mailing list