public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27666] New: [4.0/4.1/4.2 regression] ICE with volatile in conditional expression
@ 2006-05-18 19:24 reichelt at gcc dot gnu dot org
2006-05-18 21:35 ` [Bug c++/27666] " pinskia at gcc dot gnu dot org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-18 19:24 UTC (permalink / raw)
To: gcc-bugs
The following code snippet triggers an ICE since GCC 3.0
(it disappeared in 3.3.[2-6]):
=======================================
struct A
{
A(int);
};
void foo(volatile A a) { 1 ? a : 0; }
=======================================
bug.cc: In function 'void foo(A)':
bug.cc:6: error: no matching function for call to 'A::A(volatile A)'
bug.cc:3: note: candidates are: A::A(int)
bug.cc:2: note: A::A(const A&)
bug.cc:6: error: initializing temporary from result of 'A::A(int)'
bug.cc:6: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in build_conditional_expr, at cp/call.c:3326
Please submit a full bug report, [etc.]
I'm not sure whether the error message before the ICE is correct
or whether the code is in fact valid.
--
Summary: [4.0/4.1/4.2 regression] ICE with volatile in
conditional expression
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, 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=27666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/27666] [4.0/4.1/4.2 regression] ICE with volatile in conditional expression
2006-05-18 19:24 [Bug c++/27666] New: [4.0/4.1/4.2 regression] ICE with volatile in conditional expression reichelt at gcc dot gnu dot org
@ 2006-05-18 21:35 ` pinskia at gcc dot gnu dot org
2006-05-21 21:26 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-18 21:35 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.0.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/27666] [4.0/4.1/4.2 regression] ICE with volatile in conditional expression
2006-05-18 19:24 [Bug c++/27666] New: [4.0/4.1/4.2 regression] ICE with volatile in conditional expression reichelt at gcc dot gnu dot org
2006-05-18 21:35 ` [Bug c++/27666] " pinskia at gcc dot gnu dot org
@ 2006-05-21 21:26 ` pinskia at gcc dot gnu dot org
2006-06-04 19:14 ` mmitchel at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-21 21:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-05-21 21:26 -------
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-05-21 21:26:34
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/27666] [4.0/4.1/4.2 regression] ICE with volatile in conditional expression
2006-05-18 19:24 [Bug c++/27666] New: [4.0/4.1/4.2 regression] ICE with volatile in conditional expression reichelt at gcc dot gnu dot org
2006-05-18 21:35 ` [Bug c++/27666] " pinskia at gcc dot gnu dot org
2006-05-21 21:26 ` pinskia at gcc dot gnu dot org
@ 2006-06-04 19:14 ` mmitchel at gcc dot gnu dot org
2006-06-06 22:12 ` mmitchel at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-04 19:14 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/27666] [4.0/4.1/4.2 regression] ICE with volatile in conditional expression
2006-05-18 19:24 [Bug c++/27666] New: [4.0/4.1/4.2 regression] ICE with volatile in conditional expression reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2006-06-04 19:14 ` mmitchel at gcc dot gnu dot org
@ 2006-06-06 22:12 ` mmitchel at gcc dot gnu dot org
2006-06-06 22:19 ` reichelt at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-06 22:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from mmitchel at gcc dot gnu dot org 2006-06-06 22:04 -------
The code is indeed invalid. (There's no copy constructor for A that accepts a
volatile A as input, but the conceptual expression is an rvalue, so we have to
(conceptually) create a temporary.)
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
Keywords|ice-on-valid-code |ice-on-invalid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/27666] [4.0/4.1/4.2 regression] ICE with volatile in conditional expression
2006-05-18 19:24 [Bug c++/27666] New: [4.0/4.1/4.2 regression] ICE with volatile in conditional expression reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2006-06-06 22:12 ` mmitchel at gcc dot gnu dot org
@ 2006-06-06 22:19 ` reichelt at gcc dot gnu dot org
2006-06-06 22:36 ` mark at codesourcery dot com
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-06-06 22:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from reichelt at gcc dot gnu dot org 2006-06-06 22:12 -------
The following code is accepted. Shouldn't it be rejected then?
=======================================
struct A
{
A(int);
};
void foo(volatile A a) { 1 ? a : a; }
=======================================
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/27666] [4.0/4.1/4.2 regression] ICE with volatile in conditional expression
2006-05-18 19:24 [Bug c++/27666] New: [4.0/4.1/4.2 regression] ICE with volatile in conditional expression reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2006-06-06 22:19 ` reichelt at gcc dot gnu dot org
@ 2006-06-06 22:36 ` mark at codesourcery dot com
2006-06-16 2:36 ` mmitchel at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mark at codesourcery dot com @ 2006-06-06 22:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from mark at codesourcery dot com 2006-06-06 22:35 -------
Subject: Re: [4.0/4.1/4.2 regression] ICE with volatile in
conditional expression
reichelt at gcc dot gnu dot org wrote:
> ------- Comment #3 from reichelt at gcc dot gnu dot org 2006-06-06 22:12 -------
> The following code is accepted. Shouldn't it be rejected then?
>
> =======================================
> struct A
> {
> A(int);
> };
>
> void foo(volatile A a) { 1 ? a : a; }
> =======================================
No, in that case the expression is an lvalue.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/27666] [4.0/4.1/4.2 regression] ICE with volatile in conditional expression
2006-05-18 19:24 [Bug c++/27666] New: [4.0/4.1/4.2 regression] ICE with volatile in conditional expression reichelt at gcc dot gnu dot org
` (5 preceding siblings ...)
2006-06-06 22:36 ` mark at codesourcery dot com
@ 2006-06-16 2:36 ` mmitchel at gcc dot gnu dot org
2006-06-16 2:47 ` [Bug c++/27666] [4.0/4.1 " mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-16 2:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from mmitchel at gcc dot gnu dot org 2006-06-16 02:33 -------
Subject: Bug 27666
Author: mmitchel
Date: Fri Jun 16 02:33:35 2006
New Revision: 114702
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114702
Log:
PR c++/27666
* call.c (build_conditional_expr): Robustify.
PR c++/27666
* g++.dg/expr/cond9.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/expr/cond9.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/27666] [4.0/4.1 regression] ICE with volatile in conditional expression
2006-05-18 19:24 [Bug c++/27666] New: [4.0/4.1/4.2 regression] ICE with volatile in conditional expression reichelt at gcc dot gnu dot org
` (6 preceding siblings ...)
2006-06-16 2:36 ` mmitchel at gcc dot gnu dot org
@ 2006-06-16 2:47 ` mmitchel at gcc dot gnu dot org
2006-06-16 6:10 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-16 2:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from mmitchel at gcc dot gnu dot org 2006-06-16 02:36 -------
Fixed in 4.2.0.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.0/4.1/4.2 regression] ICE|[4.0/4.1 regression] ICE
|with volatile in conditional|with volatile in conditional
|expression |expression
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/27666] [4.0/4.1 regression] ICE with volatile in conditional expression
2006-05-18 19:24 [Bug c++/27666] New: [4.0/4.1/4.2 regression] ICE with volatile in conditional expression reichelt at gcc dot gnu dot org
` (7 preceding siblings ...)
2006-06-16 2:47 ` [Bug c++/27666] [4.0/4.1 " mmitchel at gcc dot gnu dot org
@ 2006-06-16 6:10 ` mmitchel at gcc dot gnu dot org
2006-06-16 6:10 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-16 6:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from mmitchel at gcc dot gnu dot org 2006-06-16 06:10 -------
Subject: Bug 27666
Author: mmitchel
Date: Fri Jun 16 06:09:55 2006
New Revision: 114705
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114705
Log:
PR c++/27666
* call.c (build_conditional_expr): Robustify.
PR c++/27666
* g++.dg/expr/cond9.C: New test.
Modified:
branches/gcc-4_1-branch/gcc/cp/ChangeLog
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/27666] [4.0/4.1 regression] ICE with volatile in conditional expression
2006-05-18 19:24 [Bug c++/27666] New: [4.0/4.1/4.2 regression] ICE with volatile in conditional expression reichelt at gcc dot gnu dot org
` (8 preceding siblings ...)
2006-06-16 6:10 ` mmitchel at gcc dot gnu dot org
@ 2006-06-16 6:10 ` mmitchel at gcc dot gnu dot org
2006-06-16 6:25 ` [Bug c++/27666] [4.0 " mmitchel at gcc dot gnu dot org
2007-02-03 17:03 ` gdr at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-16 6:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from mmitchel at gcc dot gnu dot org 2006-06-16 06:09 -------
Subject: Bug 27666
Author: mmitchel
Date: Fri Jun 16 06:09:14 2006
New Revision: 114704
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114704
Log:
PR c++/27666
* call.c (build_conditional_expr): Robustify.
PR c++/27666
* g++.dg/expr/cond9.C: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/g++.dg/expr/cond9.C
Modified:
branches/gcc-4_1-branch/gcc/cp/call.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/27666] [4.0 regression] ICE with volatile in conditional expression
2006-05-18 19:24 [Bug c++/27666] New: [4.0/4.1/4.2 regression] ICE with volatile in conditional expression reichelt at gcc dot gnu dot org
` (9 preceding siblings ...)
2006-06-16 6:10 ` mmitchel at gcc dot gnu dot org
@ 2006-06-16 6:25 ` mmitchel at gcc dot gnu dot org
2007-02-03 17:03 ` gdr at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-16 6:25 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|mark at codesourcery dot com|unassigned at gcc dot gnu
| |dot org
Status|ASSIGNED |NEW
Summary|[4.0/4.1 regression] ICE |[4.0 regression] ICE with
|with volatile in conditional|volatile in conditional
|expression |expression
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/27666] [4.0 regression] ICE with volatile in conditional expression
2006-05-18 19:24 [Bug c++/27666] New: [4.0/4.1/4.2 regression] ICE with volatile in conditional expression reichelt at gcc dot gnu dot org
` (10 preceding siblings ...)
2006-06-16 6:25 ` [Bug c++/27666] [4.0 " mmitchel at gcc dot gnu dot org
@ 2007-02-03 17:03 ` gdr at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 17:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from gdr at gcc dot gnu dot org 2007-02-03 17:03 -------
Fixed in GCC-4.1.2.
--
gdr at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|4.0.4 |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27666
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2007-02-03 17:03 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-18 19:24 [Bug c++/27666] New: [4.0/4.1/4.2 regression] ICE with volatile in conditional expression reichelt at gcc dot gnu dot org
2006-05-18 21:35 ` [Bug c++/27666] " pinskia at gcc dot gnu dot org
2006-05-21 21:26 ` pinskia at gcc dot gnu dot org
2006-06-04 19:14 ` mmitchel at gcc dot gnu dot org
2006-06-06 22:12 ` mmitchel at gcc dot gnu dot org
2006-06-06 22:19 ` reichelt at gcc dot gnu dot org
2006-06-06 22:36 ` mark at codesourcery dot com
2006-06-16 2:36 ` mmitchel at gcc dot gnu dot org
2006-06-16 2:47 ` [Bug c++/27666] [4.0/4.1 " mmitchel at gcc dot gnu dot org
2006-06-16 6:10 ` mmitchel at gcc dot gnu dot org
2006-06-16 6:10 ` mmitchel at gcc dot gnu dot org
2006-06-16 6:25 ` [Bug c++/27666] [4.0 " mmitchel at gcc dot gnu dot org
2007-02-03 17:03 ` gdr 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).