public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/18511] New: cc1plus segfaults when compiling libstdc++-v3/src/localename.cc
@ 2004-11-16  1:36 kkojima at gcc dot gnu dot org
  2004-12-23  4:54 ` [Bug target/18511] " cvs-commit at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2004-11-16  1:36 UTC (permalink / raw)
  To: gcc-bugs

For x86 cross sh4-unknown-linux-gnu, 4.0.0 cc1plus segfaults
when compiling libstdc++-v3/src/localename.cc:

Program received signal SIGSEGV, Segmentation fault.
0x082d8e77 in regno_clobbered_p (regno=1139, insn=0x9bb9, mode=SImode, sets=0)
    at ../../ORIG/gcc/gcc/reload.c:6931
6931      unsigned int nregs = hard_regno_nregs[regno][mode];

and the backtrace is

#0  0x082d8e77 in regno_clobbered_p (regno=1139, insn=0x9bb9, mode=SImode,
    sets=0) at ../../ORIG/gcc/gcc/reload.c:6931
#1  0x082fe976 in emit_output_reload_insns (chain=0x92559e0, rl=0x84c7420, j=0)
    at ../../ORIG/gcc/gcc/reload1.c:6702
#2  0x082ff237 in do_output_reload (chain=0x92559e0, rl=0x84c7420, j=0)
    at ../../ORIG/gcc/gcc/reload1.c:6911
...

Thus the cause of segfault is that regno_clobbered_p is called for
a pseudo register 1139 while the first argument REGNO of regno_clobbered_p
must be a hard register:

regno_clobbered_p (unsigned int regno, rtx insn, enum machine_mode mode, int sets)
{
  unsigned int nregs = hard_regno_nregs[regno][mode];
  unsigned int endregno = regno + nregs;

-- 
           Summary: cc1plus segfaults when compiling libstdc++-
                    v3/src/localename.cc
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kkojima at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: sh4-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18511


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/18511] cc1plus segfaults when compiling libstdc++-v3/src/localename.cc
  2004-11-16  1:36 [Bug target/18511] New: cc1plus segfaults when compiling libstdc++-v3/src/localename.cc kkojima at gcc dot gnu dot org
@ 2004-12-23  4:54 ` cvs-commit at gcc dot gnu dot org
  2004-12-23  6:17 ` kkojima at gcc dot gnu dot org
  2005-01-07 14:16 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-23  4:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-12-23 04:53 -------
Subject: Bug 18511

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	kkojima@gcc.gnu.org	2004-12-23 04:53:51

Modified files:
	gcc            : ChangeLog reload.c reload1.c 

Log message:
	PR target/18511
	* reload1.c (emit_output_reload_insns): Check if OLD is a hard
	register before calling regno_clobbered_p.
	* reload.c: Update comment for regno_clobbered_p.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6929&r2=2.6930
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/reload.c.diff?cvsroot=gcc&r1=1.261&r2=1.262
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/reload1.c.diff?cvsroot=gcc&r1=1.455&r2=1.456



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18511


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/18511] cc1plus segfaults when compiling libstdc++-v3/src/localename.cc
  2004-11-16  1:36 [Bug target/18511] New: cc1plus segfaults when compiling libstdc++-v3/src/localename.cc kkojima at gcc dot gnu dot org
  2004-12-23  4:54 ` [Bug target/18511] " cvs-commit at gcc dot gnu dot org
@ 2004-12-23  6:17 ` kkojima at gcc dot gnu dot org
  2005-01-07 14:16 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2004-12-23  6:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kkojima at gcc dot gnu dot org  2004-12-23 06:17 -------
Fixed.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18511


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/18511] cc1plus segfaults when compiling libstdc++-v3/src/localename.cc
  2004-11-16  1:36 [Bug target/18511] New: cc1plus segfaults when compiling libstdc++-v3/src/localename.cc kkojima at gcc dot gnu dot org
  2004-12-23  4:54 ` [Bug target/18511] " cvs-commit at gcc dot gnu dot org
  2004-12-23  6:17 ` kkojima at gcc dot gnu dot org
@ 2005-01-07 14:16 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-07 14:16 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18511


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-01-07 14:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-16  1:36 [Bug target/18511] New: cc1plus segfaults when compiling libstdc++-v3/src/localename.cc kkojima at gcc dot gnu dot org
2004-12-23  4:54 ` [Bug target/18511] " cvs-commit at gcc dot gnu dot org
2004-12-23  6:17 ` kkojima at gcc dot gnu dot org
2005-01-07 14:16 ` pinskia at gcc dot gnu dot org

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).