public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30113]  New: ICE in trunc_int_for_mode
@ 2006-12-07 19:06 pthaugen at us dot ibm dot com
  2006-12-07 19:47 ` [Bug fortran/30113] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: pthaugen at us dot ibm dot com @ 2006-12-07 19:06 UTC (permalink / raw)
  To: gcc-bugs

The following Fortran code, from the gamess CPU2006 benchmark, fails with an
ICE on the 4.1 branch when compiled with -m32 -O3.


      SUBROUTINE RD2PDM(INFILE,TPDM,GBUF,LABS,NINTMX,IPIN)
C
      IMPLICIT DOUBLE PRECISION(A-H,O-Z)
      LOGICAL READMORE
      INTEGER LABS(*),IPIN(*)
      DOUBLE PRECISION  TPDM(*),GBUF(*)
      COMMON /PCKLAB/ LABSIZ
C
C      CALL SEQREW(INFILE)
      READMORE = .TRUE.
      DO WHILE (READMORE)
        NG = 0
        CALL PREAD(INFILE,GBUF,LABS,NG,NINTMX)
        IF (NG.LE.0) READMORE = .FALSE.
        MG = IABS(NG)
        DO M = 1, MG
C
C  UNPACK LABELS
C
                       NPACK = M
                       IF (LABSIZ .EQ. 2) THEN
                         LABEL = LABS( 2*NPACK - 1 )
                         IPACK = ISHFT( LABEL, -16 )
                         JPACK = IAND(  LABEL, 65535 )
                         LABEL = LABS( 2*NPACK     )
                         KPACK = ISHFT( LABEL, -16 )
                         LPACK = IAND(  LABEL, 65535 )
                       ELSE IF (LABSIZ .EQ. 1) THEN
                         LABEL = LABS(NPACK)
                         IPACK = ISHFT( LABEL, -24 )
                         JPACK = IAND( ISHFT( LABEL, -16 ), 255 )
                         KPACK = IAND( ISHFT( LABEL,  -8 ), 255 )
                         LPACK = IAND( LABEL, 255 )
                       END IF
                       I = IPACK
                       J = JPACK
                       K = KPACK
                       L = LPACK
          IJ = IPIN(MAX(I,J)) + MIN(I,J)
          KL = IPIN(MAX(K,L)) + MIN(K,L)
          IJKL = IPIN(MAX(IJ,KL)) + MIN(IJ,KL)
          TPDM(IJKL) = GBUF(M)
        END DO  ! CURRENT BATCH 
      END DO  ! NEXT BATCH
      RETURN
      END


temp> gfortran -c -O3 -m32 gamess-failure.f
gamess-failure.f: In function #rd2pdm#:
gamess-failure.f:45: internal compiler error: in trunc_int_for_mode, at
explow.c:54
Please submit a full bug report,


-- 
           Summary: ICE in trunc_int_for_mode
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pthaugen at us dot ibm dot com
 GCC build triplet: powerpc64-linux
  GCC host triplet: powerpc64-linux
GCC target triplet: powerpc64-linux


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


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

* [Bug fortran/30113] ICE in trunc_int_for_mode
  2006-12-07 19:06 [Bug fortran/30113] New: ICE in trunc_int_for_mode pthaugen at us dot ibm dot com
@ 2006-12-07 19:47 ` pinskia at gcc dot gnu dot org
  2006-12-08  7:37 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-07 19:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-12-07 19:46 -------
This works with "4.3.0 20061205"


-- 


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


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

* [Bug fortran/30113] ICE in trunc_int_for_mode
  2006-12-07 19:06 [Bug fortran/30113] New: ICE in trunc_int_for_mode pthaugen at us dot ibm dot com
  2006-12-07 19:47 ` [Bug fortran/30113] " pinskia at gcc dot gnu dot org
@ 2006-12-08  7:37 ` rguenth at gcc dot gnu dot org
  2006-12-08 18:35 ` [Bug rtl-optimization/30113] " rakdver at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-12-08  7:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2006-12-08 07:37 -------
Confirmed.  Fails with -m32 -O -funswitch-loops.

GNU C version 4.1.2 20061129 (prerelease) (SUSE Linux) (powerpc64-linux-gnu)

#1  0x00000000102be550 in trunc_int_for_mode (c=0, mode=CCmode)
    at ../../gcc41/BUILD/gcc-4.1.2-20061129/gcc/explow.c:54
54        gcc_assert (SCALAR_INT_MODE_P (mode));

#2  0x000000001029dd58 in gen_int_mode (c=0, mode=CCmode)
    at ../../gcc41/BUILD/gcc-4.1.2-20061129/gcc/emit-rtl.c:404
#3  0x00000000105d1394 in simplify_const_binary_operation (code=MINUS,
    mode=CCmode, op0=0x400002ab400, op1=0x400002ab400)
    at ../../gcc41/BUILD/gcc-4.1.2-20061129/gcc/simplify-rtx.c:2573
#4  0x00000000105cb798 in simplify_binary_operation (code=MINUS, mode=CCmode,
    op0=0x400002ab400, op1=0x400002ab400)
    at ../../gcc41/BUILD/gcc-4.1.2-20061129/gcc/simplify-rtx.c:1222
#5  0x00000000105c76e8 in simplify_gen_binary (code=MINUS, mode=CCmode,
    op0=0x400002ab400, op1=0x400002ab400)
    at ../../gcc41/BUILD/gcc-4.1.2-20061129/gcc/simplify-rtx.c:124
#6  0x00000000102c6be0 in implies_p (a=0x40000400540, b=0x400004004e0)
    at ../../gcc41/BUILD/gcc-4.1.2-20061129/gcc/loop-iv.c:1500
#7  0x00000000102c722c in simplify_using_condition (cond=0x400003fd580,
    expr=0xfffffa6ad68, altered=0x0)
    at ../../gcc41/BUILD/gcc-4.1.2-20061129/gcc/loop-iv.c:1651
#8  0x0000000010853148 in unswitch_single_loop (loops=0x10c6fb60,
    loop=0x10c74e80, cond_checked=0x400003fd660, num=2)
    at ../../gcc41/BUILD/gcc-4.1.2-20061129/gcc/loop-unswitch.c:348

(gdb)
#6  0x00000000102c6be0 in implies_p (a=0x40000400540, b=0x400004004e0)
    at ../../gcc41/BUILD/gcc-4.1.2-20061129/gcc/loop-iv.c:1500
1500          if (mode != VOIDmode
(gdb) call debug_rtx (a)
(gt:SI (reg:CC 171)
    (const_int 0 [0x0]))
(gdb) call debug_rtx (b)
(ge:SI (reg:CC 171)
    (const_int 0 [0x0]))

which of course doesn't make sense to ask with

1500          if (mode != VOIDmode
1501              && rtx_equal_p (op1, opb1)
1502              && simplify_gen_binary (MINUS, mode, opb0, op0) ==
const1_rtx)1503            return true;


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org, rakdver at gcc dot gnu
                   |                            |dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2006-12-08 07:37:00
               date|                            |


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


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

* [Bug rtl-optimization/30113] ICE in trunc_int_for_mode
  2006-12-07 19:06 [Bug fortran/30113] New: ICE in trunc_int_for_mode pthaugen at us dot ibm dot com
  2006-12-07 19:47 ` [Bug fortran/30113] " pinskia at gcc dot gnu dot org
  2006-12-08  7:37 ` rguenth at gcc dot gnu dot org
@ 2006-12-08 18:35 ` rakdver at gcc dot gnu dot org
  2006-12-11 21:30 ` rakdver at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-12-08 18:35 UTC (permalink / raw)
  To: gcc-bugs



-- 

rakdver at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rakdver at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-12-08 07:37:00         |2006-12-08 18:34:49
               date|                            |


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


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

* [Bug rtl-optimization/30113] ICE in trunc_int_for_mode
  2006-12-07 19:06 [Bug fortran/30113] New: ICE in trunc_int_for_mode pthaugen at us dot ibm dot com
                   ` (2 preceding siblings ...)
  2006-12-08 18:35 ` [Bug rtl-optimization/30113] " rakdver at gcc dot gnu dot org
@ 2006-12-11 21:30 ` rakdver at gcc dot gnu dot org
  2007-07-03 14:33 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-12-11 21:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rakdver at gcc dot gnu dot org  2006-12-11 21:29 -------
Subject: Bug 30113

Author: rakdver
Date: Mon Dec 11 21:29:44 2006
New Revision: 119748

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119748
Log:
        PR rtl-optimization/30113
        * loop-iv.c (implies_p): Require the mode of the operands to be
        scalar.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/loop-iv.c


-- 


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


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

* [Bug rtl-optimization/30113] ICE in trunc_int_for_mode
  2006-12-07 19:06 [Bug fortran/30113] New: ICE in trunc_int_for_mode pthaugen at us dot ibm dot com
                   ` (3 preceding siblings ...)
  2006-12-11 21:30 ` rakdver at gcc dot gnu dot org
@ 2007-07-03 14:33 ` rguenth at gcc dot gnu dot org
  2007-07-03 14:35 ` [Bug rtl-optimization/30113] [4.1 Regression] " rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-07-03 14:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2007-07-03 14:33 -------
Subject: Bug 30113

Author: rguenth
Date: Tue Jul  3 14:33:16 2007
New Revision: 126259

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126259
Log:
2007-07-03  Richard Guenther  <rguenther@suse.de>

        Backport from mainline:
        2006-12-11  Zdenek Dvorak <dvorakz@suse.cz>

        PR rtl-optimization/30113
        * loop-iv.c (implies_p): Require the mode of the operands to be
        scalar.

Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/loop-iv.c


-- 


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


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

* [Bug rtl-optimization/30113] [4.1 Regression] ICE in trunc_int_for_mode
  2006-12-07 19:06 [Bug fortran/30113] New: ICE in trunc_int_for_mode pthaugen at us dot ibm dot com
                   ` (4 preceding siblings ...)
  2007-07-03 14:33 ` rguenth at gcc dot gnu dot org
@ 2007-07-03 14:35 ` rguenth at gcc dot gnu dot org
  2007-09-21 20:17 ` pthaugen at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-07-03 14:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2007-07-03 14:35 -------
This is a regression from 4.0.4.  Fixed on the 4.2 branch.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|4.3.0                       |4.3.0 4.2.1 4.0.4
            Summary|ICE in trunc_int_for_mode   |[4.1 Regression] ICE in
                   |                            |trunc_int_for_mode
   Target Milestone|---                         |4.1.3


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


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

* [Bug rtl-optimization/30113] [4.1 Regression] ICE in trunc_int_for_mode
  2006-12-07 19:06 [Bug fortran/30113] New: ICE in trunc_int_for_mode pthaugen at us dot ibm dot com
                   ` (5 preceding siblings ...)
  2007-07-03 14:35 ` [Bug rtl-optimization/30113] [4.1 Regression] " rguenth at gcc dot gnu dot org
@ 2007-09-21 20:17 ` pthaugen at gcc dot gnu dot org
  2007-09-21 20:45 ` ebotcazou at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pthaugen at gcc dot gnu dot org @ 2007-09-21 20:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pthaugen at gcc dot gnu dot org  2007-09-21 20:17 -------
Subject: Bug 30113

Author: pthaugen
Date: Fri Sep 21 20:17:04 2007
New Revision: 128656

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128656
Log:
2007-09-21  Pat Haugen  <pthaugen@us.ibm.com>

        Backport the following patch:

        2006-12-11  Zdenek Dvorak <dvorakz@suse.cz>

        PR rtl-optimization/30113
        * loop-iv.c (implies_p): Require the mode of the operands to be
         scalar.


Modified:
    branches/ibm/gcc-4_1-branch/gcc/ChangeLog
    branches/ibm/gcc-4_1-branch/gcc/loop-iv.c


-- 


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


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

* [Bug rtl-optimization/30113] [4.1 Regression] ICE in trunc_int_for_mode
  2006-12-07 19:06 [Bug fortran/30113] New: ICE in trunc_int_for_mode pthaugen at us dot ibm dot com
                   ` (6 preceding siblings ...)
  2007-09-21 20:17 ` pthaugen at gcc dot gnu dot org
@ 2007-09-21 20:45 ` ebotcazou at gcc dot gnu dot org
  2007-11-02 12:25 ` ebotcazou at gcc dot gnu dot org
  2007-11-02 12:26 ` ebotcazou at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2007-09-21 20:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ebotcazou at gcc dot gnu dot org  2007-09-21 20:45 -------
How come no testcase has been committed with the fix?


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org


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


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

* [Bug rtl-optimization/30113] [4.1 Regression] ICE in trunc_int_for_mode
  2006-12-07 19:06 [Bug fortran/30113] New: ICE in trunc_int_for_mode pthaugen at us dot ibm dot com
                   ` (7 preceding siblings ...)
  2007-09-21 20:45 ` ebotcazou at gcc dot gnu dot org
@ 2007-11-02 12:25 ` ebotcazou at gcc dot gnu dot org
  2007-11-02 12:26 ` ebotcazou at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2007-11-02 12:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from ebotcazou at gcc dot gnu dot org  2007-11-02 12:24 -------
Subject: Bug 30113

Author: ebotcazou
Date: Fri Nov  2 12:24:44 2007
New Revision: 129849

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129849
Log:
        Backport from mainline:
        2006-12-11  Zdenek Dvorak  <dvorakz@suse.cz>

        PR rtl-optimization/30113
        * loop-iv.c (implies_p): Require the mode of the operands to be
        scalar.


Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/loop-iv.c


-- 


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


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

* [Bug rtl-optimization/30113] [4.1 Regression] ICE in trunc_int_for_mode
  2006-12-07 19:06 [Bug fortran/30113] New: ICE in trunc_int_for_mode pthaugen at us dot ibm dot com
                   ` (8 preceding siblings ...)
  2007-11-02 12:25 ` ebotcazou at gcc dot gnu dot org
@ 2007-11-02 12:26 ` ebotcazou at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2007-11-02 12:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from ebotcazou at gcc dot gnu dot org  2007-11-02 12:26 -------
Everywhere.


-- 

ebotcazou at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2007-11-02 12:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-07 19:06 [Bug fortran/30113] New: ICE in trunc_int_for_mode pthaugen at us dot ibm dot com
2006-12-07 19:47 ` [Bug fortran/30113] " pinskia at gcc dot gnu dot org
2006-12-08  7:37 ` rguenth at gcc dot gnu dot org
2006-12-08 18:35 ` [Bug rtl-optimization/30113] " rakdver at gcc dot gnu dot org
2006-12-11 21:30 ` rakdver at gcc dot gnu dot org
2007-07-03 14:33 ` rguenth at gcc dot gnu dot org
2007-07-03 14:35 ` [Bug rtl-optimization/30113] [4.1 Regression] " rguenth at gcc dot gnu dot org
2007-09-21 20:17 ` pthaugen at gcc dot gnu dot org
2007-09-21 20:45 ` ebotcazou at gcc dot gnu dot org
2007-11-02 12:25 ` ebotcazou at gcc dot gnu dot org
2007-11-02 12:26 ` ebotcazou 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).