public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11283] New: [3.4 regression]
@ 2003-06-22 12:51 falk at debian dot org
2003-06-22 12:52 ` [Bug c++/11283] " falk at debian dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: falk at debian dot org @ 2003-06-22 12:51 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11283
Summary: [3.4 regression]
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: critical
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: falk at debian dot org
CC: gcc-bugs@gcc.gnu.org
GCC build triplet: alphaev68-unknown-linux-gnu
GCC host triplet: alphaev68-unknown-linux-gnu
GCC target triplet: alphaev68-unknown-linux-gnu
This was reported on gcc-bugs by James W. McKelvey (mckelvey at maskull com),
but I can't find it in the database. According to James, it also occurs on
Solaris 2.7.1. It does not occur with 3.3 or earlier.
Here's an unpreprocessed test case:
#include <vector>
namespace PatternMaster {
struct SymbolTable {
static const bool EMPTY_BOOLEAN = false;
};
}
bool evaluate(std::vector<bool> value) {
const unsigned long offset = 23;
return (offset < value.size()
? value[offset]
: PatternMaster::SymbolTable::EMPTY_BOOLEAN);
}
% g++ --version
g++ (GCC) 3.4 20030614 (experimental)
% g++ -c bugs.cc
bugs.cc: In function `bool evaluate(std::vector<bool, std::allocator<bool> >)':
bugs.cc:13: internal compiler error: in build_conditional_expr, at cp/call.c:
3349
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/11283] [3.4 regression]
2003-06-22 12:51 [Bug c++/11283] New: [3.4 regression] falk at debian dot org
@ 2003-06-22 12:52 ` falk at debian dot org
2003-06-22 12:54 ` [Bug c++/11283] [3.4 regression] ICE in build_conditional_expr with vector<bool> falk at debian dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: falk at debian dot org @ 2003-06-22 12:52 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11283
------- Additional Comments From falk at debian dot org 2003-06-22 12:52 -------
Created an attachment (id=4263)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4263&action=view)
Test case
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/11283] [3.4 regression] ICE in build_conditional_expr with vector<bool>
2003-06-22 12:51 [Bug c++/11283] New: [3.4 regression] falk at debian dot org
2003-06-22 12:52 ` [Bug c++/11283] " falk at debian dot org
@ 2003-06-22 12:54 ` falk at debian dot org
2003-06-22 17:43 ` giovannibajo at libero dot it
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: falk at debian dot org @ 2003-06-22 12:54 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11283
falk at debian dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[3.4 regression] |[3.4 regression] ICE in
| |build_conditional_expr with
| |vector<bool>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/11283] [3.4 regression] ICE in build_conditional_expr with vector<bool>
2003-06-22 12:51 [Bug c++/11283] New: [3.4 regression] falk at debian dot org
2003-06-22 12:52 ` [Bug c++/11283] " falk at debian dot org
2003-06-22 12:54 ` [Bug c++/11283] [3.4 regression] ICE in build_conditional_expr with vector<bool> falk at debian dot org
@ 2003-06-22 17:43 ` giovannibajo at libero dot it
2003-06-22 17:43 ` giovannibajo at libero dot it
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: giovannibajo at libero dot it @ 2003-06-22 17:43 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11283
giovannibajo at libero dot it changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-06-22 17:40:23
date| |
------- Additional Comments From giovannibajo at libero dot it 2003-06-22 17:40 -------
Confirmed, reduced snippet:
---------------------------------------------
struct Bar
{
operator bool();
};
struct Foo
{
Bar func(void);
};
const bool blabla(void);
bool evaluate(Foo foo)
{
return (0 ? foo.func() : blabla());
}
---------------------------------------------
pr11283.cpp: In function `bool evaluate(Foo)':
pr11283.cpp:15: internal compiler error: in build_conditional_expr, at
cp/call.c:3349
Regression on mainline only.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/11283] [3.4 regression] ICE in build_conditional_expr with vector<bool>
2003-06-22 12:51 [Bug c++/11283] New: [3.4 regression] falk at debian dot org
` (2 preceding siblings ...)
2003-06-22 17:43 ` giovannibajo at libero dot it
@ 2003-06-22 17:43 ` giovannibajo at libero dot it
2003-06-22 17:49 ` [Bug c++/11283] [3.4 regression] ICE in build_conditional_expr giovannibajo at libero dot it
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: giovannibajo at libero dot it @ 2003-06-22 17:43 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11283
giovannibajo at libero dot it changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |giovannibajo@libero.it
AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org
|dot org |
------- Additional Comments From giovannibajo at libero dot it 2003-06-22 17:41 -------
Regression introduced with this patch by Jason Merill:
http://gcc.gnu.org/ml/gcc-patches/2003-05/msg00461.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/11283] [3.4 regression] ICE in build_conditional_expr
2003-06-22 12:51 [Bug c++/11283] New: [3.4 regression] falk at debian dot org
` (3 preceding siblings ...)
2003-06-22 17:43 ` giovannibajo at libero dot it
@ 2003-06-22 17:49 ` giovannibajo at libero dot it
2003-06-23 22:22 ` jason at redhat dot com
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: giovannibajo at libero dot it @ 2003-06-22 17:49 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11283
giovannibajo at libero dot it changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[3.4 regression] ICE in |[3.4 regression] ICE in
|build_conditional_expr with |build_conditional_expr
|vector<bool> |
------- Additional Comments From giovannibajo at libero dot it 2003-06-22 17:44 -------
This seems to fix it:
Index: call.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/call.c,v
retrieving revision 1.386
diff -c -p -r1.386 call.c
*** call.c 15 May 2003 22:25:51 -0000 1.386
--- call.c 22 Jun 2003 17:42:12 -0000
*************** build_conditional_expr (tree arg1, tree
*** 3345,3351 ****
{
arg2 = convert_like (conv2, arg2);
arg2 = convert_from_reference (arg2);
! if (!same_type_p (TREE_TYPE (arg2), arg3_type))
abort ();
arg2_type = TREE_TYPE (arg2);
}
--- 3345,3353 ----
{
arg2 = convert_like (conv2, arg2);
arg2 = convert_from_reference (arg2);
! if (!same_type_ignoring_top_level_qualifiers_p
! (TREE_TYPE (arg2), arg3_type)
! || !at_least_as_qualified_p (arg3_type, TREE_TYPE (arg2)))
abort ();
arg2_type = TREE_TYPE (arg2);
}
*************** build_conditional_expr (tree arg1, tree
*** 3353,3359 ****
{
arg3 = convert_like (conv3, arg3);
arg3 = convert_from_reference (arg3);
! if (!same_type_p (TREE_TYPE (arg3), arg2_type))
abort ();
arg3_type = TREE_TYPE (arg3);
}
--- 3355,3363 ----
{
arg3 = convert_like (conv3, arg3);
arg3 = convert_from_reference (arg3);
! if (!same_type_ignoring_top_level_qualifiers_p
! (TREE_TYPE (arg3), arg2_type)
! || !at_least_as_qualified_p (arg2_type, TREE_TYPE (arg3)))
abort ();
arg3_type = TREE_TYPE (arg3);
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/11283] [3.4 regression] ICE in build_conditional_expr
2003-06-22 12:51 [Bug c++/11283] New: [3.4 regression] falk at debian dot org
` (4 preceding siblings ...)
2003-06-22 17:49 ` [Bug c++/11283] [3.4 regression] ICE in build_conditional_expr giovannibajo at libero dot it
@ 2003-06-23 22:22 ` jason at redhat dot com
2003-07-15 0:56 ` pinskia at physics dot uc dot edu
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jason at redhat dot com @ 2003-06-23 22:22 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11283
------- Additional Comments From jason at redhat dot com 2003-06-23 22:16 -------
Subject: Re: [3.4 regression] ICE in build_conditional_expr
No, we need the types to be the same at this point. The conversion code
should have done the complete conversion; apparently it isn't. I'll try
to look at this soon.
Jason
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/11283] [3.4 regression] ICE in build_conditional_expr
2003-06-22 12:51 [Bug c++/11283] New: [3.4 regression] falk at debian dot org
` (5 preceding siblings ...)
2003-06-23 22:22 ` jason at redhat dot com
@ 2003-07-15 0:56 ` pinskia at physics dot uc dot edu
2003-08-21 22:02 ` cvs-commit at gcc dot gnu dot org
2003-08-21 22:48 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-15 0:56 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11283
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at physics dot uc
| |dot edu
GCC target triplet|alphaev68-unknown-linux-gnu |*-*-*
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-15 00:56 -------
Also happens on powerpc-apple-darwin6.6 so target indpendent.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/11283] [3.4 regression] ICE in build_conditional_expr
2003-06-22 12:51 [Bug c++/11283] New: [3.4 regression] falk at debian dot org
` (6 preceding siblings ...)
2003-07-15 0:56 ` pinskia at physics dot uc dot edu
@ 2003-08-21 22:02 ` cvs-commit at gcc dot gnu dot org
2003-08-21 22:48 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-08-21 22:02 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11283
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-08-21 22:02 -------
Subject: Bug 11283
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: jason@gcc.gnu.org 2003-08-21 22:02:27
Modified files:
gcc/cp : ChangeLog call.c
Added files:
gcc/testsuite/g++.dg/conversion: cond6.C
Log message:
PR c++/11283
* call.c (build_conditional_expr): Ignore cv-qual differences for
non-class types.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3617&r2=1.3618
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.422&r2=1.423
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/conversion/cond6.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/11283] [3.4 regression] ICE in build_conditional_expr
2003-06-22 12:51 [Bug c++/11283] New: [3.4 regression] falk at debian dot org
` (7 preceding siblings ...)
2003-08-21 22:02 ` cvs-commit at gcc dot gnu dot org
@ 2003-08-21 22:48 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-21 22:48 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11283
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-08-21 22:48 -------
Fixed by the above patch.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2003-08-21 22:48 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-22 12:51 [Bug c++/11283] New: [3.4 regression] falk at debian dot org
2003-06-22 12:52 ` [Bug c++/11283] " falk at debian dot org
2003-06-22 12:54 ` [Bug c++/11283] [3.4 regression] ICE in build_conditional_expr with vector<bool> falk at debian dot org
2003-06-22 17:43 ` giovannibajo at libero dot it
2003-06-22 17:43 ` giovannibajo at libero dot it
2003-06-22 17:49 ` [Bug c++/11283] [3.4 regression] ICE in build_conditional_expr giovannibajo at libero dot it
2003-06-23 22:22 ` jason at redhat dot com
2003-07-15 0:56 ` pinskia at physics dot uc dot edu
2003-08-21 22:02 ` cvs-commit at gcc dot gnu dot org
2003-08-21 22:48 ` pinskia 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).