public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/20927] New: ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x)
@ 2005-04-10 14:59 aj at gcc dot gnu dot org
  2005-04-10 15:00 ` [Bug target/20927] " aj at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: aj at gcc dot gnu dot org @ 2005-04-10 14:59 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2828 bytes --]

Compiling plotutils with GCC 4.0 CVS as of yesterday I get the following
ICE:

$ gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/include -I./../include -DLIBPLOT
-I/usr/X11R6/include -O2 -fmessage-length=0 -Wall -pipe -c g_subpaths.c  -fPIC
-DPIC -o .libs/g_subpaths.o -v -save-temps
gcc: warning: -pipe ignored because -save-temps specified
Using built-in specs.
Target: s390x-suse-linux
Configured with: ../configure --enable-threads=posix --prefix=/usr
--with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man
--libdir=/usr/lib64 --libexecdir=/usr/lib64
--enable-languages=c,c++,objc,f95,java,ada --enable-checking
--with-gxx-include-dir=/usr/include/c++/4.0.0 --with-slibdir=/lib64
--with-system-zlib --enable-shared --enable-__cxa_atexit
--without-system-libunwind --host=s390x-suse-linux
Thread model: posix
gcc version 4.0.0 20050409 (prerelease) (SUSE Linux)
 /usr/lib64/gcc/s390x-suse-linux/4.0.0/cc1 -E -quiet -v -I. -I. -I..
-I/usr/X11R6/include -I./../include -I/usr/X11R6/include -DHAVE_CONFIG_H
-DLIBPLOT -DPIC g_subpaths.c -m64 -mzarch -march=z900 -Wall -fmessage-length=0
-fPIC -O2 -fpch-preprocess -o g_subpaths.i
ignoring duplicate directory "."
ignoring duplicate directory "/usr/X11R6/include"
#include "..." search starts here:
#include <...> search starts here:
 .
 ..
 /usr/X11R6/include
 ./../include
 /usr/local/include
 /usr/lib64/gcc/s390x-suse-linux/4.0.0/include
 /usr/lib64/gcc/s390x-suse-linux/4.0.0/../../../../s390x-suse-linux/include
 /usr/include
End of search list.
 /usr/lib64/gcc/s390x-suse-linux/4.0.0/cc1 -fpreprocessed g_subpaths.i -quiet
-dumpbase g_subpaths.c -m64 -mzarch -march=z900 -auxbase-strip
.libs/g_subpaths.o -O2 -Wall -version -fmessage-length=0 -fPIC -o g_subpaths.s
GNU C version 4.0.0 20050409 (prerelease) (SUSE Linux) (s390x-suse-linux)
        compiled by GNU C version 4.0.0 20050409 (prerelease) (SUSE Linux).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
g_subpaths.c: In function ‘_add_arc_as_lines’:
g_subpaths.c:540: internal compiler error: in smallest_mode_for_size, at
stor-layout.c:221
Please submit a full bug report,
with preprocessed source if appropriate.

-- 
           Summary: ICE in smallest_mode_for_size, at stor-layout.c:221
                    (s390x)
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: aj at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,matz at suse dot
                    de,uweigand at de dot ibm dot com
 GCC build triplet: s390x-linux-gnu
  GCC host triplet: s390x-linux-gnu
GCC target triplet: s390x-linux-gnu


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


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

* [Bug target/20927] ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x)
  2005-04-10 14:59 [Bug target/20927] New: ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x) aj at gcc dot gnu dot org
@ 2005-04-10 15:00 ` aj at gcc dot gnu dot org
  2005-04-10 23:32 ` steven at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: aj at gcc dot gnu dot org @ 2005-04-10 15:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From aj at gcc dot gnu dot org  2005-04-10 15:00 -------
Created an attachment (id=8578)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8578&action=view)
Preprocessed source file


-- 


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


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

* [Bug target/20927] ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x)
  2005-04-10 14:59 [Bug target/20927] New: ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x) aj at gcc dot gnu dot org
  2005-04-10 15:00 ` [Bug target/20927] " aj at gcc dot gnu dot org
@ 2005-04-10 23:32 ` steven at gcc dot gnu dot org
  2005-04-10 23:37 ` [Bug target/20927] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-04-10 23:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-04-10 23:32 -------
Yup: 
 
Breakpoint 1, fancy_abort (file=0x82a7f8 "../../gcc-4.0/gcc/stor-layout.c", 
line=221, 
    function=0x82a87c "smallest_mode_for_size") at diagnostic.c:556 
556       internal_error ("in %s, at %s:%d", function, trim_filename (file), 
line); 
(gdb) up 
#1  0x000000000069c413 in smallest_mode_for_size (size=128, class=MODE_FLOAT) 
at stor-layout.c:221 
221       gcc_unreachable (); 
(gdb) up 
#2  0x0000000000677cb3 in choose_reload_regs (chain=0xa0edc8) at 
reload1.c:5413 
5413                        need_mode 
(gdb) l 
5408                      last_class = REGNO_REG_CLASS (i); 
5409 
5410                      if (byte == 0) 
5411                        need_mode = mode; 
5412                      else 
5413                        need_mode 
5414                          = smallest_mode_for_size (GET_MODE_BITSIZE 
(mode) 
5415                                                    + byte * 
BITS_PER_UNIT, 
5416                                                    GET_MODE_CLASS 
(mode)); 
5417 
 
FWIW this code was recently changed by this patch: 
 
2005-03-07  Richard Sandiford  <rsandifo@redhat.com> 
 
        PR rtl-optimization/19683 
        * reload1.c (choose_reload_regs): Pass the number of bits, not the 
        number of bytes, to smallest_int_for_mode.  Fix arguments to 
        REG_CANNOT_CHANGE_MODE_P. 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-04-10 23:32:14
               date|                            |


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


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

* [Bug target/20927] [4.0/4.1 Regression] ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x)
  2005-04-10 14:59 [Bug target/20927] New: ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x) aj at gcc dot gnu dot org
  2005-04-10 15:00 ` [Bug target/20927] " aj at gcc dot gnu dot org
  2005-04-10 23:32 ` steven at gcc dot gnu dot org
@ 2005-04-10 23:37 ` pinskia at gcc dot gnu dot org
  2005-04-11 19:41 ` uweigand at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-10 23:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-10 23:37 -------
But that would mean this was a latent bug as you would get the wrong code before.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
            Summary|ICE in                      |[4.0/4.1 Regression] ICE in
                   |smallest_mode_for_size, at  |smallest_mode_for_size, at
                   |stor-layout.c:221 (s390x)   |stor-layout.c:221 (s390x)


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


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

* [Bug target/20927] [4.0/4.1 Regression] ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x)
  2005-04-10 14:59 [Bug target/20927] New: ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x) aj at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-04-10 23:37 ` [Bug target/20927] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-04-11 19:41 ` uweigand at gcc dot gnu dot org
  2005-04-14  8:25 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: uweigand at gcc dot gnu dot org @ 2005-04-11 19:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From uweigand at gcc dot gnu dot org  2005-04-11 19:40 -------
Reduced testcase:

struct point { double x, y; };
extern void use (struct point);

void test (struct point *pc, struct point p1)
{
  struct point p0 = *pc;

  if (p0.x == p1.x && p0.y == p1.y)
    use (p0);

  asm ("" : : : "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10");

  p1.y -= p0.y;

  use (p0);
  use (p1);
}

The problem is when reload tries to find an inheritance register for
Reload 0: reload_in (DF) = (subreg:DF (reg/v:TI 48 [ p0 ]) 8)
        FP_REGS, RELOAD_FOR_INPUT (opnum = 1)
        reload_in_reg: (subreg:DF (reg/v:TI 48 [ p0 ]) 8)
        reload_reg_rtx: (reg:DF 24 %f8 [orig:45 p0$y ] [45])

because the code in choose_reload_regs tries to reload the inner REG
in a MODE_FLOAT mode of the same size as TImode, and such a mode does
not exist on s390 (the largest floating point mode is DFmode).

However, this shouldn't cause an ICE here; at worst the search for an
inheritance register should be omitted.  Thus I guess the bug is for
choose_reload_regs to call smallest_mode_for_size in the first place.

-- 


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


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

* [Bug target/20927] [4.0/4.1 Regression] ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x)
  2005-04-10 14:59 [Bug target/20927] New: ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x) aj at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-04-11 19:41 ` uweigand at gcc dot gnu dot org
@ 2005-04-14  8:25 ` cvs-commit at gcc dot gnu dot org
  2005-04-14  8:28 ` cvs-commit at gcc dot gnu dot org
  2005-04-14 14:25 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-14  8:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-14 08:25 -------
Subject: Bug 20927

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	uweigand@gcc.gnu.org	2005-04-14 08:25:00

Modified files:
	gcc            : ChangeLog 
	gcc/config/s390: s390-modes.def 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: pr20927.c 

Log message:
	ChangeLog:
	
	PR target/20927
	* config/s390/s390-modes.def: Define TFmode.
	
	testsuite/ChangeLog:
	
	PR target/20927
	* gcc.dg/pr20927.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8283&r2=2.8284
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/s390/s390-modes.def.diff?cvsroot=gcc&r1=1.8&r2=1.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5344&r2=1.5345
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr20927.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug target/20927] [4.0/4.1 Regression] ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x)
  2005-04-10 14:59 [Bug target/20927] New: ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x) aj at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-04-14  8:25 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-14  8:28 ` cvs-commit at gcc dot gnu dot org
  2005-04-14 14:25 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-14  8:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-14 08:28 -------
Subject: Bug 20927

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	uweigand@gcc.gnu.org	2005-04-14 08:28:21

Modified files:
	gcc            : ChangeLog 
	gcc/config/s390: s390-modes.def 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: pr20927.c 

Log message:
	ChangeLog:
	
	PR target/20927
	* config/s390/s390-modes.def: Define TFmode.
	
	testsuite/ChangeLog:
	
	PR target/20927
	* gcc.dg/pr20927.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.152&r2=2.7592.2.153
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/s390/s390-modes.def.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.8&r2=1.8.10.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.124&r2=1.5084.2.125
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr20927.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug target/20927] [4.0/4.1 Regression] ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x)
  2005-04-10 14:59 [Bug target/20927] New: ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x) aj at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-04-14  8:28 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-14 14:25 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-14 14:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-14 14:25 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


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


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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-10 14:59 [Bug target/20927] New: ICE in smallest_mode_for_size, at stor-layout.c:221 (s390x) aj at gcc dot gnu dot org
2005-04-10 15:00 ` [Bug target/20927] " aj at gcc dot gnu dot org
2005-04-10 23:32 ` steven at gcc dot gnu dot org
2005-04-10 23:37 ` [Bug target/20927] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-04-11 19:41 ` uweigand at gcc dot gnu dot org
2005-04-14  8:25 ` cvs-commit at gcc dot gnu dot org
2005-04-14  8:28 ` cvs-commit at gcc dot gnu dot org
2005-04-14 14:25 ` 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).