public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/56635] New: [4.8 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15
@ 2013-03-16 15:11 orion at cora dot nwra.com
  2013-03-16 16:20 ` [Bug c/56635] " jakub at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: orion at cora dot nwra.com @ 2013-03-16 15:11 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56635
           Summary: [4.8 regression] internal compiler error: in
                    find_lattice_value, at tree-complex.c:15
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: orion@cora.nwra.com


In file included from /builddir/build/BUILD/gdl-0.9.3/src/datatypes.cpp:67:0:
/builddir/build/BUILD/gdl-0.9.3/src/basic_op.cpp: In function '<built-in>':
/builddir/build/BUILD/gdl-0.9.3/src/basic_op.cpp:3791:9: internal compiler
error: in find_lattice_value, at tree-complex.c:151
 #pragma omp parallel if (nEl >= CpuTPOOL_MIN_ELTS && (CpuTPOOL_MAX_ELTS == 0
|| CpuTPOOL_MAX_ELTS <= nEl))
         ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccXWRPxa.out file, please attach this to
your bugreport.

gcc-4.8.0-0.16.fc19.x86_64


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

* [Bug c/56635] [4.8 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15
  2013-03-16 15:11 [Bug c/56635] New: [4.8 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15 orion at cora dot nwra.com
@ 2013-03-16 16:20 ` jakub at gcc dot gnu.org
  2013-03-17  1:44 ` orion at cora dot nwra.com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-16 16:20 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-16 16:19:56 UTC ---
Preprocessed source stored into /tmp/ccXWRPxa.out file, please attach this to
your bugreport.


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

* [Bug c/56635] [4.8 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15
  2013-03-16 15:11 [Bug c/56635] New: [4.8 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15 orion at cora dot nwra.com
  2013-03-16 16:20 ` [Bug c/56635] " jakub at gcc dot gnu.org
@ 2013-03-17  1:44 ` orion at cora dot nwra.com
  2013-03-17  4:45 ` markus at trippelsdorf dot de
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: orion at cora dot nwra.com @ 2013-03-17  1:44 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Orion Poplawski <orion at cora dot nwra.com> 2013-03-17 01:44:29 UTC ---
Created attachment 29682
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29682
Preprocessed source

Sorry, looks like it was too big.  Here it is compressed.


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

* [Bug c/56635] [4.8 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15
  2013-03-16 15:11 [Bug c/56635] New: [4.8 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15 orion at cora dot nwra.com
  2013-03-16 16:20 ` [Bug c/56635] " jakub at gcc dot gnu.org
  2013-03-17  1:44 ` orion at cora dot nwra.com
@ 2013-03-17  4:45 ` markus at trippelsdorf dot de
  2013-03-17  5:53 ` [Bug tree-optimization/56635] " pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: markus at trippelsdorf dot de @ 2013-03-17  4:45 UTC (permalink / raw)
  To: gcc-bugs


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

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markus at trippelsdorf dot
                   |                            |de

--- Comment #3 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2013-03-17 04:44:38 UTC ---
markus@x4 tmp % cat test.ii
template<typename>struct A;
template<typename _Tp>A<_Tp>operator/(A<_Tp>, A<_Tp>& p2)
{
  A<_Tp> a;
  a /= p2;
  return a;
}

template<typename _Tp>bool operator!=(A<_Tp>& p1, A<_Tp>&)
{
  return p1.real();
}

template<>struct A<double>
{
  double& real()
  {
    return __real__ _M_value;
  }

  template<typename _Tp>void operator/=(A<_Tp>&)
  {
    _M_value /= 10;
  }

  _Complex double _M_value;
};

template<class T>class B {
  T *buf;

public:

  B(int, bool);
  T& operator[](int)
  {
    return buf[0];
  }
};

struct C
{
  C(const int&);
  typedef A<double>Ty;
  typedef B<Ty>    DataT;
  A<double>zero;
  enum InitType
  { NOZERO };
  virtual C* DivInv(C *);
};
template<class Sp>class D : Sp {
  typedef typename Sp::Ty    Ty;
  typedef typename Sp::DataT DataT;
  DataT dd;

public:

  D(const int&, C::InitType);
  Ty& operator[](int)
  {
    return dd[0];
  }

  D* DivInv(C *);
};

template<class Sp>D<Sp> *D<Sp>::DivInv(C *)
{
  if ((*this)[0] != this->zero) (*this)[0] = (*static_cast<D *>(0))[0] /
                                             (*this)[0];
  else (*this)[0] = (*static_cast<D *>(0))[0];
  return 0;
}

D<C> *b = new D<C>(0, C::NOZERO);
template<class Sp>D<Sp>::D(const int&, C::InitType) : Sp(0), dd(0, 0)
{}

markus@x4 tmp % c++ -Wextra -Wall -c -O3 test.ii
test.ii: In member function ‘D<Sp>* D<Sp>::DivInv(C*) [with Sp = C]’:
test.ii:67:26: internal compiler error: in find_lattice_value, at
tree-complex.c:151
 template<class Sp>D<Sp> *D<Sp>::DivInv(C *)
                          ^


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

* [Bug tree-optimization/56635] [4.8 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15
  2013-03-16 15:11 [Bug c/56635] New: [4.8 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15 orion at cora dot nwra.com
                   ` (2 preceding siblings ...)
  2013-03-17  4:45 ` markus at trippelsdorf dot de
@ 2013-03-17  5:53 ` pinskia at gcc dot gnu.org
  2013-03-18  8:27 ` [Bug tree-optimization/56635] [4.8/4.9 " jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-03-17  5:53 UTC (permalink / raw)
  To: gcc-bugs


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |tree-optimization
   Target Milestone|---                         |4.8.0


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

* [Bug tree-optimization/56635] [4.8/4.9 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15
  2013-03-16 15:11 [Bug c/56635] New: [4.8 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15 orion at cora dot nwra.com
                   ` (3 preceding siblings ...)
  2013-03-17  5:53 ` [Bug tree-optimization/56635] " pinskia at gcc dot gnu.org
@ 2013-03-18  8:27 ` jakub at gcc dot gnu.org
  2013-03-18  8:47 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-18  8:27 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-03-18
            Summary|[4.8 regression] internal   |[4.8/4.9 regression]
                   |compiler error: in          |internal compiler error: in
                   |find_lattice_value, at      |find_lattice_value, at
                   |tree-complex.c:15           |tree-complex.c:15
     Ever Confirmed|0                           |1

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-18 08:26:32 UTC ---
Reduced testcase (-O3):
struct A { _Complex double a; };
struct B { A *b; void foo (void *); };

A
operator / (A x, A y)
{
  A r;
  r.a = x.a / y.a;
  return r;
}

void
B::foo (void *x)
{
  if (__real__ b[0].a)
    b[0] = (static_cast <B *>(x))->b[0] / b[0];
  else
    b[0] = (static_cast <B *>(x))->b[0];
}

The ICE is actually
pr56635.C: In member function ‘void B::foo(void*)’:
pr56635.C:13:1: error: invalid PHI argument
 B::foo (void *x)
 ^
MEM[(const struct A &)_9]
pr56635.C:13:1: error: incompatible types in PHI argument 1
complex double

const struct A

cstore_10 = PHI <_11(3), MEM[(const struct A &)_9](4)>

pr56635.C:13:1: internal compiler error: verify_gimple failed

and looks like cselim bug.
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186501 but guess
it just has been latent before that.


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

* [Bug tree-optimization/56635] [4.8/4.9 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15
  2013-03-16 15:11 [Bug c/56635] New: [4.8 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15 orion at cora dot nwra.com
                   ` (4 preceding siblings ...)
  2013-03-18  8:27 ` [Bug tree-optimization/56635] [4.8/4.9 " jakub at gcc dot gnu.org
@ 2013-03-18  8:47 ` jakub at gcc dot gnu.org
  2013-03-18  9:03 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-18  8:47 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-18 08:46:43 UTC ---
Even more reduced (-O3):
struct A { _Complex double a; };

void
foo (A **x, A **y)
{
  A r;
  if (__real__ x[0]->a)
    {
      r.a = y[0]->a / x[0]->a;
      **x = r;
    }
  else
    **x = **y;
}


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

* [Bug tree-optimization/56635] [4.8/4.9 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15
  2013-03-16 15:11 [Bug c/56635] New: [4.8 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15 orion at cora dot nwra.com
                   ` (5 preceding siblings ...)
  2013-03-18  8:47 ` jakub at gcc dot gnu.org
@ 2013-03-18  9:03 ` jakub at gcc dot gnu.org
  2013-03-18 13:02 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-18  9:03 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-18 09:02:22 UTC ---
Created attachment 29688
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29688
gcc48-pr56635.patch

Untested fix.


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

* [Bug tree-optimization/56635] [4.8/4.9 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15
  2013-03-16 15:11 [Bug c/56635] New: [4.8 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15 orion at cora dot nwra.com
                   ` (6 preceding siblings ...)
  2013-03-18  9:03 ` jakub at gcc dot gnu.org
@ 2013-03-18 13:02 ` jakub at gcc dot gnu.org
  2013-03-20  8:43 ` jakub at gcc dot gnu.org
  2013-03-20  8:43 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-18 13:02 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-18 13:02:01 UTC ---
Author: jakub
Date: Mon Mar 18 13:01:49 2013
New Revision: 196781

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196781
Log:
    PR tree-optimization/56635
    * fold-const.c (operand_equal_p): For MEM_REF and TARGET_MEM_REF,
    require types_compatible_p types.

    * g++.dg/torture/pr56635.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr56635.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug tree-optimization/56635] [4.8/4.9 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15
  2013-03-16 15:11 [Bug c/56635] New: [4.8 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15 orion at cora dot nwra.com
                   ` (8 preceding siblings ...)
  2013-03-20  8:43 ` jakub at gcc dot gnu.org
@ 2013-03-20  8:43 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-20  8:43 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-20 08:43:18 UTC ---
Fixed.


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

* [Bug tree-optimization/56635] [4.8/4.9 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15
  2013-03-16 15:11 [Bug c/56635] New: [4.8 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15 orion at cora dot nwra.com
                   ` (7 preceding siblings ...)
  2013-03-18 13:02 ` jakub at gcc dot gnu.org
@ 2013-03-20  8:43 ` jakub at gcc dot gnu.org
  2013-03-20  8:43 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-20  8:43 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-20 08:42:52 UTC ---
Author: jakub
Date: Wed Mar 20 08:40:08 2013
New Revision: 196808

URL: http://gcc.gnu.org/viewcvs?rev=196808&root=gcc&view=rev
Log:
    PR tree-optimization/56635
    * tree-ssa-phiopt.c (cond_if_else_store_replacement_1): Give up
    if lhs of then_assign and else_assign don't have compatible types.

    * g++.dg/torture/pr56635.C: New test.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/g++.dg/torture/pr56635.C
Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_8-branch/gcc/tree-ssa-phiopt.c


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

end of thread, other threads:[~2013-03-20  8:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-16 15:11 [Bug c/56635] New: [4.8 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15 orion at cora dot nwra.com
2013-03-16 16:20 ` [Bug c/56635] " jakub at gcc dot gnu.org
2013-03-17  1:44 ` orion at cora dot nwra.com
2013-03-17  4:45 ` markus at trippelsdorf dot de
2013-03-17  5:53 ` [Bug tree-optimization/56635] " pinskia at gcc dot gnu.org
2013-03-18  8:27 ` [Bug tree-optimization/56635] [4.8/4.9 " jakub at gcc dot gnu.org
2013-03-18  8:47 ` jakub at gcc dot gnu.org
2013-03-18  9:03 ` jakub at gcc dot gnu.org
2013-03-18 13:02 ` jakub at gcc dot gnu.org
2013-03-20  8:43 ` jakub at gcc dot gnu.org
2013-03-20  8:43 ` jakub at gcc dot gnu.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).