public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/22434] New: ICE in simplify_{,gen_}subreg
@ 2005-07-12 10:44 jakub at redhat dot com
  2005-07-12 13:05 ` [Bug c++/22434] [3.4/4.0/4.1 regression] " reichelt at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jakub at redhat dot com @ 2005-07-12 10:44 UTC (permalink / raw)
  To: gcc-bugs

#include <ostream>
#include <string>
#include <vector>

std::string bar (unsigned int x);

template <class T>
std::ostream & baz (std::ostream &os, const T &v, bool lit)
{
  typename T::const_iterator i = v.begin ();
  os << (lit ? bar (*i) : *i);
  return os;
}

void foo (std::ostream &os, const std::vector<int> &v)
{
  baz (os, v, false);
}

ICEs in 3.4.4, 4.0.1 and HEAD, trying to generate a BLKmode SUBREG.

-- 
           Summary: ICE in simplify_{,gen_}subreg
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at redhat dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c++/22434] [3.4/4.0/4.1 regression] ICE in simplify_{,gen_}subreg
  2005-07-12 10:44 [Bug c++/22434] New: ICE in simplify_{,gen_}subreg jakub at redhat dot com
@ 2005-07-12 13:05 ` reichelt at gcc dot gnu dot org
  2005-07-13  3:41 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-07-12 13:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-07-12 12:32 -------
Confirmed. Reduced testcase:

=================================
struct A
{
    A(void*);
    ~A();
};

void foo(const int i, bool b)
{
    b ? A(0) : i;
}
=================================

Without "-pedantic" we get an ICE (since gcc 3.4.0)

  PR22434.cc: In function 'void foo(int, bool)':
  PR22434.cc:9: internal compiler error: in simplify_subreg, at
simplify-rtx.c:3765
  Please submit a full bug report, [etc.]

With -pedantic the code is rejected (since gcc 3.4.0).
It was rejected unconditionally before gcc 3.4.0.
The code is also rejected if one removes the const qualifier from "i".

So maybe we should switch back to the original behavior?


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-invalid-code
   Last reconfirmed|0000-00-00 00:00:00         |2005-07-12 12:32:03
               date|                            |
            Summary|ICE in                      |[3.4/4.0/4.1 regression] ICE
                   |simplify_{,gen_}subreg      |in simplify_{,gen_}subreg
   Target Milestone|---                         |3.4.5


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


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

* [Bug c++/22434] [3.4/4.0/4.1 regression] ICE in simplify_{,gen_}subreg
  2005-07-12 10:44 [Bug c++/22434] New: ICE in simplify_{,gen_}subreg jakub at redhat dot com
  2005-07-12 13:05 ` [Bug c++/22434] [3.4/4.0/4.1 regression] " reichelt at gcc dot gnu dot org
@ 2005-07-13  3:41 ` pinskia at gcc dot gnu dot org
  2005-07-22 21:17 ` pinskia at gcc dot gnu dot org
  2005-09-27 15:56 ` mmitchel at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-13  3:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-13 03:12 -------
With my patch for PR 22368, I get a different ICE:
t.cc:10: error: statement types mismatch
D.1751 = iD.1737;

struct AD.1716
const intD.2
t.cc:10: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |22368
              nThis|                            |


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


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

* [Bug c++/22434] [3.4/4.0/4.1 regression] ICE in simplify_{,gen_}subreg
  2005-07-12 10:44 [Bug c++/22434] New: ICE in simplify_{,gen_}subreg jakub at redhat dot com
  2005-07-12 13:05 ` [Bug c++/22434] [3.4/4.0/4.1 regression] " reichelt at gcc dot gnu dot org
  2005-07-13  3:41 ` pinskia at gcc dot gnu dot org
@ 2005-07-22 21:17 ` pinskia at gcc dot gnu dot org
  2005-09-27 15:56 ` mmitchel at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-22 21:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-22 21:12 -------
Moving to 4.0.2 pre Mark.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.5                       |4.0.2


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


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

* [Bug c++/22434] [3.4/4.0/4.1 regression] ICE in simplify_{,gen_}subreg
  2005-07-12 10:44 [Bug c++/22434] New: ICE in simplify_{,gen_}subreg jakub at redhat dot com
                   ` (2 preceding siblings ...)
  2005-07-22 21:17 ` pinskia at gcc dot gnu dot org
@ 2005-09-27 15:56 ` mmitchel at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 15:56 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.2                       |4.0.3


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


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

end of thread, other threads:[~2005-09-27 15:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-12 10:44 [Bug c++/22434] New: ICE in simplify_{,gen_}subreg jakub at redhat dot com
2005-07-12 13:05 ` [Bug c++/22434] [3.4/4.0/4.1 regression] " reichelt at gcc dot gnu dot org
2005-07-13  3:41 ` pinskia at gcc dot gnu dot org
2005-07-22 21:17 ` pinskia at gcc dot gnu dot org
2005-09-27 15:56 ` mmitchel 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).