public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36407] [4.3/4.4 regression] ICE with invalid conversion
  2008-06-01 10:40 [Bug c++/36407] New: [4.3/4.4 regression] ICE with invalid conversion reichelt at gcc dot gnu dot org
@ 2008-06-01 10:40 ` reichelt at gcc dot gnu dot org
  2008-06-01 21:17 ` rguenth at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-06-01 10:40 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.3.1


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


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

* [Bug c++/36407]  New: [4.3/4.4 regression] ICE with invalid conversion
@ 2008-06-01 10:40 reichelt at gcc dot gnu dot org
  2008-06-01 10:40 ` [Bug c++/36407] " reichelt at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-06-01 10:40 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet triggers an ICE on mainline and the
4.3 branch:

====================================================
struct A
{
  A(const A&);
};

struct B
{
  operator A&();
};

void foo(const B& b)
{
  const A a = b;
}
====================================================

bug.cc: In function 'void foo(const B&)':
bug.cc:13: error: passing 'const B' as 'this' argument of 'B::operator A&()'
discards qualifiers
bug.cc:13: error: invalid conversion from 'A' to 'A'
bug.cc:13: internal compiler error: in ocp_convert, at cp/cvt.c:627
Please submit a full bug report, [etc.]

This is a regression on the 4.3 branch as 4.3.0 didn't crash.

Note, that the error message "invalid conversion from 'A' to 'A'" isn't
really helpful.


-- 
           Summary: [4.3/4.4 regression] ICE with invalid conversion
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


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

* [Bug c++/36407] [4.3/4.4 regression] ICE with invalid conversion
  2008-06-01 10:40 [Bug c++/36407] New: [4.3/4.4 regression] ICE with invalid conversion reichelt at gcc dot gnu dot org
  2008-06-01 10:40 ` [Bug c++/36407] " reichelt at gcc dot gnu dot org
@ 2008-06-01 21:17 ` rguenth at gcc dot gnu dot org
  2008-06-01 21:18 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-01 21:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-06-01 21:16 -------
Confirmed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to fail|                            |4.3.1
      Known to work|                            |4.3.0
   Last reconfirmed|0000-00-00 00:00:00         |2008-06-01 21:16:43
               date|                            |


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


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

* [Bug c++/36407] [4.3/4.4 regression] ICE with invalid conversion
  2008-06-01 10:40 [Bug c++/36407] New: [4.3/4.4 regression] ICE with invalid conversion reichelt at gcc dot gnu dot org
  2008-06-01 10:40 ` [Bug c++/36407] " reichelt at gcc dot gnu dot org
  2008-06-01 21:17 ` rguenth at gcc dot gnu dot org
@ 2008-06-01 21:18 ` rguenth at gcc dot gnu dot org
  2008-06-06 15:05 ` rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-01 21:18 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4


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


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

* [Bug c++/36407] [4.3/4.4 regression] ICE with invalid conversion
  2008-06-01 10:40 [Bug c++/36407] New: [4.3/4.4 regression] ICE with invalid conversion reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-06-01 21:18 ` rguenth at gcc dot gnu dot org
@ 2008-06-06 15:05 ` rguenth at gcc dot gnu dot org
  2008-06-11 10:48 ` reichelt at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-06 15:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-06-06 14:59 -------
4.3.1 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.1                       |4.3.2


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


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

* [Bug c++/36407] [4.3/4.4 regression] ICE with invalid conversion
  2008-06-01 10:40 [Bug c++/36407] New: [4.3/4.4 regression] ICE with invalid conversion reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-06-06 15:05 ` rguenth at gcc dot gnu dot org
@ 2008-06-11 10:48 ` reichelt at gcc dot gnu dot org
  2008-06-11 11:11 ` [Bug c++/36407] [4.3/4.4 regression] ICE with conversion and -fpermissive rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-06-11 10:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from reichelt at gcc dot gnu dot org  2008-06-11 10:47 -------
The code used to compile with -fpermissive, so this is actually an
ice-on-valid-code bug. Given that this is also a regression on the 4.3 branch,
the priority should by P1, I think.


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org
           Keywords|error-recovery, ice-on-     |ice-on-valid-code
                   |invalid-code                |


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


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

* [Bug c++/36407] [4.3/4.4 regression] ICE with conversion and -fpermissive
  2008-06-01 10:40 [Bug c++/36407] New: [4.3/4.4 regression] ICE with invalid conversion reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2008-06-11 10:48 ` reichelt at gcc dot gnu dot org
@ 2008-06-11 11:11 ` rguenth at gcc dot gnu dot org
  2008-06-23 10:40 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-11 11:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2008-06-11 11:10 -------
Thanks for the clarification.  I agree.  Jason, can you have a look here?


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at redhat dot com
           Priority|P4                          |P1
            Summary|[4.3/4.4 regression] ICE    |[4.3/4.4 regression] ICE
                   |with invalid conversion     |with conversion and -
                   |                            |fpermissive


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


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

* [Bug c++/36407] [4.3/4.4 regression] ICE with conversion and -fpermissive
  2008-06-01 10:40 [Bug c++/36407] New: [4.3/4.4 regression] ICE with invalid conversion reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2008-06-11 11:11 ` [Bug c++/36407] [4.3/4.4 regression] ICE with conversion and -fpermissive rguenth at gcc dot gnu dot org
@ 2008-06-23 10:40 ` jakub at gcc dot gnu dot org
  2008-07-16 15:03 ` dodji at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-06-23 10:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2008-06-23 10:39 -------
Introduced by PR35773.


-- 


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


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

* [Bug c++/36407] [4.3/4.4 regression] ICE with conversion and -fpermissive
  2008-06-01 10:40 [Bug c++/36407] New: [4.3/4.4 regression] ICE with invalid conversion reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2008-06-23 10:40 ` jakub at gcc dot gnu dot org
@ 2008-07-16 15:03 ` dodji at gcc dot gnu dot org
  2008-07-18 20:16 ` dodji at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-07-16 15:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dodji at gcc dot gnu dot org  2008-07-16 15:02 -------
Reproced on trunk. I'd like to look into this bug, if nobody is working on it
already.


-- 

dodji at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |dodji at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-06-01 21:16:43         |2008-07-16 15:02:29
               date|                            |


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


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

* [Bug c++/36407] [4.3/4.4 regression] ICE with conversion and -fpermissive
  2008-06-01 10:40 [Bug c++/36407] New: [4.3/4.4 regression] ICE with invalid conversion reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2008-07-16 15:03 ` dodji at gcc dot gnu dot org
@ 2008-07-18 20:16 ` dodji at gcc dot gnu dot org
  2008-07-18 20:42 ` dodji at gcc dot gnu dot org
  2008-07-18 22:05 ` dodji at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-07-18 20:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dodji at gcc dot gnu dot org  2008-07-18 20:16 -------
Subject: Bug 36407

Author: dodji
Date: Fri Jul 18 20:15:22 2008
New Revision: 137964

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137964
Log:
2008-07-18  Dodji Seketeli  <dseketel@redhat.com>

        PR c++/36407
        * gcc/cp/call.c (convert_like_real): Don't take the error code path
          when a rvalue or base conversion has the bad_p field set.


Added:
    branches/gcc-4_3-branch/gcc/testsuite/g++.dg/conversion/op5.C
Modified:
    branches/gcc-4_3-branch/gcc/cp/ChangeLog
    branches/gcc-4_3-branch/gcc/cp/call.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/36407] [4.3/4.4 regression] ICE with conversion and -fpermissive
  2008-06-01 10:40 [Bug c++/36407] New: [4.3/4.4 regression] ICE with invalid conversion reichelt at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2008-07-18 20:16 ` dodji at gcc dot gnu dot org
@ 2008-07-18 20:42 ` dodji at gcc dot gnu dot org
  2008-07-18 22:05 ` dodji at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-07-18 20:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from dodji at gcc dot gnu dot org  2008-07-18 20:41 -------
Subject: Bug 36407

Author: dodji
Date: Fri Jul 18 20:40:42 2008
New Revision: 137966

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137966
Log:
2008-07-18  Dodji Seketeli  <dseketel@redhat.com>

        PR c++/36407
        * call.c (convert_like_real): Don't take the error code path
          when a rvalue or base conversion has the bad_p field set.


Added:
    trunk/gcc/testsuite/g++.dg/conversion/op5.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/call.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/36407] [4.3/4.4 regression] ICE with conversion and -fpermissive
  2008-06-01 10:40 [Bug c++/36407] New: [4.3/4.4 regression] ICE with invalid conversion reichelt at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2008-07-18 20:42 ` dodji at gcc dot gnu dot org
@ 2008-07-18 22:05 ` dodji at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-07-18 22:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from dodji at gcc dot gnu dot org  2008-07-18 22:05 -------
Fixed, applied to trunk and in gcc-4_3-branch.


-- 

dodji at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2008-07-18 22:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-01 10:40 [Bug c++/36407] New: [4.3/4.4 regression] ICE with invalid conversion reichelt at gcc dot gnu dot org
2008-06-01 10:40 ` [Bug c++/36407] " reichelt at gcc dot gnu dot org
2008-06-01 21:17 ` rguenth at gcc dot gnu dot org
2008-06-01 21:18 ` rguenth at gcc dot gnu dot org
2008-06-06 15:05 ` rguenth at gcc dot gnu dot org
2008-06-11 10:48 ` reichelt at gcc dot gnu dot org
2008-06-11 11:11 ` [Bug c++/36407] [4.3/4.4 regression] ICE with conversion and -fpermissive rguenth at gcc dot gnu dot org
2008-06-23 10:40 ` jakub at gcc dot gnu dot org
2008-07-16 15:03 ` dodji at gcc dot gnu dot org
2008-07-18 20:16 ` dodji at gcc dot gnu dot org
2008-07-18 20:42 ` dodji at gcc dot gnu dot org
2008-07-18 22:05 ` dodji 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).