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

Reply via email to