[Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed

2015-02-05 Thread law at redhat dot com
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. ***


[Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed

2010-09-15 Thread jakub at gcc dot gnu dot org


--- 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=gccview=revrev=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



[Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed

2010-09-15 Thread jakub at gcc dot gnu dot org


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



[Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed

2010-09-14 Thread jakub at gcc dot gnu dot org


--- 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|-00-00 00:00:00 |2010-09-14 15:24:04
   date||


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



[Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed

2010-09-14 Thread jakub at gcc dot gnu dot org


--- 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=21794action=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



[Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed

2010-09-14 Thread jakub at gcc dot gnu dot org


--- 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=21795action=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



[Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed

2010-09-14 Thread jakub at gcc dot gnu dot org


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



[Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed

2010-09-14 Thread jakub at gcc dot gnu dot org


--- 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=21796action=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



[Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed

2010-09-11 Thread jojelino at gmail dot com


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



[Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed

2010-09-10 Thread jojelino at gmail dot com


--- 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=21764action=view)
preprocessed source


-- 


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



[Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed

2010-09-10 Thread rguenth at gcc dot gnu dot org


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



[Bug tree-optimization/45633] [4.6 regression] internal compiler error: verify_stmts failed

2010-09-10 Thread jojelino at gmail dot com


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