public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ncahill_alt at yahoo dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/53942] New: unable to find a register to spill in class 'CREG' Date: Thu, 12 Jul 2012 16:24:00 -0000 [thread overview] Message-ID: <bug-53942-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53942 Bug #: 53942 Summary: unable to find a register to spill in class 'CREG' Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassigned@gcc.gnu.org ReportedBy: ncahill_alt@yahoo.com This command: gcc -O2 -mtune=pentium2 -fno-inline -x c++ -std=gnu++98 -c a.c -o a.o gives this output: ### output ### a.c: In function 'unsigned char _ZL1fP2S_h.isra.0(UINT16, UINT16, UINT16, unsigned char)': a.c:25:1: error: unable to find a register to spill in class 'CREG' a.c:25:1: error: this is the insn: (insn 11 7 12 2 (parallel [ (set (reg:SI 1 dx [85]) (ashiftrt:SI (reg:SI 1 dx [85]) (reg/v:QI 81 [ i ]))) (clobber (reg:CC 17 flags)) ]) a.c:20 409 {*ashrsi3_1} (expr_list:REG_UNUSED (reg:CC 17 flags) (nil))) a.c:25: confused by earlier errors, bailing out ### end output ### when compiling this testcase: ### a.c ### typedef unsigned short UINT16; typedef unsigned int UINT32; typedef struct S_ S; struct S_ { UINT16 data[3]; UINT32 x; UINT32 y; }; static inline S *get_S() {} static unsigned char f(S *s, unsigned char i) { unsigned char c=0; unsigned char v; v = s->data[0]; c|=v; v=((s->data[1])&(1<<i))?1:0; c|=v<<1; v=((s->data[2])&0xff)&(1<<i); c|=v<<2; return c; } void g() { S *s = get_S(); s->x=f(s,6); s->y=f(s,7); } ### end a.c ### Using -mtune=i686 works. I'm using gcc 4.7.1, i686-pc-linux-gnu, 32-bit. Thank you. Neil.
next reply other threads:[~2012-07-12 16:24 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-07-12 16:24 ncahill_alt at yahoo dot com [this message] 2012-07-13 14:21 ` [Bug target/53942] [4.6/4.7/4.8 Regression] " ubizjak at gmail dot com 2012-07-13 14:37 ` [Bug rtl-optimization/53942] " ubizjak at gmail dot com 2012-07-16 11:32 ` jakub at gcc dot gnu.org 2012-07-16 11:54 ` jakub at gcc dot gnu.org 2012-07-19 20:49 ` jakub at gcc dot gnu.org 2012-08-10 14:41 ` izamyatin at gmail dot com 2012-08-13 7:35 ` jakub at gcc dot gnu.org 2012-09-02 13:57 ` [Bug rtl-optimization/53942] [4.6 " ubizjak at gmail dot com 2013-04-12 16:27 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-53942-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).