public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50622] New: ICE: verify_gimple failed for std::complex<double>
@ 2011-10-05 15:47 vincenzo.innocente at cern dot ch
  2011-10-05 15:55 ` [Bug c++/50622] " paolo.carlini at oracle dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2011-10-05 15:47 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50622
           Summary: ICE: verify_gimple failed for std::complex<double>
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: vincenzo.innocente@cern.ch


NOTE; ok with -std=gnu++0x
cat ice47.cc
#include <complex>

template <typename Value> struct LorentzVector
{
template <typename ValueB>
LorentzVector<Value> & operator+=(const LorentzVector<ValueB> & a) {
theX += a.theX;
theY += a.theY;
theZ += a.theZ;
theT += a.theT;
return *this;
}

Value theX;
Value theY;
Value theZ;
Value theT;
};

template <typename ValueA, typename ValueB>
inline LorentzVector<ValueA>
operator+(LorentzVector<ValueA> a, const LorentzVector<ValueB> & b) {
return a += b;
}

std::complex<double> evaluate() {
LorentzVector<std::complex<double> > v1;
LorentzVector<std::complex<double> > veca = v1 + v1;
return veca.theT;
}
Macintosh-203:ctest innocent$ c++ -O2 -c ice47.cc 
ice47.cc: In function ‘std::complex<double> evaluate()’:
ice47.cc:26:22: error: invalid rhs for gimple memory store
a$_M_value

v1$_M_value

# .MEM_14 = VDEF <.MEM_12>
a$_M_value = v1$_M_value;

ice47.cc:26:22: error: invalid rhs for gimple memory store
a$16$_M_value

v1$theY$_M_value

# .MEM_15 = VDEF <.MEM_14>
a$16$_M_value = v1$theY$_M_value;

ice47.cc:26:22: error: invalid rhs for gimple memory store
a$32$_M_value

v1$32$_M_value

# .MEM_16 = VDEF <.MEM_15>
a$32$_M_value = v1$32$_M_value;

ice47.cc:26:22: error: invalid rhs for gimple memory store
a$48$_M_value

v1$theT$_M_value

# .MEM_17 = VDEF <.MEM_16>
a$48$_M_value = v1$theT$_M_value;

ice47.cc:26:22: internal compiler error: verify_gimple failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Macintosh-203:ctest innocent$ c++ -O2 -c ice47.cc  -std=gnu++0x
Macintosh-203:ctest innocent$


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

* [Bug c++/50622] ICE: verify_gimple failed for std::complex<double>
  2011-10-05 15:47 [Bug c++/50622] New: ICE: verify_gimple failed for std::complex<double> vincenzo.innocente at cern dot ch
@ 2011-10-05 15:55 ` paolo.carlini at oracle dot com
  2011-10-05 15:57 ` [Bug c++/50622] [4.7 Regression] " paolo.carlini at oracle dot com
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-05 15:55 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |giulio.eulisse at cern dot
                   |                            |ch

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-05 15:55:03 UTC ---
*** Bug 50623 has been marked as a duplicate of this bug. ***


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

* [Bug c++/50622] [4.7 Regression] ICE: verify_gimple failed for std::complex<double>
  2011-10-05 15:47 [Bug c++/50622] New: ICE: verify_gimple failed for std::complex<double> vincenzo.innocente at cern dot ch
  2011-10-05 15:55 ` [Bug c++/50622] " paolo.carlini at oracle dot com
@ 2011-10-05 15:57 ` paolo.carlini at oracle dot com
  2011-10-06  8:33 ` [Bug tree-optimization/50622] " rguenth at gcc dot gnu.org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-05 15:57 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-10-05
   Target Milestone|---                         |4.7.0
            Summary|ICE: verify_gimple failed   |[4.7 Regression] ICE:
                   |for std::complex<double>    |verify_gimple failed for
                   |                            |std::complex<double>
     Ever Confirmed|0                           |1

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-05 15:56:53 UTC ---
Confirmed.


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

* [Bug tree-optimization/50622] [4.7 Regression] ICE: verify_gimple failed for std::complex<double>
  2011-10-05 15:47 [Bug c++/50622] New: ICE: verify_gimple failed for std::complex<double> vincenzo.innocente at cern dot ch
  2011-10-05 15:55 ` [Bug c++/50622] " paolo.carlini at oracle dot com
  2011-10-05 15:57 ` [Bug c++/50622] [4.7 Regression] " paolo.carlini at oracle dot com
@ 2011-10-06  8:33 ` rguenth at gcc dot gnu.org
  2011-10-09  8:40 ` vincenzo.innocente at cern dot ch
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-06  8:33 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
                 CC|                            |jamborm at gcc dot gnu.org
          Component|c++                         |tree-optimization

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-10-06 08:33:11 UTC ---
Offending pass is late SRA.


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

* [Bug tree-optimization/50622] [4.7 Regression] ICE: verify_gimple failed for std::complex<double>
  2011-10-05 15:47 [Bug c++/50622] New: ICE: verify_gimple failed for std::complex<double> vincenzo.innocente at cern dot ch
                   ` (2 preceding siblings ...)
  2011-10-06  8:33 ` [Bug tree-optimization/50622] " rguenth at gcc dot gnu.org
@ 2011-10-09  8:40 ` vincenzo.innocente at cern dot ch
  2011-10-09 12:42 ` paolo.carlini at oracle dot com
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2011-10-09  8:40 UTC (permalink / raw)
  To: gcc-bugs

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

vincenzo Innocente <vincenzo.innocente at cern dot ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |blocker

--- Comment #4 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2011-10-09 08:40:07 UTC ---
reduced to this (no std)

typedef __complex__ double Value;
struct LorentzVector
{
  LorentzVector & operator+=(const LorentzVector & a) {
    theX += a.theX;
    theY += a.theY;
    theZ += a.theZ;
    theT += a.theT;
    return *this;
  }

  Value theX;
  Value theY;
  Value theZ;
  Value theT;
};

inline LorentzVector
operator+(LorentzVector a, const LorentzVector & b) {
  return a += b;
}

Value ex, et;
LorentzVector sum() {
  LorentzVector v1; v1.theX =ex; v1.theY =ex+et; v1.theZ =ex-et;   v1.theT =et;
  return v1+v1;
}

c++ -O2 -c ice47c.cc
ice47c.cc: In function ‘LorentzVector sum()’:
ice47c.cc:24:15: error: invalid rhs for gimple memory store
a$theX

v1$theX

# .MEM_53 = VDEF <.MEM_13>
a$theX = v1$theX;

ice47c.cc:24:15: error: invalid rhs for gimple memory store
a$theY

v1$theY

# .MEM_54 = VDEF <.MEM_53>
a$theY = v1$theY;

ice47c.cc:24:15: error: invalid rhs for gimple memory store
a$theZ

v1$theZ

# .MEM_55 = VDEF <.MEM_54>
a$theZ = v1$theZ;

ice47c.cc:24:15: error: invalid rhs for gimple memory store
a$theT

v1$theT

# .MEM_56 = VDEF <.MEM_55>
a$theT = v1$theT;

ice47c.cc:24:15: internal compiler error: verify_gimple failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug tree-optimization/50622] [4.7 Regression] ICE: verify_gimple failed for std::complex<double>
  2011-10-05 15:47 [Bug c++/50622] New: ICE: verify_gimple failed for std::complex<double> vincenzo.innocente at cern dot ch
                   ` (3 preceding siblings ...)
  2011-10-09  8:40 ` vincenzo.innocente at cern dot ch
@ 2011-10-09 12:42 ` paolo.carlini at oracle dot com
  2011-10-10 15:27 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-09 12:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-09 12:42:38 UTC ---
Thanks Vincenzo. Doesn't happen for __complex__ float, doesn't happen for < 4
components, thus seems related to the size of the struct.


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

* [Bug tree-optimization/50622] [4.7 Regression] ICE: verify_gimple failed for std::complex<double>
  2011-10-05 15:47 [Bug c++/50622] New: ICE: verify_gimple failed for std::complex<double> vincenzo.innocente at cern dot ch
                   ` (4 preceding siblings ...)
  2011-10-09 12:42 ` paolo.carlini at oracle dot com
@ 2011-10-10 15:27 ` rguenth at gcc dot gnu.org
  2011-11-29  9:56 ` vincenzo.innocente at cern dot ch
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-10 15:27 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug tree-optimization/50622] [4.7 Regression] ICE: verify_gimple failed for std::complex<double>
  2011-10-05 15:47 [Bug c++/50622] New: ICE: verify_gimple failed for std::complex<double> vincenzo.innocente at cern dot ch
                   ` (5 preceding siblings ...)
  2011-10-10 15:27 ` rguenth at gcc dot gnu.org
@ 2011-11-29  9:56 ` vincenzo.innocente at cern dot ch
  2011-11-30 19:39 ` jamborm at gcc dot gnu.org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2011-11-29  9:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2011-11-29 09:42:31 UTC ---
This ICE is still present with revision 181800.
It does block our tests and validation of 4.7


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

* [Bug tree-optimization/50622] [4.7 Regression] ICE: verify_gimple failed for std::complex<double>
  2011-10-05 15:47 [Bug c++/50622] New: ICE: verify_gimple failed for std::complex<double> vincenzo.innocente at cern dot ch
                   ` (6 preceding siblings ...)
  2011-11-29  9:56 ` vincenzo.innocente at cern dot ch
@ 2011-11-30 19:39 ` jamborm at gcc dot gnu.org
  2011-11-30 19:56 ` jamborm at gcc dot gnu.org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jamborm at gcc dot gnu.org @ 2011-11-30 19:39 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

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

--- Comment #7 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-11-30 19:20:23 UTC ---
Mine.  At the first glance it seems that load_assign_lhs_subreplacements cannot
create assignment statements with grp_partial_lhs replacements on both sides.


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

* [Bug tree-optimization/50622] [4.7 Regression] ICE: verify_gimple failed for std::complex<double>
  2011-10-05 15:47 [Bug c++/50622] New: ICE: verify_gimple failed for std::complex<double> vincenzo.innocente at cern dot ch
                   ` (7 preceding siblings ...)
  2011-11-30 19:39 ` jamborm at gcc dot gnu.org
@ 2011-11-30 19:56 ` jamborm at gcc dot gnu.org
  2011-12-01 16:21 ` jamborm at gcc dot gnu.org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jamborm at gcc dot gnu.org @ 2011-11-30 19:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-11-30 19:40:27 UTC ---
Created attachment 25959
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25959
Untested fix

An untested fix.  I will run it through bootstrap tomorrow and proceed to
submit it if it passes. Sorry for the delay, I'm a bit busy lately.


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

* [Bug tree-optimization/50622] [4.7 Regression] ICE: verify_gimple failed for std::complex<double>
  2011-10-05 15:47 [Bug c++/50622] New: ICE: verify_gimple failed for std::complex<double> vincenzo.innocente at cern dot ch
                   ` (8 preceding siblings ...)
  2011-11-30 19:56 ` jamborm at gcc dot gnu.org
@ 2011-12-01 16:21 ` jamborm at gcc dot gnu.org
  2011-12-02 12:53 ` jamborm at gcc dot gnu.org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jamborm at gcc dot gnu.org @ 2011-12-01 16:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-12-01 16:20:02 UTC ---
Patch posted to mailing list:

http://gcc.gnu.org/ml/gcc-patches/2011-12/msg00080.html


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

* [Bug tree-optimization/50622] [4.7 Regression] ICE: verify_gimple failed for std::complex<double>
  2011-10-05 15:47 [Bug c++/50622] New: ICE: verify_gimple failed for std::complex<double> vincenzo.innocente at cern dot ch
                   ` (9 preceding siblings ...)
  2011-12-01 16:21 ` jamborm at gcc dot gnu.org
@ 2011-12-02 12:53 ` jamborm at gcc dot gnu.org
  2011-12-06 11:56 ` rguenth at gcc dot gnu.org
  2011-12-06 17:17 ` jamborm at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: jamborm at gcc dot gnu.org @ 2011-12-02 12:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-12-02 12:53:06 UTC ---
Author: jamborm
Date: Fri Dec  2 12:53:03 2011
New Revision: 181908

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181908
Log:
2011-12-02  Martin Jambor  <mjambor@suse.cz>

    PR tree-optimization/50622
    * tree-sra.c (load_assign_lhs_subreplacements): Force gimple operand
    if both lacc and racc are grp_partial_lhs.

    * testsuite/g++.dg/tree-ssa/pr50622.C: New test.


Added:
    trunk/gcc/testsuite/g++.dg/tree-ssa/pr50622.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-sra.c


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

* [Bug tree-optimization/50622] [4.7 Regression] ICE: verify_gimple failed for std::complex<double>
  2011-10-05 15:47 [Bug c++/50622] New: ICE: verify_gimple failed for std::complex<double> vincenzo.innocente at cern dot ch
                   ` (10 preceding siblings ...)
  2011-12-02 12:53 ` jamborm at gcc dot gnu.org
@ 2011-12-06 11:56 ` rguenth at gcc dot gnu.org
  2011-12-06 17:17 ` jamborm at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-06 11:56 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

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

--- Comment #11 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-06 11:55:52 UTC ---
Fixed.


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

* [Bug tree-optimization/50622] [4.7 Regression] ICE: verify_gimple failed for std::complex<double>
  2011-10-05 15:47 [Bug c++/50622] New: ICE: verify_gimple failed for std::complex<double> vincenzo.innocente at cern dot ch
                   ` (11 preceding siblings ...)
  2011-12-06 11:56 ` rguenth at gcc dot gnu.org
@ 2011-12-06 17:17 ` jamborm at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: jamborm at gcc dot gnu.org @ 2011-12-06 17:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-12-06 17:16:28 UTC ---
Author: jamborm
Date: Tue Dec  6 17:16:19 2011
New Revision: 182057

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182057
Log:
2011-12-06  Martin Jambor  <mjambor@suse.cz>

    PR tree-optimization/50622
    * tree-sra.c (load_assign_lhs_subreplacements): Force gimple operand
    if both lacc and racc are grp_partial_lhs.

    * testsuite/g++.dg/tree-ssa/pr50622.C: New test.


Added:
    branches/gcc-4_6-branch/gcc/testsuite/g++.dg/tree-ssa/pr50622.C
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_6-branch/gcc/tree-sra.c


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

end of thread, other threads:[~2011-12-06 17:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-05 15:47 [Bug c++/50622] New: ICE: verify_gimple failed for std::complex<double> vincenzo.innocente at cern dot ch
2011-10-05 15:55 ` [Bug c++/50622] " paolo.carlini at oracle dot com
2011-10-05 15:57 ` [Bug c++/50622] [4.7 Regression] " paolo.carlini at oracle dot com
2011-10-06  8:33 ` [Bug tree-optimization/50622] " rguenth at gcc dot gnu.org
2011-10-09  8:40 ` vincenzo.innocente at cern dot ch
2011-10-09 12:42 ` paolo.carlini at oracle dot com
2011-10-10 15:27 ` rguenth at gcc dot gnu.org
2011-11-29  9:56 ` vincenzo.innocente at cern dot ch
2011-11-30 19:39 ` jamborm at gcc dot gnu.org
2011-11-30 19:56 ` jamborm at gcc dot gnu.org
2011-12-01 16:21 ` jamborm at gcc dot gnu.org
2011-12-02 12:53 ` jamborm at gcc dot gnu.org
2011-12-06 11:56 ` rguenth at gcc dot gnu.org
2011-12-06 17:17 ` jamborm 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).