public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed
       [not found] <bug-45633-4@http.gcc.gnu.org/bugzilla/>
@ 2015-02-05 23:45 ` law at redhat dot com
  0 siblings, 0 replies; 12+ messages in thread
From: law at redhat dot com @ 2015-02-05 23:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45633

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ysato at users dot sourceforge.jp

--- Comment #12 from Jeffrey A. Law <law at redhat dot com> ---
*** Bug 47998 has been marked as a duplicate of this bug. ***


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

* [Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed
  2010-09-10 11:18 [Bug tree-optimization/45633] New: " jojelino at gmail dot com
                   ` (9 preceding siblings ...)
  2010-09-15 15:43 ` jakub at gcc dot gnu dot org
@ 2010-09-15 16:06 ` jakub at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-09-15 16:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jakub at gcc dot gnu dot org  2010-09-15 16:06 -------
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

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


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


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

* [Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed
  2010-09-10 11:18 [Bug tree-optimization/45633] New: " jojelino at gmail dot com
                   ` (8 preceding siblings ...)
  2010-09-14 18:43 ` jakub at gcc dot gnu dot org
@ 2010-09-15 15:43 ` jakub at gcc dot gnu dot org
  2010-09-15 16:06 ` jakub at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-09-15 15:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from jakub at gcc dot gnu dot org  2010-09-15 15:43 -------
Subject: Bug 45633

Author: jakub
Date: Wed Sep 15 15:42:41 2010
New Revision: 164312

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164312
Log:
        PR tree-optimization/45633
        * tree-cfg.c (verify_gimple_assign_binary): Allow
        MINUS_EXPR with lhs and rhs1 pointer vector and
        rhs2 sizetype vector.
        * expr.c (expand_expr_real_2) <case PLUS_EXPR>: For pointer
        or vector pointer use TER to optimize pointer subtraction.

        * gcc.dg/vect/pr45633.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/vect/pr45633.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/expr.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-cfg.c


-- 


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


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

* [Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed
  2010-09-10 11:18 [Bug tree-optimization/45633] New: " jojelino at gmail dot com
                   ` (7 preceding siblings ...)
  2010-09-14 17:16 ` jakub at gcc dot gnu dot org
@ 2010-09-14 18:43 ` jakub at gcc dot gnu dot org
  2010-09-15 15:43 ` jakub at gcc dot gnu dot org
  2010-09-15 16:06 ` jakub at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-09-14 18:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jakub at gcc dot gnu dot org  2010-09-14 18:43 -------
Created an attachment (id=21796)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21796&action=view)
gcc46-pr45633-3.patch

Patch that uses TER to expand PLUS_EXPR/POINTER_PLUS_EXPR as MINUS_EXPR if it
is really pointer subtraction.


-- 


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


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

* [Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed
  2010-09-10 11:18 [Bug tree-optimization/45633] New: " jojelino at gmail dot com
                   ` (6 preceding siblings ...)
  2010-09-14 16:20 ` jakub at gcc dot gnu dot org
@ 2010-09-14 17:16 ` jakub at gcc dot gnu dot org
  2010-09-14 18:43 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-09-14 17:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jakub at gcc dot gnu dot org  2010-09-14 17:15 -------
I've looked at the combiner with the second patch, but I'm afraid this isn't
fixable in the combiner easily.  While combiner is able for i3
(set (reg:V2DI res) (plus:V2DI (reg:V2DI temp) (mem:V2DI (symbol_ref:P t))))
, i2
(set (reg:V2DI temp) (minus:V2DI zero) (mem:V2DI (reg:V2DI a)))
and i1
(set (reg:V2DI zero) (const_vector:V2DI [0 0]))
to figure this is
(set (reg:V2DI res) (minus:V2DI (mem:V2DI (symbol_ref:P t)) (reg:V2DI a))
(plus repeating i1, as its result is not dead), this pattern doesn't match
as minus obviously isn't commutative and combiner doesn't try to make 3 insns
out of 3.  So I'd prefer if we could either apply the first patch, or try TER
on the PLUS_EXPR to see if the second operand isn't negation and expand it as
MINUS_EXPR, even when MINUS_EXPR isn't allowed on such arguments in GIMPLE.


-- 


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


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

* [Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed
  2010-09-10 11:18 [Bug tree-optimization/45633] New: " jojelino at gmail dot com
                   ` (5 preceding siblings ...)
  2010-09-14 16:18 ` jakub at gcc dot gnu dot org
@ 2010-09-14 16:20 ` jakub at gcc dot gnu dot org
  2010-09-14 17:16 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-09-14 16:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jakub at gcc dot gnu dot org  2010-09-14 16:20 -------
Created an attachment (id=21795)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21795&action=view)
gcc46-pr45633-2.patch

Another fix, this one keeps disallowing such MINUS_EXPR.  Unfortunately the
generated code is worse, apparently no RTL pass is able to do that
tmp1 = -b
r = a + tmp1
into
r = a - b
transformation for vector modes.


-- 


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


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

* [Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed
  2010-09-10 11:18 [Bug tree-optimization/45633] New: " jojelino at gmail dot com
                   ` (4 preceding siblings ...)
  2010-09-14 15:24 ` jakub at gcc dot gnu dot org
@ 2010-09-14 16:18 ` jakub at gcc dot gnu dot org
  2010-09-14 16:20 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-09-14 16:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jakub at gcc dot gnu dot org  2010-09-14 16:18 -------
Created an attachment (id=21794)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21794&action=view)
gcc46-pr45633-1.patch

The s[i] = -s[i]; line is also unnecessary in the testcase.

One possible patch attached, allows also MINUS_EXPR with vector pointer on
lhs/rhs1 and vector sizetype on rhs2.


-- 


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


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

* [Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed
  2010-09-10 11:18 [Bug tree-optimization/45633] New: " jojelino at gmail dot com
                   ` (3 preceding siblings ...)
  2010-09-11 20:59 ` jojelino at gmail dot com
@ 2010-09-14 15:24 ` jakub at gcc dot gnu dot org
  2010-09-14 16:18 ` jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-09-14 15:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2010-09-14 15:24 -------
Simplified testcase that ICEs the same way on x86_64-linux (-O3) and i686-linux
(-O3 -msse2):

int s[4];
unsigned char *t[4];

void
foo (void)
{
  int i;
  for (i = 0; i < 4; i++)
    {
      s[i] = -s[i];
      t[i] -= s[i];
    }
}


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
  GCC build triplet|i686-pc-cygwin              |
   GCC host triplet|i686-pc-cygwin              |
 GCC target triplet|i686-pc-cygwin              |
   Last reconfirmed|0000-00-00 00:00:00         |2010-09-14 15:24:04
               date|                            |


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


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

* [Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed
  2010-09-10 11:18 [Bug tree-optimization/45633] New: " jojelino at gmail dot com
                   ` (2 preceding siblings ...)
  2010-09-10 12:13 ` jojelino at gmail dot com
@ 2010-09-11 20:59 ` jojelino at gmail dot com
  2010-09-14 15:24 ` jakub at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jojelino at gmail dot com @ 2010-09-11 20:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jojelino at gmail dot com  2010-09-11 20:59 -------
this causes ICE
confirmed with gcc -O3 -msse2  -std=gnu99
reduced testcase 

typedef unsigned char uint8_t;
typedef struct foo2
{
  int offset[4];
  uint8_t* ref[4];
} foo2;
int
foo(const foo2 *fooval)
{
  uint8_t *source[4] =
    { fooval->ref[0], fooval->ref[1], fooval->ref[2] };
  int strides[4] =
    { fooval->offset[0], fooval->offset[1], fooval->offset[2] };
  for (int i = 0; i < 4; i++)
    {
      strides[i] = -strides[i];
      source[i] -= strides[i];
    }
  return source[0];
}
int
main()
{
  foo2 fool;
  int ret = foo(&fool);
  return ret;
}


-- 


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


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

* [Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed
  2010-09-10 11:18 [Bug tree-optimization/45633] New: " jojelino at gmail dot com
  2010-09-10 11:20 ` [Bug tree-optimization/45633] " jojelino at gmail dot com
  2010-09-10 11:29 ` rguenth at gcc dot gnu dot org
@ 2010-09-10 12:13 ` jojelino at gmail dot com
  2010-09-11 20:59 ` jojelino at gmail dot com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jojelino at gmail dot com @ 2010-09-10 12:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jojelino at gmail dot com  2010-09-10 12:13 -------
(In reply to comment #2)
> Are you really using the fortran-dev branch?
> 

$ git branch
* trunk

it is trunk.
i don't recognize how fortran-dev version have been selected. maybe i've
mistaken.


-- 


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


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

* [Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed
  2010-09-10 11:18 [Bug tree-optimization/45633] New: " jojelino at gmail dot com
  2010-09-10 11:20 ` [Bug tree-optimization/45633] " jojelino at gmail dot com
@ 2010-09-10 11:29 ` rguenth at gcc dot gnu dot org
  2010-09-10 12:13 ` jojelino at gmail dot com
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-09-10 11:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2010-09-10 11:29 -------
Are you really using the fortran-dev branch?


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.6.0
            Version|fortran-dev                 |4.6.0


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


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

* [Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed
  2010-09-10 11:18 [Bug tree-optimization/45633] New: " jojelino at gmail dot com
@ 2010-09-10 11:20 ` jojelino at gmail dot com
  2010-09-10 11:29 ` rguenth at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jojelino at gmail dot com @ 2010-09-10 11:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jojelino at gmail dot com  2010-09-10 11:19 -------
Created an attachment (id=21764)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21764&action=view)
preprocessed source


-- 


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


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

end of thread, other threads:[~2015-02-05 23:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-45633-4@http.gcc.gnu.org/bugzilla/>
2015-02-05 23:45 ` [Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed law at redhat dot com
2010-09-10 11:18 [Bug tree-optimization/45633] New: " jojelino at gmail dot com
2010-09-10 11:20 ` [Bug tree-optimization/45633] " jojelino at gmail dot com
2010-09-10 11:29 ` rguenth at gcc dot gnu dot org
2010-09-10 12:13 ` jojelino at gmail dot com
2010-09-11 20:59 ` jojelino at gmail dot com
2010-09-14 15:24 ` jakub at gcc dot gnu dot org
2010-09-14 16:18 ` jakub at gcc dot gnu dot org
2010-09-14 16:20 ` jakub at gcc dot gnu dot org
2010-09-14 17:16 ` jakub at gcc dot gnu dot org
2010-09-14 18:43 ` jakub at gcc dot gnu dot org
2010-09-15 15:43 ` jakub at gcc dot gnu dot org
2010-09-15 16:06 ` jakub 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).