public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/42681]  New: [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity"
@ 2010-01-10 14:11 zsojka at seznam dot cz
  2010-01-10 14:14 ` [Bug tree-optimization/42681] " zsojka at seznam dot cz
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: zsojka at seznam dot cz @ 2010-01-10 14:11 UTC (permalink / raw)
  To: gcc-bugs

Command line:
g++ -O1 -fgraphite-identity -c testcase.cpp

Tested revisions:
r155777 - crash
r155680 - OK
r155256 - OK
r154830 - OK

Output:
$ /mnt/svn/gcc-trunk/binary-155777-lto/bin/g++ -O1 -fgraphite-identity -c
testcase.cpp
testcase.cpp: In function ‘void Init(A*)’:
testcase.cpp:9:6: internal compiler error: in build2_stat, at tree.c:3664
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Valgrind:
no errors reported


-- 
           Summary: [4.5 Regression] ICE: in build2_stat, at tree.c:3664
                    with "-O1 -fgraphite-identity"
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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


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

* [Bug tree-optimization/42681] [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity"
  2010-01-10 14:11 [Bug tree-optimization/42681] New: [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity" zsojka at seznam dot cz
@ 2010-01-10 14:14 ` zsojka at seznam dot cz
  2010-01-10 20:52 ` spop at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: zsojka at seznam dot cz @ 2010-01-10 14:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from zsojka at seznam dot cz  2010-01-10 14:14 -------
Created an attachment (id=19527)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19527&action=view)
reduced testcase

Command line:
g++ -O1 -fgraphite-identity -c pr42681.cpp


-- 


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


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

* [Bug tree-optimization/42681] [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity"
  2010-01-10 14:11 [Bug tree-optimization/42681] New: [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity" zsojka at seznam dot cz
  2010-01-10 14:14 ` [Bug tree-optimization/42681] " zsojka at seznam dot cz
@ 2010-01-10 20:52 ` spop at gcc dot gnu dot org
  2010-01-10 21:29 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-01-10 20:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from spop at gcc dot gnu dot org  2010-01-10 20:52 -------
Mine.

I can reproduce the ICE in the Graphite branch with these flags:
-O1 -fgraphite-identity -fno-loop-block -fno-loop-interchange
-fno-loop-strip-mine


-- 

spop at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |spop at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-01-10 20:52:39
               date|                            |


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


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

* [Bug tree-optimization/42681] [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity"
  2010-01-10 14:11 [Bug tree-optimization/42681] New: [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity" zsojka at seznam dot cz
  2010-01-10 14:14 ` [Bug tree-optimization/42681] " zsojka at seznam dot cz
  2010-01-10 20:52 ` spop at gcc dot gnu dot org
@ 2010-01-10 21:29 ` rguenth at gcc dot gnu dot org
  2010-01-10 21:33 ` spop at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-10 21:29 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.5.0


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


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

* [Bug tree-optimization/42681] [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity"
  2010-01-10 14:11 [Bug tree-optimization/42681] New: [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity" zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2010-01-10 21:29 ` rguenth at gcc dot gnu dot org
@ 2010-01-10 21:33 ` spop at gcc dot gnu dot org
  2010-01-10 22:53 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-01-10 21:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from spop at gcc dot gnu dot org  2010-01-10 21:33 -------
The problem is in the code generation of the following CLAST:

if (7*T_6%8 == 0) {
...
}

where T_6 has a pointer type, and build refuses to construct a MULT_EXPR with a
pointer type.

I think that for this kind of expressions we will have to stop gloog, remove
the code that we generated, and leave the non transformed version.


-- 

spop at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.5.0                       |---


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


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

* [Bug tree-optimization/42681] [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity"
  2010-01-10 14:11 [Bug tree-optimization/42681] New: [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity" zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2010-01-10 21:33 ` spop at gcc dot gnu dot org
@ 2010-01-10 22:53 ` rguenth at gcc dot gnu dot org
  2010-01-10 22:56 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-10 22:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2010-01-10 22:53 -------
The proper thing is to convert the pointer to an appropriate TYPE_PRECISION
signed type, do the arithmetic on it and after it convert it back to the
pointer type.

What does CLAST know about overflow issues here btw?  The expression looks
dubious to me (it reads to me as (7*T_6)%8).


-- 


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


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

* [Bug tree-optimization/42681] [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity"
  2010-01-10 14:11 [Bug tree-optimization/42681] New: [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity" zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2010-01-10 22:53 ` rguenth at gcc dot gnu dot org
@ 2010-01-10 22:56 ` rguenth at gcc dot gnu dot org
  2010-01-14  8:15 ` spop at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-10 22:56 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.5.0


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


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

* [Bug tree-optimization/42681] [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity"
  2010-01-10 14:11 [Bug tree-optimization/42681] New: [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity" zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2010-01-10 22:56 ` rguenth at gcc dot gnu dot org
@ 2010-01-14  8:15 ` spop at gcc dot gnu dot org
  2010-01-14  8:38 ` spop at gcc dot gnu dot org
  2010-01-14  8:38 ` spop at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-01-14  8:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from spop at gcc dot gnu dot org  2010-01-14 08:15 -------
Subject: Bug 42681

Author: spop
Date: Thu Jan 14 08:15:09 2010
New Revision: 155883

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155883
Log:
Fix PR42681.

2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>

        PR middle-end/42681
        * graphite-clast-to-gimple.c (gloog_error): New static variable.
        (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
        Set gloog_error when such an expression failed to be built.
        (translate_clast): Early return when gloog_error is set.
        (gloog): Clear gloog_error.  When gloog_error is set, call
        set_ifsese_condition to enable the original code.  Return the status
        of the code generation based on gloog_error.
        * sese.c (set_ifsese_condition): New.
        * sese.h (set_ifsese_condition): Declared.

        * testsuite/g++.dg/graphite/pr42681.C: New.

Added:
    branches/graphite/gcc/testsuite/g++.dg/graphite/pr42681.C
Modified:
    branches/graphite/gcc/ChangeLog.graphite
    branches/graphite/gcc/graphite-clast-to-gimple.c
    branches/graphite/gcc/sese.c
    branches/graphite/gcc/sese.h


-- 


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


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

* [Bug tree-optimization/42681] [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity"
  2010-01-10 14:11 [Bug tree-optimization/42681] New: [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity" zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2010-01-14  8:15 ` spop at gcc dot gnu dot org
@ 2010-01-14  8:38 ` spop at gcc dot gnu dot org
  2010-01-14  8:38 ` spop at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-01-14  8:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from spop at gcc dot gnu dot org  2010-01-14 08:37 -------
Subject: Bug 42681

Author: spop
Date: Thu Jan 14 08:37:26 2010
New Revision: 155884

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155884
Log:
Fix PR42681.

2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>

        PR middle-end/42681
        * graphite-clast-to-gimple.c (gloog_error): New static variable.
        (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
        Set gloog_error when such an expression failed to be built.
        (translate_clast): Early return when gloog_error is set.
        (gloog): Clear gloog_error.  When gloog_error is set, call
        set_ifsese_condition to enable the original code.  Return the status
        of the code generation based on gloog_error.
        * sese.c (set_ifsese_condition): New.
        * sese.h (set_ifsese_condition): Declared.

        * testsuite/g++.dg/graphite/pr42681.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/graphite/pr42681.C
Modified:
    trunk/gcc/ChangeLog.graphite
    trunk/gcc/graphite-clast-to-gimple.c
    trunk/gcc/sese.c
    trunk/gcc/sese.h


-- 


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


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

* [Bug tree-optimization/42681] [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity"
  2010-01-10 14:11 [Bug tree-optimization/42681] New: [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity" zsojka at seznam dot cz
                   ` (7 preceding siblings ...)
  2010-01-14  8:38 ` spop at gcc dot gnu dot org
@ 2010-01-14  8:38 ` spop at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-01-14  8:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from spop at gcc dot gnu dot org  2010-01-14 08:38 -------
Fixed.


-- 

spop at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2010-01-14  8:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-10 14:11 [Bug tree-optimization/42681] New: [4.5 Regression] ICE: in build2_stat, at tree.c:3664 with "-O1 -fgraphite-identity" zsojka at seznam dot cz
2010-01-10 14:14 ` [Bug tree-optimization/42681] " zsojka at seznam dot cz
2010-01-10 20:52 ` spop at gcc dot gnu dot org
2010-01-10 21:29 ` rguenth at gcc dot gnu dot org
2010-01-10 21:33 ` spop at gcc dot gnu dot org
2010-01-10 22:53 ` rguenth at gcc dot gnu dot org
2010-01-10 22:56 ` rguenth at gcc dot gnu dot org
2010-01-14  8:15 ` spop at gcc dot gnu dot org
2010-01-14  8:38 ` spop at gcc dot gnu dot org
2010-01-14  8:38 ` spop 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).