public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19787] New: Internal compiler error with ambiguous conversion functions
@ 2005-02-06 10:20 belz@kolumbus.fi
  2005-02-06 15:19 ` [Bug c++/19787] [4.0 Regression] " pinskia@gcc.gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: belz@kolumbus.fi @ 2005-02-06 10:20 UTC (permalink / raw)
  To: gcc-bugs

struct H {
    operator char();
    operator short();
};

int const& ref = H();

output:
oref.cpp:7: error: conversion from 'H' to 'const int' is ambiguous
oref.cpp:4: note: candidates are: H::operator short int()
oref.cpp:3: note:                 H::operator char()
oref.cpp:7: internal compiler error: tree check: expected class 'type', have 
'exceptional' (error_mark) in initialize_reference, at cp/call.c:6586
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL: http://gcc.gnu.org/bugs.html > for instructions.

using:
$ g++ -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc/configure --enable-languages=c++,c --enable-
threads=posix
Thread model: posix
gcc version 4.0.0 20050203 (experimental)


This is a regression from earlier versions. There does not seem to be any 
problems if I do the reference binding in block scope.


Mikael

-- 
           Summary: Internal compiler error with ambiguous conversion
                    functions
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: belz at kolumbus dot fi
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c++/19787] [4.0 Regression] Internal compiler error with ambiguous conversion functions
  2005-02-06 10:20 [Bug c++/19787] New: Internal compiler error with ambiguous conversion functions belz@kolumbus.fi
@ 2005-02-06 15:19 ` pinskia@gcc.gnu.org
  2005-02-08  3:11 ` [Bug c++/19787] [3.4/4.0 " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia@gcc.gnu.org @ 2005-02-06 15:19 UTC (permalink / raw)
  To: gcc-bugs

------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-06 15:19 -------
Confirmed, I think is a regression (even though it does not show up with checking).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |error-recovery, ice-
                   |                            |checking, ice-on-invalid-
                   |                            |code
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-06 15:19:13
               date|                            |
            Summary|Internal compiler error with|[4.0 Regression] Internal
                   |ambiguous conversion        |compiler error with
                   |functions                   |ambiguous conversion
                   |                            |functions
   Target Milestone|---                         |4.0.0


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


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

* [Bug c++/19787] [3.4/4.0 Regression] Internal compiler error with ambiguous conversion functions
  2005-02-06 10:20 [Bug c++/19787] New: Internal compiler error with ambiguous conversion functions belz@kolumbus.fi
  2005-02-06 15:19 ` [Bug c++/19787] [4.0 Regression] " pinskia@gcc.gnu.org
@ 2005-02-08  3:11 ` pinskia at gcc dot gnu dot org
  2005-02-09 13:51 ` mmitchel at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-08  3:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-07 19:33 -------
It is also a 3.4 regression too:
: Search converges between 2003-06-19-trunk (#269) and 2003-06-20-trunk (#270).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.0 Regression] Internal   |[3.4/4.0 Regression]
                   |compiler error with         |Internal compiler error with
                   |ambiguous conversion        |ambiguous conversion
                   |functions                   |functions
   Target Milestone|4.0.0                       |3.4.4


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


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

* [Bug c++/19787] [3.4/4.0 Regression] Internal compiler error with ambiguous conversion functions
  2005-02-06 10:20 [Bug c++/19787] New: Internal compiler error with ambiguous conversion functions belz@kolumbus.fi
  2005-02-06 15:19 ` [Bug c++/19787] [4.0 Regression] " pinskia@gcc.gnu.org
  2005-02-08  3:11 ` [Bug c++/19787] [3.4/4.0 " pinskia at gcc dot gnu dot org
@ 2005-02-09 13:51 ` mmitchel at gcc dot gnu dot org
  2005-02-10  7:57 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-02-09 13:51 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/19787] [3.4/4.0 Regression] Internal compiler error with ambiguous conversion functions
  2005-02-06 10:20 [Bug c++/19787] New: Internal compiler error with ambiguous conversion functions belz@kolumbus.fi
                   ` (2 preceding siblings ...)
  2005-02-09 13:51 ` mmitchel at gcc dot gnu dot org
@ 2005-02-10  7:57 ` cvs-commit at gcc dot gnu dot org
  2005-02-10  9:23 ` [Bug c++/19787] [3.4 " mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-10  7:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-02-10 00:35 -------
Subject: Bug 19787

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2005-02-10 00:34:47

Modified files:
	gcc/cp         : ChangeLog call.c decl.c parser.c 
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/g++.dg/template: crash2.C 
Added files:
	gcc/testsuite/g++.dg/conversion: ambig1.C 
	gcc/testsuite/g++.dg/ext: attrib19.C 
	gcc/testsuite/g++.dg/parse: dtor5.C 
	gcc/testsuite/g++.dg/template: dtor3.C static11.C 

Log message:
	PR c++/19787
	* call.c (initialize_reference): Robustify.
	
	PR ++/19732
	* decl.c (grokdeclarator): Check for invalid use of destructor
	names.
	
	PR c++/19762
	* parser.c (cp_parser_unqualified_id): Avoid creating destructor
	names with invalid types.
	
	PR c++/19826
	* parser.c (cp_parser_direct_declarator): Allow type-dependent
	expressions as array bounds.
	
	PR c++/19739
	* parser.c (cp_parser_attributes_list): Allow empty lists.
	
	PR c++/19787
	* g++.dg/conversion/ambig1.C: New test.
	
	PR c++/19739
	* g++.dg/ext/attrib19.C: New test.
	
	PR c++/19732
	* g++.dg/parse/dtor5.C: New test.
	
	PR c++/19762
	* g++.dg/template/dtor3.C: New test.
	
	PR c++/19826
	* g++.dg/template/static11.C: New test.
	* g++.dg/template/crash2.C: Remove dg-error marker.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4618&r2=1.4619
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.528&r2=1.529
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1360&r2=1.1361
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.313&r2=1.314
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5011&r2=1.5012
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/conversion/ambig1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/attrib19.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/dtor5.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/dtor3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/static11.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/crash2.C.diff?cvsroot=gcc&r1=1.3&r2=1.4



-- 


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


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

* [Bug c++/19787] [3.4 Regression] Internal compiler error with ambiguous conversion functions
  2005-02-06 10:20 [Bug c++/19787] New: Internal compiler error with ambiguous conversion functions belz@kolumbus.fi
                   ` (3 preceding siblings ...)
  2005-02-10  7:57 ` cvs-commit at gcc dot gnu dot org
@ 2005-02-10  9:23 ` mmitchel at gcc dot gnu dot org
  2005-02-10 10:17 ` mmitchel at gcc dot gnu dot org
  2005-02-10 10:37 ` cvs-commit at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-02-10  9:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-02-10 00:43 -------
Fixed in 4.0.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[3.4/4.0 Regression]        |[3.4 Regression] Internal
                   |Internal compiler error with|compiler error with
                   |ambiguous conversion        |ambiguous conversion
                   |functions                   |functions


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


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

* [Bug c++/19787] [3.4 Regression] Internal compiler error with ambiguous conversion functions
  2005-02-06 10:20 [Bug c++/19787] New: Internal compiler error with ambiguous conversion functions belz@kolumbus.fi
                   ` (4 preceding siblings ...)
  2005-02-10  9:23 ` [Bug c++/19787] [3.4 " mmitchel at gcc dot gnu dot org
@ 2005-02-10 10:17 ` mmitchel at gcc dot gnu dot org
  2005-02-10 10:37 ` cvs-commit at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-02-10 10:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-02-10 01:12 -------
Fixed in GCC 3.4.4.

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


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


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

* [Bug c++/19787] [3.4 Regression] Internal compiler error with ambiguous conversion functions
  2005-02-06 10:20 [Bug c++/19787] New: Internal compiler error with ambiguous conversion functions belz@kolumbus.fi
                   ` (5 preceding siblings ...)
  2005-02-10 10:17 ` mmitchel at gcc dot gnu dot org
@ 2005-02-10 10:37 ` cvs-commit at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-10 10:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-02-10 01:12 -------
Subject: Bug 19787

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	mmitchel@gcc.gnu.org	2005-02-10 01:10:16

Modified files:
	gcc/testsuite  : ChangeLog 
	gcc/cp         : ChangeLog call.c parser.c 
Added files:
	gcc/testsuite/g++.dg/conversion: ambig1.C 
	gcc/testsuite/g++.dg/ext: attrib19.C 
	gcc/testsuite/g++.dg/template: dtor3.C 

Log message:
	PR c++/19787
	* call.c (initialize_reference): Robustify.
	
	PR c++/19762
	* parser.c (cp_parser_unqualified_id): Avoid creating destructor
	names with invalid types.
	
	PR c++/19739
	* parser.c (cp_parser_attributes_list): Allow empty lists.
	
	PR c++/19787
	* g++.dg/conversion/ambig1.C: New test.
	
	PR c++/19739
	* g++.dg/ext/attrib19.C: New test.
	
	PR c++/19762
	* g++.dg/template/dtor3.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.357&r2=1.3389.2.358
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/conversion/ambig1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/attrib19.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/dtor3.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.195&r2=1.3892.2.196
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.452.2.22&r2=1.452.2.23
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.157.2.51&r2=1.157.2.52



-- 


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


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

end of thread, other threads:[~2005-02-10  1:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-06 10:20 [Bug c++/19787] New: Internal compiler error with ambiguous conversion functions belz@kolumbus.fi
2005-02-06 15:19 ` [Bug c++/19787] [4.0 Regression] " pinskia@gcc.gnu.org
2005-02-08  3:11 ` [Bug c++/19787] [3.4/4.0 " pinskia at gcc dot gnu dot org
2005-02-09 13:51 ` mmitchel at gcc dot gnu dot org
2005-02-10  7:57 ` cvs-commit at gcc dot gnu dot org
2005-02-10  9:23 ` [Bug c++/19787] [3.4 " mmitchel at gcc dot gnu dot org
2005-02-10 10:17 ` mmitchel at gcc dot gnu dot org
2005-02-10 10:37 ` cvs-commit 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).