public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/22434] New: ICE in simplify_{,gen_}subreg
@ 2005-07-12 10:44 jakub at redhat dot com
2005-07-12 13:05 ` [Bug c++/22434] [3.4/4.0/4.1 regression] " reichelt at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 15+ messages in thread
From: jakub at redhat dot com @ 2005-07-12 10:44 UTC (permalink / raw)
To: gcc-bugs
#include <ostream>
#include <string>
#include <vector>
std::string bar (unsigned int x);
template <class T>
std::ostream & baz (std::ostream &os, const T &v, bool lit)
{
typename T::const_iterator i = v.begin ();
os << (lit ? bar (*i) : *i);
return os;
}
void foo (std::ostream &os, const std::vector<int> &v)
{
baz (os, v, false);
}
ICEs in 3.4.4, 4.0.1 and HEAD, trying to generate a BLKmode SUBREG.
--
Summary: ICE in simplify_{,gen_}subreg
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at redhat dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22434
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/22434] [3.4/4.0/4.1 regression] ICE in simplify_{,gen_}subreg
2005-07-12 10:44 [Bug c++/22434] New: ICE in simplify_{,gen_}subreg jakub at redhat dot com
@ 2005-07-12 13:05 ` reichelt at gcc dot gnu dot org
2005-07-13 3:41 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 15+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-07-12 13:05 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/22434] [3.4/4.0/4.1 regression] ICE in simplify_{,gen_}subreg
2005-07-12 10:44 [Bug c++/22434] New: ICE in simplify_{,gen_}subreg jakub at redhat dot com
2005-07-12 13:05 ` [Bug c++/22434] [3.4/4.0/4.1 regression] " reichelt at gcc dot gnu dot org
@ 2005-07-13 3:41 ` pinskia at gcc dot gnu dot org
2005-07-22 21:17 ` pinskia at gcc dot gnu dot org
2005-09-27 15:56 ` mmitchel at gcc dot gnu dot org
3 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-13 3:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-13 03:12 -------
With my patch for PR 22368, I get a different ICE:
t.cc:10: error: statement types mismatch
D.1751 = iD.1737;
struct AD.1716
const intD.2
t.cc:10: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |22368
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22434
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/22434] [3.4/4.0/4.1 regression] ICE in simplify_{,gen_}subreg
2005-07-12 10:44 [Bug c++/22434] New: ICE in simplify_{,gen_}subreg jakub at redhat dot com
2005-07-12 13:05 ` [Bug c++/22434] [3.4/4.0/4.1 regression] " reichelt at gcc dot gnu dot org
2005-07-13 3:41 ` pinskia at gcc dot gnu dot org
@ 2005-07-22 21:17 ` pinskia at gcc dot gnu dot org
2005-09-27 15:56 ` mmitchel at gcc dot gnu dot org
3 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-22 21:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-22 21:12 -------
Moving to 4.0.2 pre Mark.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.5 |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22434
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/22434] [3.4/4.0/4.1 regression] ICE in simplify_{,gen_}subreg
2005-07-12 10:44 [Bug c++/22434] New: ICE in simplify_{,gen_}subreg jakub at redhat dot com
` (2 preceding siblings ...)
2005-07-22 21:17 ` pinskia at gcc dot gnu dot org
@ 2005-09-27 15:56 ` mmitchel at gcc dot gnu dot org
3 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 15:56 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.2 |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22434
^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <bug-22434-138@http.gcc.gnu.org/bugzilla/>]
* [Bug c++/22434] [3.4/4.0/4.1 regression] ICE in simplify_{,gen_}subreg
[not found] <bug-22434-138@http.gcc.gnu.org/bugzilla/>
@ 2005-10-13 19:27 ` pinskia at gcc dot gnu dot org
2005-10-13 21:23 ` janis at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-13 19:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2005-10-13 19:27 -------
: Search converges between 2004-02-01-trunk (#445) and 2004-03-01-trunk (#446).
: Search converges between 2004-02-02-3.4 (#1) and 2004-03-01-3.4 (#2).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22434
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/22434] [3.4/4.0/4.1 regression] ICE in simplify_{,gen_}subreg
[not found] <bug-22434-138@http.gcc.gnu.org/bugzilla/>
2005-10-13 19:27 ` pinskia at gcc dot gnu dot org
@ 2005-10-13 21:23 ` janis at gcc dot gnu dot org
2005-10-31 4:05 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: janis at gcc dot gnu dot org @ 2005-10-13 21:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from janis at gcc dot gnu dot org 2005-10-13 21:23 -------
A regression hunt on mainline identified this patch from mmitchel@gcc.gnu.org
on 2004-02-16:
http://gcc.gnu.org/ml/gcc-cvs/2004-02/msg00790.html
A version of the patch was added to the 3.4 branch at the same time.
--
janis at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mmitchel at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22434
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/22434] [3.4/4.0/4.1 regression] ICE in simplify_{,gen_}subreg
[not found] <bug-22434-138@http.gcc.gnu.org/bugzilla/>
2005-10-13 19:27 ` pinskia at gcc dot gnu dot org
2005-10-13 21:23 ` janis at gcc dot gnu dot org
@ 2005-10-31 4:05 ` mmitchel at gcc dot gnu dot org
2005-11-02 23:51 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-10-31 4:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from mmitchel at gcc dot gnu dot org 2005-10-31 04:05 -------
I'm not sure what's ging on here, but I know we should fix it... Leaving as
P2.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22434
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/22434] [3.4/4.0/4.1 regression] ICE in simplify_{,gen_}subreg
[not found] <bug-22434-138@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2005-10-31 4:05 ` mmitchel at gcc dot gnu dot org
@ 2005-11-02 23:51 ` mmitchel at gcc dot gnu dot org
2005-11-03 1:25 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-11-02 23:51 UTC (permalink / raw)
To: gcc-bugs
--
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
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22434
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/22434] [3.4/4.0/4.1 regression] ICE in simplify_{,gen_}subreg
[not found] <bug-22434-138@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2005-11-02 23:51 ` mmitchel at gcc dot gnu dot org
@ 2005-11-03 1:25 ` mmitchel at gcc dot gnu dot org
2005-11-03 1:30 ` mmitchel at gcc dot gnu dot org
2005-11-03 1:35 ` mmitchel at gcc dot gnu dot org
6 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-11-03 1:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from mmitchel at gcc dot gnu dot org 2005-11-03 01:25 -------
Subject: Bug 22434
Author: mmitchel
Date: Thu Nov 3 01:25:13 2005
New Revision: 106418
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106418
Log:
PR c++/22434
* call.c (build_conditional_expr): Do bad conversions, if there's
no other choice.
PR c++/22434
* g++.dg/expr/cond8.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/expr/cond8.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22434
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/22434] [3.4/4.0/4.1 regression] ICE in simplify_{,gen_}subreg
[not found] <bug-22434-138@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2005-11-03 1:25 ` mmitchel at gcc dot gnu dot org
@ 2005-11-03 1:30 ` mmitchel at gcc dot gnu dot org
2005-11-03 1:35 ` mmitchel at gcc dot gnu dot org
6 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-11-03 1:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from mmitchel at gcc dot gnu dot org 2005-11-03 01:30 -------
Subject: Bug 22434
Author: mmitchel
Date: Thu Nov 3 01:30:53 2005
New Revision: 106419
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106419
Log:
PR c++/22434
* call.c (build_conditional_expr): Do bad conversions, if there's
no other choice.
PR c++/22434
* g++.dg/expr/cond8.C: New test.
Added:
branches/gcc-4_0-branch/gcc/testsuite/g++.dg/expr/cond8.C
Modified:
branches/gcc-4_0-branch/gcc/cp/ChangeLog
branches/gcc-4_0-branch/gcc/cp/call.c
branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22434
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/22434] [3.4/4.0/4.1 regression] ICE in simplify_{,gen_}subreg
[not found] <bug-22434-138@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2005-11-03 1:30 ` mmitchel at gcc dot gnu dot org
@ 2005-11-03 1:35 ` mmitchel at gcc dot gnu dot org
6 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-11-03 1:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from mmitchel at gcc dot gnu dot org 2005-11-03 01:35 -------
Fixed in 4.0.3.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22434
^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <bug-22434-4@http.gcc.gnu.org/bugzilla/>]
* [Bug c++/22434] [3.4/4.0/4.1 regression] ICE in simplify_{,gen_}subreg
[not found] <bug-22434-4@http.gcc.gnu.org/bugzilla/>
@ 2014-05-09 18:16 ` jason at gcc dot gnu.org
2014-05-25 17:30 ` harald at gigawatt dot nl
2014-07-12 16:37 ` jason at gcc dot gnu.org
2 siblings, 0 replies; 15+ messages in thread
From: jason at gcc dot gnu.org @ 2014-05-09 18:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22434
--- Comment #10 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri May 9 18:15:46 2014
New Revision: 210281
URL: http://gcc.gnu.org/viewcvs?rev=210281&root=gcc&view=rev
Log:
PR c++/22434
* call.c (build_conditional_expr_1): Don't try to pool cv-quals
if we didn't find a conversion.
Don't accept a bad conversion too early.
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/testsuite/g++.dg/expr/cond8.C
trunk/gcc/testsuite/g++.old-deja/g++.jason/conversion10.C
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/22434] [3.4/4.0/4.1 regression] ICE in simplify_{,gen_}subreg
[not found] <bug-22434-4@http.gcc.gnu.org/bugzilla/>
2014-05-09 18:16 ` jason at gcc dot gnu.org
@ 2014-05-25 17:30 ` harald at gigawatt dot nl
2014-07-12 16:37 ` jason at gcc dot gnu.org
2 siblings, 0 replies; 15+ messages in thread
From: harald at gigawatt dot nl @ 2014-05-25 17:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22434
Harald van Dijk <harald at gigawatt dot nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |harald at gigawatt dot nl
--- Comment #11 from Harald van Dijk <harald at gigawatt dot nl> ---
(In reply to Jason Merrill from comment #10)
I was about to report a new bug, but I think that you have already fixed the
problem here. Perhaps the test cases I was going to suggest would still be
useful to add:
struct T;
struct S { operator T(); };
struct T { operator S(); };
const S f();
volatile T g();
void h() { true ? f() : g(); }
or
struct S { S(void *); operator int(); };
const S f();
void g() { true ? f() : 1; }
are accepted by GCC 4.9 without any diagnostic. Take out one of the bad
conversions, and the other causes the correct error to be shown. (-pedantic
causees the bad conversions to be rejected earlier, but the errors here are
errors that are supposed to show up even without -pedantic, and normally they
do.)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/22434] [3.4/4.0/4.1 regression] ICE in simplify_{,gen_}subreg
[not found] <bug-22434-4@http.gcc.gnu.org/bugzilla/>
2014-05-09 18:16 ` jason at gcc dot gnu.org
2014-05-25 17:30 ` harald at gigawatt dot nl
@ 2014-07-12 16:37 ` jason at gcc dot gnu.org
2 siblings, 0 replies; 15+ messages in thread
From: jason at gcc dot gnu.org @ 2014-07-12 16:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22434
--- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Sat Jul 12 16:36:25 2014
New Revision: 212482
URL: https://gcc.gnu.org/viewcvs?rev=212482&root=gcc&view=rev
Log:
PR c++/22434
PR c++/61288
* call.c (build_conditional_expr_1): Avoid reading freed memory.
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2014-07-12 16:37 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-12 10:44 [Bug c++/22434] New: ICE in simplify_{,gen_}subreg jakub at redhat dot com
2005-07-12 13:05 ` [Bug c++/22434] [3.4/4.0/4.1 regression] " reichelt at gcc dot gnu dot org
2005-07-13 3:41 ` pinskia at gcc dot gnu dot org
2005-07-22 21:17 ` pinskia at gcc dot gnu dot org
2005-09-27 15:56 ` mmitchel at gcc dot gnu dot org
[not found] <bug-22434-138@http.gcc.gnu.org/bugzilla/>
2005-10-13 19:27 ` pinskia at gcc dot gnu dot org
2005-10-13 21:23 ` janis at gcc dot gnu dot org
2005-10-31 4:05 ` mmitchel at gcc dot gnu dot org
2005-11-02 23:51 ` mmitchel at gcc dot gnu dot org
2005-11-03 1:25 ` mmitchel at gcc dot gnu dot org
2005-11-03 1:30 ` mmitchel at gcc dot gnu dot org
2005-11-03 1:35 ` mmitchel at gcc dot gnu dot org
[not found] <bug-22434-4@http.gcc.gnu.org/bugzilla/>
2014-05-09 18:16 ` jason at gcc dot gnu.org
2014-05-25 17:30 ` harald at gigawatt dot nl
2014-07-12 16:37 ` jason at gcc dot gnu.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).